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

Double file entries after merge of moves/refactoring; possible bug?

From: Hermanns, Horst <h.hermanns_at_telekom.de>
Date: Wed, 17 Jun 2009 10:38:34 +0200

Hi,

after merging changes from one branch to another we detected moved files
were located in the old and new path.

We made following changes on Branch1:
 - Create dir1 with file1 -> commit/Rev1
 - Create dir2 in dir1 and mv file1 to dir2 -> commit/Rev2

Afterwards we merged this changes to Branch2 in 2 Rev-ranges (p.e.
-r142:143, -r143:144).
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 is located in old and new directory. A new
checkout contains file1 at both locations.

We are merging in 2 rev-ranges due to our merge tracking tool. The
sequently rev-ranges are just an example.

Could this be bug?

Regards
Horst

------------------------------------------------------------------------
-------------------
- Changes on Branch1
 - Create dir1 with file1 -> commit
 - Create dir2 in dir1 and mv file1 to dir2 -> commit
 
# svn mkdir dir1
A dir1

# cd dir1
# date > file1

# svn add file1
A file1

# cd ..
svn ci -m "Commit new file1" .
Adding dir1
Adding dir1\file1
Transmitting file data .
Committed revision 143.

# cd dir1
# svn mkdir dir2
A dir2

# svn mv file1 dir2
A dir2\file1
D file1

# svn status
D file1
A dir2
A + dir2\file1

# svn ci -m"relocated file1 to dir2" .
Adding dir1\dir2
Adding dir1\dir2\file1
Deleting dir1\file1
Committed revision 144.

- Merging changes to branch2
 - merge changes in 2 revision ranges (142:143, 143:144)
 - due to status/commit/log/WC everythings fine (only one file 'file1'
in dir2), but after commit
   in the repository the file is located in old and new directory
 
# svn merge --force -r142:143 https://...bra1 .
--- Merging r143 into '.':
A dir1
A dir1\file1

# svn merge --force -r143:144 https://...bra1 .
--- Merging r144 into '.':
A dir1\dir2
A dir1\dir2\file1
D dir1\file1

# svn status
 M .
A + dir1
A + dir1\dir2
A + dir1\dir2\file1

# svn ci -m "Commit merge results" .
Sending .
Adding dir1
Adding dir1\dir2
Adding dir1\dir2\file1

Committed revision 145.

# svn log -r145 -vq
------------------------------------------------------------------------
r145 | | 2009-06-17 09:35:15 +0200 (Mi, 17 Jun 2009)
Changed paths:
   M /branches/bra2
   A /branches/bra2/dir1 (from /branches/bra1/dir1:143)
   A /branches/bra2/dir1/dir2 (from /branches/bra1/dir1/dir2:144)
   R /branches/bra2/dir1/dir2/file1 (from
/branches/bra1/dir1/dir2/file1:144)
------------------------------------------------------------------------

# svn list https://...bra2/dir1
dir2/
file1 (!old location)

# svn list https://...bra2/dir1/dir2
file1 (new location)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2362709

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-17 10:42:05 CEST

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