How to use Team Foundation's library to calculate unified diff?

前端 未结 2 2188
不知归路
不知归路 2021-02-19 16:17

I want to calculate a unified diff comparing two documents. (The diff is to go in an email, and Wikipedia says unified diff is the best plain text diff format.)

Team Fo

相关标签:
2条回答
  • 2021-02-19 16:51

    Guess it's not possible :( You can only do this from the command line with tf.exe.

    0 讨论(0)
  • 2021-02-19 16:58

    Please try DiffSegment

            var diff = Difference.DiffFiles(
            before, FileType.Detect(before, null),
            after, FileType.Detect(after, null),
            options);
    
            while (diff != null){                
                //DO What you like with the diff(s)
                diff = diff.Next;
            }
    
    0 讨论(0)
提交回复
热议问题