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:
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