[Posting here as 'svn log --show-diff' is currently only available in trunk]

Hi All,

I am trying out 1.7.0 (yes, I know it's a bit early) and noticed that svn log 
now supports --show-diff. It's very convenient, thanks.

As the comments in the code explain, in case the path was created in some 
revision, the function will attempt to go one level up until it finds a parent 
that existed in both 'rev' and 'rev-1' revisions. This may result in LOTS of 
extra files - sometimes, the whole revision diff may be dumped. Consider what 
happens if the file being diff'ed originated as a part of 20Mb 'svn import'.

Judging from the commit message, this option should mimic 'git log -p' 
behavior, but git does not dump the whole diff by default when -p is 
specified. It only diffs the requested path and produces a full diff only if 
--full-diff option is also passed.

From http://www.kernel.org/pub/software/scm/git/docs/git-log.html

[[[
--full-diff 
 Without this flag, "git log -p <path>…" shows commits that touch the 
specified paths, and diffs about the same specified paths. With this, the full 
diff is shown for commits that touch the specified paths; this means that 
"<path>…" limits only commits, and doesn't limit diff for those commits.
]]]

Now, I understand this approach was chosen due to svn_client_diff5() returning 
an error if the path does not exist in the specified revision. So, first 
question is why svn_client_diff5() does not consider missing file as if it 
were an empty file? It does that thing when existing parent directory is 
diff'ed...

And, if svn_client_diff5() has valid reasons to produce an error in such case, 
why doesn't 'svn log --diff' just stop at that point, perhaps with some 
meaningful message that the specified file was created in that revision?

Regards,
Alexey.

Reply via email to