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

Re: Cherrypicking Non-Sequential Revisions

From: marc gonzalez-carnicer <carnicer.lists_at_gmail.com>
Date: Wed, 22 Apr 2009 21:50:20 +0200

hi,

this was discussed long time ago, i've been looking for an answer
before posting.

i need to do multiple non-sequential revisions merge (cherrypicking),
from a "new feature" branch to the trunk. the "new feature" branch has
been updated with revisions from the trunk several times.

when the "new feature" has been finished and tested it's time to bring
over. for that, i need to perform the above mentioned cherrypicking,
which consists on a merge of multiple non-sequential revisions.

for reference, i am using svn 1.5.1 on the client and svn 1.3.2 on the
server side. i am not using mergeinfo, i can't yet.

the syntax for that appears to be obvious, since examples of it
neither appear on the svnbook nor on the built-in help. finally, i end
up with a command like that :

$ svn merge \
-r 2471:2473 -r 2477:2479 -r 2484:2485 -r 2486:2491 \
-r 2492:2493 -r 2494:2496 -r 2505:2506 -r 2578:2586 \
-r 2596:2600 -r 2607:2610 -r 2611:2612 -r 2621:2624 \
-r 2626:2630 -r 2667:2668 \
svn://srv-peat-svn/home/svn/8568/branches/code.Lane.LNT .

this variant seems to be possible too

$ svn merge -c 2472,2473,2478,2479,2495,2487,2488,2489,2490,2491 \
svn://srv-peat-svn/home/svn/8568/branches/code.Lane.LNT .

to my surprise, neither command does NOT perform a unique merge
operation, and instead, as many merges as revision ranges specified.
this causes that if a file has been modified in more that one revision
group, it is merged more than once. if there are conflicts, the
situation becomes scary, and the WC a mess.

i was expecting svn merge to behave as the good old svnmerge.py
script, now forgotten by many.

am i doing something wrong or is it that svn merge can't perform these
multiple revision merge in just one try? if it is the latter case, i'd
appreciate confirmation about it.

2008/9/3 Daniel Becroft <Daniel.Becroft_at_supercorp.com.au>
>
> Ah, thanks Mark. I was looking in the book, and didn't see any reference
> to multiple -c values. However, looking more closely, there is a
> sentence in the description section.
>
> The help from the command line, however, does display the syntax
> correctly for using multiple -c values.
>
> If I have time, I'll forward the problem to the SVN book people.
>
> Thanks,
> Daniel B.
>
> > -----Original Message-----
> > From: Mark Phippard [mailto:markphip_at_gmail.com]
> > Sent: Wednesday, 3 September 2008 6:41 AM
> > To: Daniel Becroft
> > Cc: users_at_subversion.tigris.org
> > Subject: Re: Cherrypicking Non-Sequential Revisions
> >
> > On Mon, Sep 1, 2008 at 11:02 PM, Daniel Becroft
> > <Daniel.Becroft_at_supercorp.com.au> wrote:
> >
> > > We need to be apply, to a given working copy, multiple, potentially
> > > non-successive changsets.
> > >
> > > For example, for a working copy of a branch @ revision 12,
> > we need to
> > > apply the changes to trunk in revisions 13-15, 23, 25-26, and 30.
> > >
> > > Is this possible with a single svn-merge command, or will
> > we need to
> > > do multiple commands?
> >
> > With SVN 1.5 this is possible to do with a single merge command.
> >
> > --
> > Thanks
> >
> > Mark Phippard
> > http://markphip.blogspot.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-22 21:51:15 CEST

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