简体   繁体   中英

tf diff /recursive /format:unified - how to not include folder names in output

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

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}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM