Question

I want to generate the diff between two versions in TFS as a unified diff file. I do

tf diff $/TFSPATH/PROJECT/FOLDER /recursive /version:C12345~C12346 /format:unified

The generated output contains all the differences in files as I want to, but it also includes 4 additional lines for each folder it compares, even if there are no differences. So for a large project with few actual code changes between the given changesets, a diff file is generated consisting to 90+% of lines like:

Diff folder   : $/TFSPATH/PROJECT/FOLDER/SUB/SUB1;C12345
against folder: $/TFSPATH/PROJECT/FOLDER/SUB/SUB1;C12346 
===================================================================

Diff folder   : $/TFSPATH/PROJECT/FOLDER/SUB/SUB1/SUB;C12345
against folder: $/TFSPATH/PROJECT/FOLDER/SUB/SUB1/SUB;C12346 
===================================================================

Is there any way to tell tf to not include those lines?

Thanks

Was it helpful?

Solution

I dont' think this is available with tf.exe. Since the lines differ by the versionspec, I would recommend opening the file in Visual Studio and doing a search and replace with regular expressions. I tried the text you supplied and got 4 hits with the expression, ^.*/TFSPATH/PROJECT/FOLDER/.*;C\d{5}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top