You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Joel Low <jo...@joelsplace.sg> on 2012/02/25 04:38:12 UTC

Cannot merge into mixed-revision working copy

Hello,

I'm trying to do a remote-URL/remote-URL merge (for vendor drops) into my working copy which contains externals (for the binaries). When both are updated to HEAD and I try to do the merge, I get this error message. I've tried using --force, but that seems to work once, but subsequently the merge will still fail with the same error. I've resorted to explicitly updating my external to the same revision as the rest of the WC before merge proceeds.

Is there a cleaner way around this or am I doing something wrong?

Regards,
Joel


Re: Cannot merge into mixed-revision working copy

Posted by Daniel Shahaf <da...@elego.de>.
Joel Low wrote on Sat, Feb 25, 2012 at 20:42:08 +0800:
> I've spent quite a bit of time trying to come up with a reproducible
> scenario but I can't come up with anything (similar to what you came
> up with, as close as I could with my set up). I do note that running
> svnversion yields 926:1307MS, even after running svn update and svn st
> doesn't show modified files, so I've just trashed the working copy and
> did a fresh checkout. I'll just assume that my WC was corrupt -- I'll
> try the merge and come back to this thread again if there are any
> further problems.
> 
> Thanks for your help Daniel!
> 
> Joel

Sounds good, thanks for your persistence.  If you can figure out how to
reproduce the merge errors, or the svnversion-v.-'svn st' inconsistency,
please do let us know.

For future reference, when `svnversion` reports 'S' ('switched'), the
way to undo it is with something like
  % svn switch $(svn info $wc | sed -ne 's/^URL: //p') $wc
or in English: run 'svn switch $URL' where $URL is whatever 'svn info'
prints.

Cheers,

Daniel

RE: Cannot merge into mixed-revision working copy

Posted by Joel Low <jo...@joelsplace.sg>.

> -----Original Message-----
> From: Daniel Shahaf [mailto:danielsh@elego.de]
> Sent: Saturday, 25 February, 2012 1:40 PM
> To: Joel Low
> Cc: users@subversion.apache.org
> Subject: Re: Cannot merge into mixed-revision working copy
> 
> Joel Low wrote on Sat, Feb 25, 2012 at 13:17:20 +0800:
> > Hi Daniel,
> >
> > > -----Original Message-----
> > > From: Daniel Shahaf [mailto:danielsh@elego.de]
> > > Sent: Saturday, 25 February, 2012 12:38 PM
> > > To: Joel Low
> > > Cc: users@subversion.apache.org
> > > Subject: Re: Cannot merge into mixed-revision working copy
> > >
> > > Daniel Shahaf wrote on Sat, Feb 25, 2012 at 06:08:17 +0200:
> > > > --allow-mixed-revisions,
> > >
> > > (This is an argument to 'svn merge'.)
> > >
> > > > but the code shouldn't care about the revision of the external
> for
> > > the
> > > > purposes of this check.
> > > >
> > > > Can you provide a reproduction recipe, starting from an empty
> > > > repository?  In a quick test I couldn't trigger the error you
> > > describe.
> > > >
> > > > http://subversion.apache.org/docs/community-
> guide/issues#reporting
> > > > -
> > > bug
> > > > s
> > I'll try to make a repro case: it may very well be a corrupt WC since
> this WC has been around since 1.7 was under dev status. If it is of any
> significance, however, the external is from within the same repository,
> which could be the reason behind the confusion.
> >
> 
> Still can't reproduce it:
> 
> % ./new.sh >/dev/null
> % cd wc1
> % $svn cp -q trunk branch
> % $svn ps -q k v branch
> % $svn ci -q -m r3
> % $svn ps -q svn:externals '^/branch branch' trunk % $svn ci -q -m r4 %
> $svn up -q % $svnversion trunk
> 4
> % $svn up -q -r3 trunk/iota
> % $svnversion trunk
> 3:4
> % $svn up -q -r3 trunk/A
> % $svnversion trunk
> 3:4
> % $svn  up -q -r3 --depth=empty trunk
> % $svnversion trunk
> 3
> % $svn merge -c r3 ^/branch trunk
> --- Merging r3 into 'trunk':
>  U   trunk
> --- Recording mergeinfo for merge of r3 into 'trunk':
>  U   trunk
> % $svnversion trunk/branch
> 4
> % $svnversion trunk
> 3M
> %
> 
> Here, $svn points to a trunk@HEAD build, and new.sh creates a
> repository with one revision and the following contents:
> 
> trunk/
> trunk/A/
> trunk/A/B/
> trunk/A/B/lambda
> trunk/A/B/E/
> trunk/A/B/E/alpha
> trunk/A/B/E/beta
> trunk/A/B/F/
> trunk/A/mu
> trunk/A/C/
> trunk/A/D/
> trunk/A/D/gamma
> trunk/A/D/G/
> trunk/A/D/G/pi
> trunk/A/D/G/rho
> trunk/A/D/G/tau
> trunk/A/D/H/
> trunk/A/D/H/chi
> trunk/A/D/H/omega
> trunk/A/D/H/psi
> trunk/iota
> branches/
> tags/
> 
> > > >
> > > > Thanks
> > > >
> > > > Daniel
> > > >
> >

I've spent quite a bit of time trying to come up with a reproducible scenario but I can't come up with anything (similar to what you came up with, as close as I could with my set up). I do note that running svnversion yields 926:1307MS, even after running svn update and svn st doesn't show modified files, so I've just trashed the working copy and did a fresh checkout. I'll just assume that my WC was corrupt -- I'll try the merge and come back to this thread again if there are any further problems.

Thanks for your help Daniel!

Joel

Re: Cannot merge into mixed-revision working copy

Posted by Daniel Shahaf <da...@elego.de>.
Joel Low wrote on Sat, Feb 25, 2012 at 13:17:20 +0800:
> Hi Daniel,
> 
> > -----Original Message-----
> > From: Daniel Shahaf [mailto:danielsh@elego.de]
> > Sent: Saturday, 25 February, 2012 12:38 PM
> > To: Joel Low
> > Cc: users@subversion.apache.org
> > Subject: Re: Cannot merge into mixed-revision working copy
> > 
> > Daniel Shahaf wrote on Sat, Feb 25, 2012 at 06:08:17 +0200:
> > > --allow-mixed-revisions,
> > 
> > (This is an argument to 'svn merge'.)
> > 
> > > but the code shouldn't care about the revision of the external for
> > the
> > > purposes of this check.
> > >
> > > Can you provide a reproduction recipe, starting from an empty
> > > repository?  In a quick test I couldn't trigger the error you
> > describe.
> > >
> > > http://subversion.apache.org/docs/community-guide/issues#reporting-
> > bug
> > > s
> I'll try to make a repro case: it may very well be a corrupt WC since this WC has been around since 1.7 was under dev status. If it is of any significance, however, the external is from within the same repository, which could be the reason behind the confusion.
> 

Still can't reproduce it:

% ./new.sh >/dev/null          
% cd wc1
% $svn cp -q trunk branch
% $svn ps -q k v branch
% $svn ci -q -m r3 
% $svn ps -q svn:externals '^/branch branch' trunk 
% $svn ci -q -m r4 
% $svn up -q 
% $svnversion trunk
4
% $svn up -q -r3 trunk/iota
% $svnversion trunk     
3:4
% $svn up -q -r3 trunk/A
% $svnversion trunk     
3:4
% $svn  up -q -r3 --depth=empty trunk 
% $svnversion trunk                
3
% $svn merge -c r3 ^/branch trunk 
--- Merging r3 into 'trunk':
 U   trunk
--- Recording mergeinfo for merge of r3 into 'trunk':
 U   trunk
% $svnversion trunk/branch
4
% $svnversion trunk       
3M
% 

Here, $svn points to a trunk@HEAD build, and new.sh creates a repository
with one revision and the following contents:

trunk/
trunk/A/
trunk/A/B/
trunk/A/B/lambda
trunk/A/B/E/
trunk/A/B/E/alpha
trunk/A/B/E/beta
trunk/A/B/F/
trunk/A/mu
trunk/A/C/
trunk/A/D/
trunk/A/D/gamma
trunk/A/D/G/
trunk/A/D/G/pi
trunk/A/D/G/rho
trunk/A/D/G/tau
trunk/A/D/H/
trunk/A/D/H/chi
trunk/A/D/H/omega
trunk/A/D/H/psi
trunk/iota
branches/
tags/

> > >
> > > Thanks
> > >
> > > Daniel
> > >
> 

RE: Cannot merge into mixed-revision working copy

Posted by Joel Low <jo...@joelsplace.sg>.
Hi Daniel,

> -----Original Message-----
> From: Daniel Shahaf [mailto:danielsh@elego.de]
> Sent: Saturday, 25 February, 2012 12:38 PM
> To: Joel Low
> Cc: users@subversion.apache.org
> Subject: Re: Cannot merge into mixed-revision working copy
> 
> Daniel Shahaf wrote on Sat, Feb 25, 2012 at 06:08:17 +0200:
> > --allow-mixed-revisions,
> 
> (This is an argument to 'svn merge'.)
> 
> > but the code shouldn't care about the revision of the external for
> the
> > purposes of this check.
> >
> > Can you provide a reproduction recipe, starting from an empty
> > repository?  In a quick test I couldn't trigger the error you
> describe.
> >
> > http://subversion.apache.org/docs/community-guide/issues#reporting-
> bug
> > s
I'll try to make a repro case: it may very well be a corrupt WC since this WC has been around since 1.7 was under dev status. If it is of any significance, however, the external is from within the same repository, which could be the reason behind the confusion.

> >
> > Thanks
> >
> > Daniel
> >


Re: Cannot merge into mixed-revision working copy

Posted by Daniel Shahaf <da...@elego.de>.
Daniel Shahaf wrote on Sat, Feb 25, 2012 at 06:08:17 +0200:
> --allow-mixed-revisions,

(This is an argument to 'svn merge'.)

> but the code shouldn't care about the revision
> of the external for the purposes of this check.
> 
> Can you provide a reproduction recipe, starting from an empty
> repository?  In a quick test I couldn't trigger the error you describe.
> 
> http://subversion.apache.org/docs/community-guide/issues#reporting-bugs
> 
> Thanks
> 
> Daniel
> 
> Joel Low wrote on Sat, Feb 25, 2012 at 11:38:12 +0800:
> > Hello,
> > 
> > I'm trying to do a remote-URL/remote-URL merge (for vendor drops) into my working copy which contains externals (for the binaries). When both are updated to HEAD and I try to do the merge, I get this error message. I've tried using --force, but that seems to work once, but subsequently the merge will still fail with the same error. I've resorted to explicitly updating my external to the same revision as the rest of the WC before merge proceeds.
> > 
> > Is there a cleaner way around this or am I doing something wrong?
> > 
> > Regards,
> > Joel
> > 

RE: Fwd: Cannot merge into mixed-revision working copy

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Stefan Sperling [mailto:stsp@elego.de]
> Sent: zaterdag 25 februari 2012 16:22
> To: Mark Phippard
> Cc: Subversion Development
> Subject: Re: Fwd: Cannot merge into mixed-revision working copy
> 
> On Sat, Feb 25, 2012 at 09:53:09AM -0500, Mark Phippard wrote:
> > This email on users@ made me realize we have not added this option in
> > Subclipse.  Looking at the JavaHL source it looks like it has not been
> > exposed via JavaHL either (so we could not add the option in Subclipse
> > even if we want to).
> 
> I missed exposing this option in the JavaHL bindings when I added it.
> 
> An easy (and recommended) workaround is of course to perform an update
> when a merge fails because of this error. Even if you decide to expose
> this option, it would make sense to encourage users to update the working
> copy instead of using the option.

Is the default to fail?

On the C level the compatibility wrappers don't check for mixed revision by
default to keep the pre 1.7 behavior.

	Bert


Re: Fwd: Cannot merge into mixed-revision working copy

Posted by Stefan Sperling <st...@elego.de>.
On Sat, Feb 25, 2012 at 09:53:09AM -0500, Mark Phippard wrote:
> This email on users@ made me realize we have not added this option in
> Subclipse.  Looking at the JavaHL source it looks like it has not been
> exposed via JavaHL either (so we could not add the option in Subclipse
> even if we want to).

I missed exposing this option in the JavaHL bindings when I added it.

An easy (and recommended) workaround is of course to perform an update
when a merge fails because of this error. Even if you decide to expose
this option, it would make sense to encourage users to update the working
copy instead of using the option.

Fwd: Cannot merge into mixed-revision working copy

Posted by Mark Phippard <ma...@gmail.com>.
This email on users@ made me realize we have not added this option in
Subclipse.  Looking at the JavaHL source it looks like it has not been
exposed via JavaHL either (so we could not add the option in Subclipse
even if we want to).




---------- Forwarded message ----------
From: Daniel Shahaf <da...@elego.de>
Date: Fri, Feb 24, 2012 at 11:08 PM
Subject: Re: Cannot merge into mixed-revision working copy
To: Joel Low <jo...@joelsplace.sg>
Cc: "users@subversion.apache.org" <us...@subversion.apache.org>


--allow-mixed-revisions, but the code shouldn't care about the revision
of the external for the purposes of this check.

Can you provide a reproduction recipe, starting from an empty
repository?  In a quick test I couldn't trigger the error you describe.

http://subversion.apache.org/docs/community-guide/issues#reporting-bugs

Thanks

Daniel

Joel Low wrote on Sat, Feb 25, 2012 at 11:38:12 +0800:
> Hello,
>
> I'm trying to do a remote-URL/remote-URL merge (for vendor drops) into my working copy which contains externals (for the binaries). When both are updated to HEAD and I try to do the merge, I get this error message. I've tried using --force, but that seems to work once, but subsequently the merge will still fail with the same error. I've resorted to explicitly updating my external to the same revision as the rest of the WC before merge proceeds.
>
> Is there a cleaner way around this or am I doing something wrong?
>
> Regards,
> Joel
>


-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

Re: Cannot merge into mixed-revision working copy

Posted by Daniel Shahaf <da...@elego.de>.
--allow-mixed-revisions, but the code shouldn't care about the revision
of the external for the purposes of this check.

Can you provide a reproduction recipe, starting from an empty
repository?  In a quick test I couldn't trigger the error you describe.

http://subversion.apache.org/docs/community-guide/issues#reporting-bugs

Thanks

Daniel

Joel Low wrote on Sat, Feb 25, 2012 at 11:38:12 +0800:
> Hello,
> 
> I'm trying to do a remote-URL/remote-URL merge (for vendor drops) into my working copy which contains externals (for the binaries). When both are updated to HEAD and I try to do the merge, I get this error message. I've tried using --force, but that seems to work once, but subsequently the merge will still fail with the same error. I've resorted to explicitly updating my external to the same revision as the rest of the WC before merge proceeds.
> 
> Is there a cleaner way around this or am I doing something wrong?
> 
> Regards,
> Joel
>