svn diff -c: Omitting copied files?
If I copy a file in the repository using the svn copy command, the "svn diff -c" command will show all lines of the copied files. How can I omit copied files from showing in the diff?
开发者_开发知识库If I view the changeset of the revision in Trac for example, no diff is shown (just says the file is copied).
This is the command I use: svn diff -c REVISION SVNURL --username USERNAME --password PASSWORD
Thanks in advance!
Here is a solution that requires a bit of programming:
svn log URL -c REVISION --xml -v
With this command you have a clear indication of what was copied. You can then parse the XML output and use it to filter the output of svn diff -c
Example of output:
<?xml version="1.0" encoding="UTF-8"?>
<log>
<logentry
revision="REVISION">
<author>EMAIL</author>
<date>YYYY-MM-DDTHH:MM:SS.UUUUUUZ</date>
<paths>
<path
copyfrom-path="/OLD_PATH"
copyfrom-rev="OLDER_REVISION"
action="A"
prop-mods="false"
text-mods="false"
kind="dir">/NEW_PATH</path>
</paths>
<msg>Copy a file</msg>
</logentry>
</log>
Related question.
精彩评论