You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Clemens Wehrmann <cl...@ciao-group.com> on 2006/06/19 20:30:27 UTC
merging from branches with deleted and readded (replaced) files
I'm hoping someone can help me understand what happens when merging changes
from a branch that contain deleted and later readded files. The merge seems
to work, but the commit fails, claming the file is out of date... I'm sure
this is a FAQ, but I didn't find it. How should this situation be handled?
Many thanks,
--clemens
server 1.2.3 (using apache2+mod_dav_svn.so) (also verified against local
1.3.1 file:/// repository)
client 1.3.1
server:
$ svnadmin create /svn/test
client:
$ svn co http://svn/test
Checked out revision 0.
$ mkdir -p branches/foo
$ svn add branches/
A branches
A branches/foo
$ svn ci -m,
Adding branches
Adding branches/foo
Committed revision 1.
$ mkdir -p branches/foo/dollop/dingle
$ echo foobar > branches/foo/dollop/dingle/stuff
$ svn add branches/foo/dollop
A branches/foo/dollop
A branches/foo/dollop/dingle
A branches/foo/dollop/dingle/stuff
$ svn ci -m,
Adding branches/foo/dollop
Adding branches/foo/dollop/dingle
Adding branches/foo/dollop/dingle/stuff
Transmitting file data .
Committed revision 2.
$ svn cp branches/foo branches/bar
A branches/bar
$ svn ci -m,
Adding branches/bar
Adding branches/bar/dollop
Committed revision 3.
$ cd foo/dollop/dingle/
$ echo banana >> stuff
$ svn ci -m,
Sending dingle/stuff
Transmitting file data .
Committed revision 4.
$ svn delete stuff
D stuff
$ svn ci -m,
Deleting dingle/stuff
Committed revision 5.
$ echo another one > stuff
$ svn add stuff
A stuff
$ svn ci -m,
Adding dingle/stuff
Transmitting file data .
Committed revision 6.
$ echo more and more >> stuff
$ svn ci -m,
Sending dingle/stuff
Transmitting file data .
Committed revision 7.
$ cd ../../../bar
$ svn up
At revision 7.
$ svn status -vu
7 2 clemens dollop/dingle
7 2 clemens dollop/dingle/stuff
7 3 clemens dollop
7 3 clemens .
Status against revision: 7
$ svn merge -r3:7 http://svn/test/branches/foo .
D dollop/dingle/stuff
A dollop/dingle/stuff
$ svn status -v
7 3 clemens .
7 3 clemens dollop
7 2 clemens dollop/dingle
R + - 7 clemens dollop/dingle/stuff
$ svn status -vu svn: REPORT request failed on '/svn/test/!svn/vcc/default'
svn: Working copy path 'dollop/dingle/stuff' does not exist in repository
$ svn diff dollop/dingle/stuff
$ svn ci -m,
Replacing bar/dollop/dingle/stuff
svn: Commit failed (details follow):
svn: Item '/branches/bar/dollop/dingle/stuff' is out of date
### update: Trying this against a local file:/// repository build with
### svnadmin 1.3.1 has the same issue. The error message is slightly
### different:
Replacing bar/dollop/dingle/stuff
svn: Commit failed (details follow):
svn: Out of date: '/branches/bar/dollop/dingle/stuff' in transaction '7-1'
$ svn diff dollop/dingle/stuff
$ ls dollop/dingle/stuff
dollop/dingle/stuff
$ svn status -v
7 3 clemens .
7 3 clemens dollop
7 2 clemens dollop/dingle
R + - 7 clemens dollop/dingle/stuff
$ svn up
svn: REPORT request failed on '/svn/test/!svn/vcc/default'
svn: Working copy path 'dollop/dingle/stuff' does not exist in repository
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: merging from branches with deleted and readded (replaced) files
Posted by Lieven Govaerts <lg...@mobsol.be>.
Quoting Clemens Wehrmann <cl...@ciao-group.com>:
> On Monday 19 June 2006 23:28, Lieven Govaerts wrote:
> > This looks like issue 2144:
> > http://subversion.tigris.org/issues/show_bug.cgi?id=2144 .
> >
> > The issue is solved and will be included in svn 1.4.
>
> Thank you very much for the information. Is there a work-around? Can I:
>
> a: safely use svn from 1.4.x branch to do just this merge or will it break
> my repo for older clients?
>
> b: tell svn not to include history with these file?
>
> c: it looks like I can't just revert these files (there's a revert bug
> mentioned in the ticket) after the merge and then contruct the diffs by hand?
>
> d: prevent those files from being part of the merge? (How to detect them?)
>
> --clemens
Clemens,
the workaround we use is to split up the merge in two parts:
If x is the revision in which the folder is added for the second time (in your
example that's revision 6 in which you add 'stuff' again):
Part 1: up to, but not including the add:
merge 3:x-1 source-branch .
commit .
Part 2: from the add up to head:
merge x:head source-branch .
commit .
hope this helps,
Lieven.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: merging from branches with deleted and readded (replaced) files
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/20/06, Clemens Wehrmann <cl...@ciao-group.com> wrote:
> On Monday 19 June 2006 23:28, Lieven Govaerts wrote:
> > This looks like issue 2144:
> > http://subversion.tigris.org/issues/show_bug.cgi?id=2144 .
> >
> > The issue is solved and will be included in svn 1.4.
>
> Thank you very much for the information. Is there a work-around? Can I:
>
> a: safely use svn from 1.4.x branch to do just this merge or will it break
> my repo for older clients?
It won't break your repo, but your working copy will only be usable
from a 1.4.x or newer client after you do the merge.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: merging from branches with deleted and readded (replaced) files
Posted by Clemens Wehrmann <cl...@ciao-group.com>.
On Monday 19 June 2006 23:28, Lieven Govaerts wrote:
> This looks like issue 2144:
> http://subversion.tigris.org/issues/show_bug.cgi?id=2144 .
>
> The issue is solved and will be included in svn 1.4.
Thank you very much for the information. Is there a work-around? Can I:
a: safely use svn from 1.4.x branch to do just this merge or will it break
my repo for older clients?
b: tell svn not to include history with these file?
c: it looks like I can't just revert these files (there's a revert bug
mentioned in the ticket) after the merge and then contruct the diffs by hand?
d: prevent those files from being part of the merge? (How to detect them?)
--clemens
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: merging from branches with deleted and readded (replaced) files
Posted by Lieven Govaerts <lg...@mobsol.be>.
This looks like issue 2144:
http://subversion.tigris.org/issues/show_bug.cgi?id=2144 .
The issue is solved and will be included in svn 1.4.
regards,
Lieven.
> -----Original Message-----
> From: Clemens Wehrmann [mailto:clemens.wehrmann@ciao-group.com]
> Sent: maandag 19 juni 2006 22:30
> To: users@subversion.tigris.org
> Subject: merging from branches with deleted and readded
> (replaced) files
>
> I'm hoping someone can help me understand what happens when
> merging changes from a branch that contain deleted and later
> readded files. The merge seems to work, but the commit
> fails, claming the file is out of date... I'm sure this is a
> FAQ, but I didn't find it. How should this situation be handled?
>
> Many thanks,
> --clemens
>
> server 1.2.3 (using apache2+mod_dav_svn.so) (also verified
> against local
> 1.3.1 file:/// repository)
> client 1.3.1
>
> server:
> $ svnadmin create /svn/test
>
> client:
>
> $ svn co http://svn/test
> Checked out revision 0.
>
> $ mkdir -p branches/foo
> $ svn add branches/
> A branches
> A branches/foo
> $ svn ci -m,
> Adding branches
> Adding branches/foo
>
> Committed revision 1.
>
> $ mkdir -p branches/foo/dollop/dingle
> $ echo foobar > branches/foo/dollop/dingle/stuff $ svn add
> branches/foo/dollop
> A branches/foo/dollop
> A branches/foo/dollop/dingle
> A branches/foo/dollop/dingle/stuff
> $ svn ci -m,
> Adding branches/foo/dollop
> Adding branches/foo/dollop/dingle
> Adding branches/foo/dollop/dingle/stuff
> Transmitting file data .
> Committed revision 2.
>
> $ svn cp branches/foo branches/bar
> A branches/bar
> $ svn ci -m,
> Adding branches/bar
> Adding branches/bar/dollop
>
> Committed revision 3.
>
> $ cd foo/dollop/dingle/
> $ echo banana >> stuff
> $ svn ci -m,
> Sending dingle/stuff
> Transmitting file data .
> Committed revision 4.
>
> $ svn delete stuff
> D stuff
> $ svn ci -m,
> Deleting dingle/stuff
>
> Committed revision 5.
>
> $ echo another one > stuff
> $ svn add stuff
> A stuff
> $ svn ci -m,
> Adding dingle/stuff
> Transmitting file data .
> Committed revision 6.
>
> $ echo more and more >> stuff
> $ svn ci -m,
> Sending dingle/stuff
> Transmitting file data .
> Committed revision 7.
>
> $ cd ../../../bar
> $ svn up
> At revision 7.
>
> $ svn status -vu
> 7 2 clemens dollop/dingle
> 7 2 clemens dollop/dingle/stuff
> 7 3 clemens dollop
> 7 3 clemens .
> Status against revision: 7
>
>
> $ svn merge -r3:7 http://svn/test/branches/foo .
> D dollop/dingle/stuff
> A dollop/dingle/stuff
>
> $ svn status -v
> 7 3 clemens .
> 7 3 clemens dollop
> 7 2 clemens dollop/dingle
> R + - 7 clemens dollop/dingle/stuff
> $ svn status -vu svn: REPORT request failed on
> '/svn/test/!svn/vcc/default'
> svn: Working copy path 'dollop/dingle/stuff' does not exist
> in repository
>
> $ svn diff dollop/dingle/stuff
>
> $ svn ci -m,
> Replacing bar/dollop/dingle/stuff
> svn: Commit failed (details follow):
> svn: Item '/branches/bar/dollop/dingle/stuff' is out of date
>
> ### update: Trying this against a local file:/// repository
> build with ### svnadmin 1.3.1 has the same issue. The error
> message is slightly ### different:
> Replacing bar/dollop/dingle/stuff
> svn: Commit failed (details follow):
> svn: Out of date: '/branches/bar/dollop/dingle/stuff' in
> transaction '7-1'
>
> $ svn diff dollop/dingle/stuff
> $ ls dollop/dingle/stuff
> dollop/dingle/stuff
>
> $ svn status -v
> 7 3 clemens .
> 7 3 clemens dollop
> 7 2 clemens dollop/dingle
> R + - 7 clemens dollop/dingle/stuff
> $ svn up
> svn: REPORT request failed on '/svn/test/!svn/vcc/default'
> svn: Working copy path 'dollop/dingle/stuff' does not exist
> in repository
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org