Visual Studio Orcas March 2007 CTP - Folder Difference - Part 3

 

In this installment, we'll talk about Folder Difference integration in Visual Studio starting with the new Compare dialog.

 

New Compare Dialog

 

 

When invoked from the Source Control Explorer (SCE), the source and target folders are pre-filled. The source path is the selected path in SCE. The target path is the mapped local path, if available. Clicking the Browse buttons will bring up either the version control server folder browser or the local file system folder browser.

 

Also new in the compare dialog are the Filter combobox, the Filter local path only option, and the View options - quite similar to the "tf folderdiff" new command line options.

 

Filter Combobox

Semicolon delimited list of inclusion and exclusion filter masks. See "File and Folder Filter" below.

 

Filter Local Path Only Option

When checked, only the local paths will be filtered, unless the corresponding server path exists. If  unchecked, the filter is applied to both server and local paths.

 

View Options

These options tell Folder Difference what files to show in the result window.

Show items that exist only in source path

List only files that exist only in source directory will be included

Show items that exist only in target path

List only files that exist only in target directory will be included

Show items that are different

List only files with different content in both source and target directories will be included

Show items that are the same

List only files with the same content in both source and target directories will be included

 

The default is to list only the files that are different or missing.

 

File and Folder Filter

A filter is an ordered list of name masks that are used to match the name of files and folders to be compared.

 

Each mask can contain the wildcard characters ? and *. ? matches exactly one character and * matches zero or more characters. The masks in a filter are delimited by semicolons (;). Folder masks must end in backslash (\). To specify an exclusion mask, prefix the mask with an exclamation mark (!).

 

The filter is applied to the file and folder names using the following rules:

  • When both file and folder masks are specified together in a filter, the file masks are separated into a file mask list and the folder masks are separated into the folder mask list. File masks are only applied to file names. Folder masks are only applied to folder names.
  • When a file/folder name is being matched, the name is compared to each mask in the filter in the order that was specified. As soon as the name matches a mask, the name is considered to be a match.
  • If the file masks in the filter contains an inclusion mask, files that do not match any of the file masks are excluded.
  • If the file masks in the filter contains only exclusion masks, files that do not match any of the file masks are included.
  • If the folder masks in the filter contains an inclusion mask, folders that do not match any of the folder masks are excluded.
  • If the folder masks in the filter contains only exclusion masks, folders that do not match any of the folder masks are included.

 

Here are some examples:

*.cs;!objd\;!obj\;!bin\

Matches all C# files and excludes objd, obj, and bin directories

!*.resx;!*.ini;!resources\;!*junk*\

Excludes all resx and ini files as well as the resources folders and those having "junk" in the name

 

Next time, we'll talk about changes in the Folder Difference results window.

-Tan