You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2008/10/12 23:23:44 UTC

Re: svn commit: r33597 - branches/diff-repos-wc/subversion/libsvn_client

On Sun, 2008-10-12 at 05:12 +0200, Neels J. Hofmeyr wrote:
> This is a summary for those interested in discovering scores of broken diff
> cases (on trunk, marked "*** NOTE") or in the current state of summarizing
> diff re- implementation, and otherwise just a note to myself.

Hi Neels.

I fixed diff_tests-45 on this branch.

The next thing I looked at, to get more of the tests working, is the way
it accidentally prints a double path "path/to/diff/path/to/diff" for
each node:

[[[
$ svn diff --summarize -c33597 subversion/libsvn_client/
[...]
M      subversion/libsvn_client/subversion/libsvn_client/diff.c
]]]

The attached patch solves this for WC paths, but it also makes URLs be
printed as relative to the target specified in the command:

[[[
$ svn diff -c33598 $SVN_REPOS/branches/diff-repos-wc/subversion
Index: libsvn_client/diff.c
===================================================================
--- libsvn_client/diff.c     (revision 33597)
+++ libsvn_client/diff.c     (revision 33598)
]]]

Pros: this is neat, and it is what plain "svn diff" does.
Cons: this is ambiguous with multiple targets, and is an unnecessary
change in behaviour.

The previous (trunk, svn-1.5.3) behaviour for a repos:repos change is:

  diff (normal):     Paths relative to CWD. URLs relative to TARGET.
  diff --summarize:  Paths relative to CWD. URLs ABSOLUTE.

I think we should keep that set of behaviours unchanged, at least for
now while we are extending "diff --summarize". I don't think we will
want to change "summarize" to print TARGET-relative URLs like plain
"diff" does. If we want to change plain diff to print absolute URLs like
"summarize" does, that is a separate issue.

So, my patch is no good.

- Julian


on branch diff-repos-wc: summarizing diff path failures

Posted by Neels J Hofmeyr <ne...@elego.de>.
Just for interest, the cases where the node paths are printed wrongly:

Paths are actually wrong for *all* of repos-wc, repos-repos and wc-wc, other
than previously assumed.

~Neels


===== repos-wc =====

svn diff --summarize \
--old=file:////arch/hg/svn-tc/test/repos/foo/modified_file \
--new=quux/modified_file
M      file:///[...]/repos/foo/modified_file/quux/modified_file

===== repos-repos =====

svn diff --summarize \
--old=file:////arch/hg/svn-tc/test/repos/foo/modified_file@2 \
--new=file:////arch/hg/svn-tc/test/repos/quux/modified_file@3
M      file:///[...]/repos/foo/modified_file/modified_file

===== wc-wc =====

svn diff --summarize --old=quux/modified_file --new=quux/modified_file
M      quux/modified_file/quux/modified_file


-- 
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696  mobile: +49 177 2345869  fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194