You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2014/06/03 16:14:19 UTC

reverse-merge fails to undo replacements

This problem can be seen in a public repository.
Paths which were replaced are not reverse-merged.
Is this intended behaviour or a bug?

svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk@42758 wc
cd wc

$ svn merge -c -42758 .
--- Reverse-merging r42758 into '.':
D    twisted/topfiles/6750.feature
$ svn log -r42758
------------------------------------------------------------------------
r42758 | wsanchez | 2014-06-03 07:25:58 +0200 (Tue, 03 Jun 2014) | 8 lines
Changed paths:
   R /trunk/docs/core/howto/listings/logger (from /branches/log-booyah-6750-4/docs/core/howto/listings/logger:42757)
   R /trunk/docs/core/howto/logger.rst (from /branches/log-booyah-6750-4/docs/core/howto/logger.rst:42757)
   R /trunk/twisted/python/_tzhelper.py (from /branches/log-booyah-6750-4/twisted/python/_tzhelper.py:42757)
   R /trunk/twisted/python/logger (from /branches/log-booyah-6750-4/twisted/python/logger:42757)
   R /trunk/twisted/python/test/test_tzhelper.py (from /branches/log-booyah-6750-4/twisted/python/test/test_tzhelper.py:42757)
   A /trunk/twisted/topfiles/6750.feature (from /branches/log-booyah-6750-4/twisted/topfiles/6750.feature:42757)

Merge log-booyah-6750-4: New logging system.

Author: wsanchez, glyph
Reviewer: ralphm
Fixes: #6750

New logging system: twisted.python.logger

------------------------------------------------------------------------

Re: reverse-merge fails to undo replacements

Posted by Julian Foad <ju...@btopenworld.com>.
Stefan Sperling wrote:
> Paths which were replaced are not reverse-merged.
> Is this intended behaviour or a bug?

The first key fact here is those replacements involve no change of content:

  $ svn log -r42758
  r42758 | [...]
  Changed paths:
     R /trunk/docs/core/howto/listings/logger (from /branches/log-booyah-6750-4/docs/core/howto/listings/logger:42757)
    [...]

  $ svn diff -c 42758 ^/trunk/docs
  [no output]

The second key fact is that the replacement is related to the replaced node. That is, I suppose, the reason that even the "notice ancestry" mode of diff shows no replacement:

  $ svn diff -c 42758 --notice-ancestry ^/trunk/docs
  [no output]

I'm not sure exactly what the relationship is, in terms of which was copied from what at what revision -- I haven't checked -- but there's some copied-from relationship there.

The changes that "merge" applies are generally meant to be the same 
changes that "diff --notice-ancestry" shows. In that respect, "merge" is
working consistently with "diff".

As the merge is behaving like diff, I can't see a bug here unless there is some further inconsistency to be found.

I haven't tried the corresponding forward merge, but I presume it would also do nothing, just like the reverse merge.

I admit it's odd that "log -v" shows a replacement but "diff --notice-ancestry" doesn't; but that's a rather different issue.

- Julian


> svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk@42758 wc
> cd wc
> 
> $ svn merge -c -42758 .
> --- Reverse-merging r42758 into '.':
> D    twisted/topfiles/6750.feature
> $ svn log -r42758
> ------------------------------------------------------------------------
> r42758 | wsanchez | 2014-06-03 07:25:58 +0200 (Tue, 03 Jun 2014) | 8 lines
> Changed paths:
>    R /trunk/docs/core/howto/listings/logger (from 
> /branches/log-booyah-6750-4/docs/core/howto/listings/logger:42757)
[...]