Svn diff to output all lines from files

后端 未结 2 1599
深忆病人
深忆病人 2021-02-05 16:10

I\'ve been searching for a while and still can\'t find a simple solution to this problem I have. I want to produce a diff between two revisions of a file but I want the

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-05 16:31

    Perhaps the following is close to what you want:

    First, create a diff script that will use the args received from svn appropriately:

    #!/bin/sh
    # file : /usr/local/bin/mydiff
    
    # assumes less that 10,000 lines per file
    /usr/bin/diff -U10000 $6 $7
    

    And then diff with svn:

    svn diff --diff-cmd /usr/local/bin/mydiff
    

    If you want to more closely customize the diff output you need only modify your mydiff script.

提交回复
热议问题