List all files which are changed b/w two revision by a user

前端 未结 1 596
北海茫月
北海茫月 2021-01-25 14:10
svn diff -r16369:HEAD --summarize

Above command list all files which are changed b/w two revision.

But can i find all which which are changed a

相关标签:
1条回答
  • 2021-01-25 14:28

    Use the search feature of log:

    svn log -r16369:HEAD --search sherkhan -v
    

    That might find revisions where sherkhan is mentioned in the log and isn't just the committer.

    But you could write a script to filter those if you really wanted. Or you could use --xml and write xslt. Or you could use the bindings to write a program to do the searching.

    I guess what you want to depends on how often you're going to use this and what your goals are. But this should at least get you started.

    XSLT example

    For the hell of it I went ahead and produced an XSLT example

    With the following in user-changed-paths.xslt:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="user"/>
    <xsl:output method="text" omit-xml-declaration="yes" />
    <xsl:template match="/">
    <xsl:for-each select="log/logentry">
    <xsl:if test="author=$user">
    <xsl:for-each select="paths/path">
    <xsl:value-of select="." /><xsl:text>&#xa;</xsl:text>
    </xsl:for-each>
    </xsl:if>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    

    Then run the following command:

    svn log -r16369:HEAD --search sherkhan -v --xml | xsltproc --stringparam user sherkhan user-changed-paths.xslt - | sort -u

    0 讨论(0)
提交回复
热议问题