How do you get the history of a file/folder property in SVN?

后端 未结 5 574
悲哀的现实
悲哀的现实 2021-01-01 13:07

What\'s the easiest way to determine when a property was set on a file or folder? Basically, I\'m looking for an equivalent of \"svn blame\" that works on properties.

<
5条回答
  •  心在旅途
    2021-01-01 13:20

    One way to get a list of when properties for a given folder has changed is:

    svn log -v . |grep "   M /trunk/datacenter$" -B2
    

    Which gives the following output:

    r963 | someuser | 2013-08-26 20:32:37 +0200 (Mon, 26 Aug 2013) | 4 lines
    Changed paths:
       M /trunk/datacenter
    --
    r908 | someotheruser | 2013-08-15 12:15:03 +0200 (Thu, 15 Aug 2013) | 1 line
    Changed paths:
       M /trunk/datacenter
    --
    r413 | someuser | 2013-04-26 09:02:08 +0200 (Fri, 26 Apr 2013) | 1 line
    Changed paths:
       M /trunk/datacenter
    

    Then you can look at each revision to see what changed:

    $ svn diff -c963
    

    at the bottom:

    ...
    
    Property changes on: .
    ___________________________________________________________________
    Modified: svn:ignore
    ## -22,3 +22,5 ##
    
     .idea
     .classpath
    +
    +dev-config.groovy
    

    Cons:

    • No way to specify which property you're interested in
    • Tedious

    Note: not sure -B2 is sufficient in all cases, as the line " M /trunk/datacenter" might not be the first line

提交回复
热议问题