You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Xavier Noria <fx...@hashref.com> on 2010/03/25 10:09:49 UTC

weird merge

I am using 1.6 and was told that nowadays explicit revision numbers
are not needed for branching merging in the most common use case at
least.

That is, after you create branch b from trunk, you work on b,
occasionally you sync with trunk this way:

    cd b
    svn merge ^/trunk .

and when you are done in b finally

    cd trunk
    svn merge --reintegrate ^/branches/b .

First, that is correct right?

Alright, assuming it is, I've tried this in the project I am working on, and

    svn merge ^/trunk .

instead of being silent says

    --- Merging r2 through r2909 into '.'

and then a ton of tree conflicts appear. But that is kind of weird
because this project is at revision ~28000, why a range from 2 to
2909?

I am not into svn and do not know what to do. Can anyone guess what
could be happening?

Re: weird merge

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 31, 2010, at 04:07, Cooke, Mark wrote:

> I thought there was a way to persuade "svnadmin load" to keep the
> revision numbers but on looking I cannot find anything.  It seems to
> renumber revs by default.  However, I have a repository that I created
> from a VSS conversion and used dumpfilter on and the revisions start at
> 282, so it must be possible somehow...

Agreed, it should be possible to do.

> Working copies can be relocated (if you keep the same repo UUID)

But you must not keep the same UUID, because, now that you've removed historical revisions, your repository has different contents than it used to, hence it is a different repository and must now have a new UUID.


RE: weird merge

Posted by "Cooke, Mark" <ma...@siemens.com>.
> On Mar 31, 2010, at 03:31, Cooke, Mark wrote:
> 
> >> On Mar 30, 2010, at 18:55, Xavier Noria wrote:
> >> 
> >>> Can I tell to svn that it totally forget revisions < 3000 ?
> >> 
> >> Doing so is a very invasive procedure. I don't recommend it. 
> >> It's likely to cause more problems than it solves.
> >> 
> >>> Those are very old and we could just get rid of them it
> >>> there was a chance that it solved the issue, it is a pity
> >>> we need to deal with explicit revisions all the time,
> >>> reflective merges...
> >>> 
> >>> I don't know, perhaps around r2909 people did something 
> >>> with the repo, upgrading, ... no idea.
> >> 
> > What about doing an "svnadmin dump -r 3000:head" of the repository
> > starting at r3000, then load that in to a new repo and use that?  I
> > believe it should dump enough info to build 3000 then increment from
> > there.  However, I've never tried it.
> > 
> > 
>
http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.rep
osadmin.maint.filtering
> 
> Yes, that is the procedure I am talking about. It is very 
> invasive, because it necessitates all users throwing away all 
> working copies and checking them out again, means all old 
> revision numbers (e.g. that have been recorded in issue 
> tracker ticket notes, documentation, etc.) are no longer 
> accurate, and does not necessarily result in space savings in 
> the repository, which is what many people are looking for 
> when they consider this procedure. (It may even increase the 
> repository's size.)
> 
I thought there was a way to persuade "svnadmin load" to keep the
revision numbers but on looking I cannot find anything.  It seems to
renumber revs by default.  However, I have a repository that I created
from a VSS conversion and used dumpfilter on and the revisions start at
282, so it must be possible somehow...

Working copies can be relocated (if you keep the same repo UUID) but I
believe that the renumbered revisions would still be a show stopper.
I'm confused now!

> Remember to keep the discussion on the list by using Reply All.
> 
Dang, thanks for the reminder.

~ Mark C

Re: weird merge

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 31, 2010, at 03:31, Cooke, Mark wrote:

>> On Mar 30, 2010, at 18:55, Xavier Noria wrote:
>> 
>>> Can I tell to svn that it totally forget revisions < 3000 ?
>> 
>> Doing so is a very invasive procedure. I don't recommend it. 
>> It's likely to cause more problems than it solves.
>> 
>>> Those are very old and we could just get rid of them it
>>> there was a chance that it solved the issue, it is a pity
>>> we need to deal with explicit revisions all the time,
>>> reflective merges...
>>> 
>>> I don't know, perhaps around r2909 people did something 
>>> with the repo, upgrading, ... no idea.
>> 
> What about doing an "svnadmin dump -r 3000:head" of the repository
> starting at r3000, then load that in to a new repo and use that?  I
> believe it should dump enough info to build 3000 then increment from
> there.  However, I've never tried it.
> 
> http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.rep
> osadmin.maint.filtering

Yes, that is the procedure I am talking about. It is very invasive, because it necessitates all users throwing away all working copies and checking them out again, means all old revision numbers (e.g. that have been recorded in issue tracker ticket notes, documentation, etc.) are no longer accurate, and does not necessarily result in space savings in the repository, which is what many people are looking for when they consider this procedure. (It may even increase the repository's size.)


Remember to keep the discussion on the list by using Reply All.

Re: weird merge

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 30, 2010, at 18:55, Xavier Noria wrote:

> Can I tell to svn that it totally forget revisions < 3000 ?

Doing so is a very invasive procedure. I don't recommend it. It's likely to cause more problems than it solves.

> Those are
> very old and we could just get rid of them it there was a chance that
> it solved the issue, it is a pity we need to deal with explicit
> revisions all the time, reflective merges...
> 
> I don't know, perhaps around r2909 people did something with the repo,
> upgrading, ... no idea.

Re: weird merge

Posted by Xavier Noria <fx...@hashref.com>.
Can I tell to svn that it totally forget revisions < 3000 ? Those are
very old and we could just get rid of them it there was a chance that
it solved the issue, it is a pity we need to deal with explicit
revisions all the time, reflective merges...

I don't know, perhaps around r2909 people did something with the repo,
upgrading, ... no idea.

Re: weird merge

Posted by Xavier Noria <fx...@hashref.com>.
On Tue, Mar 30, 2010 at 4:25 PM, Bob Archer <Bo...@amsi.com> wrote:

>> On Fri, Mar 26, 2010 at 5:11 PM, Tyler Roscoe <ty...@cryptio.net> wrote:
>>
>> > On Fri, Mar 26, 2010 at 03:17:54PM +0100, Xavier Noria wrote:
>> >> Even if I try to fix it by hand with
>> >>
>> >>     svn merge -r2:2909 ^/trunk --record-only
>> >>
>> >> a subsequent merge still tries to get 2 through 2909. Moreover
>
>
> Did you do a commit after doing the --record-only merge?

Nope, someone else in the project did. Right after I branched from trunk:

    cd into branches/someplace
    svn co branchURL
    cd branch name

now to check the strange behavior:

    svn merge --dry-run ^/trunk

confirm the mysterious r2 to r2909 appearing, with tree conflicts etc.
(they are really old).

   svn log

on the other side shows all the history down to r1.

Then

    svn merge -r2:2909 ^/trunk --record-only

Just returns a prompt, silently, and if we try again

    svn merge --dry-run ^/trunk

that still tries to merge r2 to r2909.

RE: weird merge

Posted by Bob Archer <Bo...@amsi.com>.
> On Fri, Mar 26, 2010 at 5:11 PM, Tyler Roscoe <ty...@cryptio.net> wrote:
> 
> > On Fri, Mar 26, 2010 at 03:17:54PM +0100, Xavier Noria wrote:
> >> Even if I try to fix it by hand with
> >>
> >>     svn merge -r2:2909 ^/trunk --record-only
> >>
> >> a subsequent merge still tries to get 2 through 2909. Moreover


Did you do a commit after doing the --record-only merge?

BOb





> >>
> >>     svn propget svn:mergeinfo .
> >>
> >> returns nothing.
> >
> > Are you using a merge-capable client and server (svn >= 1.5.0)?
> 
> Yes, server is 1.5.1 (r32289) and client is 1.6.5 (r38866).
> 
> > What does svn say after you perform the record-only merge? Nothing?
> 
> Nothing, silent.
> 
> >> Another fact is that svn log in the branch contains everything down to
> r1.
> >
> > What about svn log --stop-on-copy?
> >
> > When was your branch created (what revision)?
> 
> I am doing ad-hoc tests with temporary branches I can throw. For
> example the last one was created from trunk r28935 and now trunk is
> r28939.
> 
> Indeed if you want me to try something please just tell me, I can
> create whatever, test stuff and delete later.
> 
> I don't know whether this is relevant, but we are not creating the
> branches exactly below the branches directory, but in a subdirectory
> of it.

Re: weird merge

Posted by Xavier Noria <fx...@hashref.com>.
On Fri, Mar 26, 2010 at 5:11 PM, Tyler Roscoe <ty...@cryptio.net> wrote:

> On Fri, Mar 26, 2010 at 03:17:54PM +0100, Xavier Noria wrote:
>> Even if I try to fix it by hand with
>>
>>     svn merge -r2:2909 ^/trunk --record-only
>>
>> a subsequent merge still tries to get 2 through 2909. Moreover
>>
>>     svn propget svn:mergeinfo .
>>
>> returns nothing.
>
> Are you using a merge-capable client and server (svn >= 1.5.0)?

Yes, server is 1.5.1 (r32289) and client is 1.6.5 (r38866).

> What does svn say after you perform the record-only merge? Nothing?

Nothing, silent.

>> Another fact is that svn log in the branch contains everything down to r1.
>
> What about svn log --stop-on-copy?
>
> When was your branch created (what revision)?

I am doing ad-hoc tests with temporary branches I can throw. For
example the last one was created from trunk r28935 and now trunk is
r28939.

Indeed if you want me to try something please just tell me, I can
create whatever, test stuff and delete later.

I don't know whether this is relevant, but we are not creating the
branches exactly below the branches directory, but in a subdirectory
of it.

Re: weird merge

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Fri, Mar 26, 2010 at 03:17:54PM +0100, Xavier Noria wrote:
> Even if I try to fix it by hand with
> 
>     svn merge -r2:2909 ^/trunk --record-only
> 
> a subsequent merge still tries to get 2 through 2909. Moreover
> 
>     svn propget svn:mergeinfo .
> 
> returns nothing.

Are you using a merge-capable client and server (svn >= 1.5.0)?

What does svn say after you perform the record-only merge? Nothing?

> Another fact is that svn log in the branch contains everything down to r1.

What about svn log --stop-on-copy?

When was your branch created (what revision)?


tyler

Re: weird merge

Posted by Xavier Noria <fx...@hashref.com>.
Even if I try to fix it by hand with

    svn merge -r2:2909 ^/trunk --record-only

a subsequent merge still tries to get 2 through 2909. Moreover

    svn propget svn:mergeinfo .

returns nothing.

Another fact is that svn log in the branch contains everything down to r1.

Is that normal? Could it be the case that the repo was somehow screwed
up aroung r2909?

Re: weird merge

Posted by Xavier Noria <fx...@hashref.com>.
On Thu, Mar 25, 2010 at 4:51 PM, Tyler Roscoe <ty...@cryptio.net> wrote:

> You should look at your branch's ancestry to make sure those revisions
> are not needed. If they're not, you can use a --record-only merge to
> make the branch think it has those revisions. Subsequent merges from
> trunk should then skip over those revisions and merge only what you
> want.

I see.

Could you help with the command that is needed here? Never did that before.

Is there something we can do in trunk so that subsequent new branches
do not need to do the same?

Re: weird merge

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Thu, Mar 25, 2010 at 11:09:49AM +0100, Xavier Noria wrote:
> That is, after you create branch b from trunk, you work on b,
> occasionally you sync with trunk this way:
> 
>     cd b
>     svn merge ^/trunk .
> 
> and when you are done in b finally
> 
>     cd trunk
>     svn merge --reintegrate ^/branches/b .
> 
> First, that is correct right?

Yes.

>     svn merge ^/trunk .
> 
> instead of being silent says
> 
>     --- Merging r2 through r2909 into '.'
> 
> and then a ton of tree conflicts appear. But that is kind of weird
> because this project is at revision ~28000, why a range from 2 to
> 2909?

For some reason, your branch doesn't know that it already has revisions
2 through 2909, so svn attempts to merge those revisions in, leading
(apparently) to tree conflicts.

You should look at your branch's ancestry to make sure those revisions
are not needed. If they're not, you can use a --record-only merge to
make the branch think it has those revisions. Subsequent merges from
trunk should then skip over those revisions and merge only what you
want.

hth,
tyler