[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Double file entries in repository after merge of changes (moved file) from one branch to another

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 19 Jun 2009 14:02:19 +0100

On Fri, Jun 19, 2009 at 02:08:31PM +0200, Hermanns, Horst wrote:
> Hi,
>
> we still could not solve a problem already discussed under:
> http://subversion.tigris.org/ds/viewMessage.do?dsMessageId=2362709&dsForumId=1065
>
> I could not find a similar problem in the bug tracker, so I would like
> to ask a developer to have a look on it.
>
> We merged changes (creation and move of a file) from one branch to
> another. Due to our mergeinfo properties we divided the merge in two
> merge steps/rev-ranges (without commit in between). Afterwards we
> committed the result of both merges.
>
> Example (Test Script see below):
> - Branch1, Create dir1 with file1 -> commit/Rev1
> - Branch1, Create dir2 in dir1 and mv file1 to dir2 -> commit/Rev2
>
> - Branch2, svn merge -r....:Rev1 <Branch1> .
> - Branch2, svn merge -rRev1:Rev2 <Branch1> .
> - Branch2, svn ci ...
>
> Due to status/commit/log output and WC everythings fine (finally only
> one file 'file1' in dir2 was shown), but after commit in the repository
> the file 'file1' is located in old and new directory. A new checkout
> contains file1 at both locations.
>
> The problem occurcs only if we merge in 2 steps and don't commit between
> the both steps.
> Is this procedure ok or do we have to commit between each merge? I
> thought 'svn merge' also splits rev ranges depending on the mergeinfo
> properties.
>
> We tested this behavior in several environments:
> SVN Client, 1.5.6/1.6.2 (Windows JavaHL, precompiled Tigris.org
> Apache 2.2)
> SVN Server, 1.5.5/1.6.2 (Linux-Server, compiled with gcc 4.1.0,
> Apache 2.2.11 with mod_dav_svn)
> Repository format FSFS
>

Thank you for your script!
It makes it so much easier to understand what the problem is.
Now we just need to find out where the problem is :)

First sign of relief: With trunk, I get the desired behaviour
when running your script:

  Log, should only have one entry for file1
  ------------------------------------------------------------------------
  r6 | stsp | 2009-06-19 13:52:23 +0100 (Fri, 19 Jun 2009)
  Changed paths:
     M /branches/B
     A /branches/B/dir1 (from /branches/A/dir1:4)
     A /branches/B/dir1/dir2 (from /branches/A/dir1/dir2:5)
     D /branches/B/dir1/file1
  ------------------------------------------------------------------------
  
  old location dir1, there should be no file1
  dir2/
  new location dir1/dir2, there should be a file1
  file1

With 1.6.x, I can see the bug:

  Log, should only have one entry for file1
  ------------------------------------------------------------------------
  r6 | stsp | 2009-06-19 13:59:09 +0100 (Fri, 19 Jun 2009)
  Changed paths:
     M /branches/B
     A /branches/B/dir1 (from /branches/A/dir1:4)
     A /branches/B/dir1/dir2 (from /branches/A/dir1/dir2:5)
  ------------------------------------------------------------------------
  
  old location dir1, there should be no file1
  dir2/
  file1
  new location dir1/dir2, there should be a file1
  file1

> Any suggestions?

If you can, please file a new issue which points to this mailing list
thread. I will try to take a look at this when I find some time.
If you cannot file an issue for some reason, let me know, I will file one.

Thanks,
Stefan
Received on 2009-06-19 15:02:41 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.