Using Source Control DIFF

Studio's DIFF viewer allows you to view comparisons of recently saved versions of a PHP file with a version of the file held in the version control repository.

The Version Control DIFF viewer supports both supported source control software, CVS and Subversion.

 

The Version Control DIFF viewer's appearance can be customized to reflect user-defined colors to indicate the DIFF categories: Changed, Appended and Deleted.

 

To customize the DIFF viewer's appearance:

  1. Go to Tools | Preferences | Colors & Fonts.

  2. Choose a Scheme or select a scheme on which to base your new scheme.

  3. Go to the Diff viewer tab and define the element setting preferences.

  4. If you are creating a new scheme, select Save As and enter the new color scheme's name.

  5. If you are changing an existing schemes settings, select Apply and OK to close the preferences menu.

To perform a DIFF comparison:

  1. Edit the PHP file you are working on and save the changes.

  2. Right-click to open the available menus.

  3. From the version control menu, select DIFF.

The DIFF viewer opens showing the Repository version of the file on the left, and the Current version of the file on the right.

Source Control Diff viewer

The DIFF viewer supports two important features that allow you to identify and navigate to differences between the versions you are comparing.

Smart Scrolling - the application scrolls automatically between DIFFs , i.e., sections of code that have changed

View Changes - the application attempts to align similar unchanged lines

 

The DIFF viewer supports the following navigational and informative features:

Setting

Description

Arrows

Navigate to the Next and Previous DIFF within the same window

Colors

User-defined color scheme for describing a DIFF (Changed, Appended, Deleted)  

Statistical

Number of differences in the version

Revision

Revision number

 

 

Related Links

Related Links:
Source Control

Configuring Zend Studio for CVS

Configuring the CVS Communication Tunnel

Configuring Zend Studio for Subversion

Source Control File Status