You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ignacy Gawedzki <sv...@qult.net> on 2005/04/03 02:34:00 UTC
Is merge broken?
Hi,
I just had some trouble merging a branch back to the trunk. I isolated the
problem which can be reproduced this way:
I created and committed a trunk with the following layout (r1)
trunk
trunk/bar
trunk/bar/somefile.txt
trunk/foo
trunk/foo/bar
trunk/foo/bar/someotherfile.txt
Then I copied the trunk into a branch (r2)
svn cp trunk somebranch
svn ci -m "created branch"
Now, working on the branch I decide to delete bar/somefile.txt (r3)
svn rm somebranch/bar/somefile.txt
svn ci -m "deleted somefile.txt"
Then, I decide that after all, the empty directory is useless (r4)
svn rm somebranch/bar
svn up
svn ci -m "deleted empty bar"
Finally, I want to put foo/bar one directory up (r5)
svn mv somebranch/foo/bar somebranch
svn ci -m "moved bar from foo to root"
Suppose now I want to merge the branch with the trunk
svn up
svn merge -r3:5 somebranch trunk
This is what I get
D trunk/foo/bar/someotherfile.txt
D trunk/foo/bar
D trunk/bar/somefile.txt
D trunk/bar
svn: URL 'file:///opt/svn/someproject/somebranch/bar' doesn't match existing URL 'file:///opt/svn/someproject/trunk/bar' in 'trunk/bar'
If I try to merge with the --ignore-ancestry option, then bar/somefile.txt
isn't deleted...
--
P.S. All information contained in the above letter is false,
for reasons of military security.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Is merge broken?
Posted by Ignacy Gawedzki <sv...@qult.net>.
On Sun, Apr 03, 2005 at 08:41:57AM -0500, thus spake Ben Collins-Sussman:
>
> On Apr 3, 2005, at 5:35 AM, Ignacy Gawedzki wrote:
>
> >On Sat, Apr 02, 2005 at 10:04:27PM -0600, thus spake Ben
> >Collins-Sussman:
> >>
> >>On Apr 2, 2005, at 8:34 PM, Ignacy Gawedzki wrote:
> >>
> >>>
> >>> svn merge -r3:5 somebranch trunk
> >>>
> >>
> >>You want to compare the inital and final snapshots of the branch;
> >>you're not doing that. The initial branch state is in r2, not r3.
> >
> >I just tried that and it spits exactly the same error.
> >
>
> What version of svn? Can you send us a script that demonstrates the
> error?
Here is the script :
Script started on Sun Apr 3 16:57:18 2005
ig@zedwan:~ % svn --version
svn, version 1.1.3 (r12730)
compiled Mar 20 2005, 05:31:14
Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository access (RA) modules are available:
* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' schema
- handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
- handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' schema
ig@zedwan:~ % svnadmin create /opt/svn/someproject
ig@zedwan:~ % svn co file:///opt/svn/someproject
Checked out revision 0.
ig@zedwan:~ % cd someproject
ig@zedwan:...project % mkdir -p trunk/foo/bar trunk/bar
ig@zedwan:...project % touch trunk/bar/somefile.txt
ig@zedwan:...project % touch trunk/foo/bar/someotherfile.txt
ig@zedwan:...project % svn add trunk
A trunk
A trunk/foo
A trunk/foo/bar
A trunk/foo/bar/someotherfile.txt
A trunk/bar
A trunk/bar/somefile.txt
ig@zedwan:...project % svn ci -m "init import"
Adding trunk
Adding trunk/bar
Adding trunk/bar/somefile.txt
Adding trunk/foo
Adding trunk/foo/bar
Adding trunk/foo/bar/someotherfile.txt
Transmitting file data ..
Committed revision 1.
ig@zedwan:...project % svn cp trunk somebranch
A somebranch
ig@zedwan:...project % svn ci -m "created branch"
Adding somebranch
Committed revision 2.
ig@zedwan:...project % svn rm somebranch/bar/somefile.txt
D somebranch/bar/somefile.txt
ig@zedwan:...project % svn ci -m "deleted somefile.txt"
Deleting somebranch/bar/somefile.txt
Committed revision 3.
ig@zedwan:...project % svn rm somebranch/bar
D somebranch/bar
ig@zedwan:...project % svn ci -m "deleted empty bar"
Deleting somebranch/bar
svn: Commit failed (details follow):
svn: Out of date: '/somebranch/bar' in transaction '4'
ig@zedwan:...project % svn up
At revision 3.
ig@zedwan:...project % svn ci -m "deleted empty bar"
Deleting somebranch/bar
Committed revision 4.
ig@zedwan:...project % svn mv somebranch/foo/bar somebranch
A somebranch/bar
D somebranch/foo/bar/someotherfile.txt
D somebranch/foo/bar
ig@zedwan:...project % svn ci -m "moved foo/bar to /"
Adding somebranch/bar
Deleting somebranch/foo/bar
Committed revision 5.
ig@zedwan:...project % svn up
At revision 5.
ig@zedwan:...project % svn log --verbose --stop-on-copy somebranch
------------------------------------------------------------------------
r5 | ig | 2005-04-03 17:00:18 +0200 (Sun, 03 Apr 2005) | 1 line
Changed paths:
A /somebranch/bar (from /somebranch/foo/bar:3)
D /somebranch/foo/bar
moved foo/bar to /
------------------------------------------------------------------------
r4 | ig | 2005-04-03 16:59:41 +0200 (Sun, 03 Apr 2005) | 1 line
Changed paths:
D /somebranch/bar
deleted empty bar
------------------------------------------------------------------------
r3 | ig | 2005-04-03 16:59:25 +0200 (Sun, 03 Apr 2005) | 1 line
Changed paths:
D /somebranch/bar/somefile.txt
deleted somefile.txt
------------------------------------------------------------------------
r2 | ig | 2005-04-03 16:59:04 +0200 (Sun, 03 Apr 2005) | 1 line
Changed paths:
A /somebranch (from /trunk:1)
created branch
------------------------------------------------------------------------
ig@zedwan:...project % svn merge -r2:5 somebranch trunk
D trunk/foo/bar/someotherfile.txt
D trunk/foo/bar
D trunk/bar/somefile.txt
D trunk/bar
svn: URL 'file:///opt/svn/someproject/somebranch/bar' doesn't match existing URL 'file:///opt/svn/someproject/trunk/bar' in 'trunk/bar'
ig@zedwan:...project %
Script done on Sun Apr 3 17:01:12 2005
--
Information wants to be beer, or something like that.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Is merge broken?
Posted by Ben Collins-Sussman <su...@collab.net>.
On Apr 3, 2005, at 5:35 AM, Ignacy Gawedzki wrote:
> On Sat, Apr 02, 2005 at 10:04:27PM -0600, thus spake Ben
> Collins-Sussman:
>>
>> On Apr 2, 2005, at 8:34 PM, Ignacy Gawedzki wrote:
>>
>>>
>>> svn merge -r3:5 somebranch trunk
>>>
>>
>> You want to compare the inital and final snapshots of the branch;
>> you're not doing that. The initial branch state is in r2, not r3.
>
> I just tried that and it spits exactly the same error.
>
What version of svn? Can you send us a script that demonstrates the
error?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Is merge broken?
Posted by Ignacy Gawedzki <sv...@qult.net>.
On Sat, Apr 02, 2005 at 10:04:27PM -0600, thus spake Ben Collins-Sussman:
>
> On Apr 2, 2005, at 8:34 PM, Ignacy Gawedzki wrote:
>
> >
> > svn merge -r3:5 somebranch trunk
> >
>
> You want to compare the inital and final snapshots of the branch;
> you're not doing that. The initial branch state is in r2, not r3.
I just tried that and it spits exactly the same error.
--
ouaou! fait le ouaou.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Is merge broken?
Posted by Ben Collins-Sussman <su...@collab.net>.
On Apr 2, 2005, at 8:34 PM, Ignacy Gawedzki wrote:
>
> svn merge -r3:5 somebranch trunk
>
You want to compare the inital and final snapshots of the branch;
you're not doing that. The initial branch state is in r2, not r3.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org