Login | Register
My pages Projects Community openCollabNet

Discussions > users [DISABLED] > Re: How to merge works done on various branches ?

subversion
Discussion topic

Back to topic list

Re: How to merge works done on various branches ?

Author marc gonzalez-carnicer <carnicer dot lists at gmail dot com>
Full name marc gonzalez-carnicer <carnicer dot lists at gmail dot com>
Date 2009-04-28 04:00:20 PDT
Message hi,

2009/4/27 Olivier Sannier <obones at free dot fr>:
> Please read the documentation, it explains all this and much more.

yes, read it please. but sometimes an example over a concrete example
and need can be very educative. see below for a quick reply to your
quick questions.


>> 1) While at revision 9, I detect for example that the modifications
>> done on revision 3 are not correct, and I'd like to remove them. Is
>> there a "quick" way to do this ? I've identified a way, selecting all
>> the files not modified on rev 4, 6 & 9, making a revert to rev 2, but
>> it is a bit painful to do it manually. For the files also touched by
>> at least one of the next revision, I redo manually also the operation.
> Reverse merge :
> http://svnbook.red-b​ean.com/en/1.5/svn.b​ranchmerge.basicmerg​ing.html#svn.branchm​erge.basicmerging.un​do
>

before starting, it's much better to check you have no local changes.

assuming you are on the trunk directory ...

$ svn merge -c -3 <TRUNK_URL> .

please do notice the '-' and the '.'


>> 2) While at revision 9, I detect that the modifications done on rev7
>> on the branch (and only them, not the ones done on rev 5 and 8) are
>> interesting to be added on the trunk for the next software delivery
>> for example. Is there a "quick" way to do this ?
> Cherrypicking :
> http://svnbook.red-b​ean.com/en/1.5/svn.b​ranchmerge.advanced.​html#svn.branchmerge​.cherrypicking

again assuming you are on the trunk directory ...

$ svn merge -c 7 <BRANCH_URL> .


it's also possible to use -r instead of -c. in the first case -r 2:3,
in the second -r 6:7.


after either case, you may want to check the differences. no commit
will be made, you have to do it yourself.

« Previous message in topic | 3 of 5 | Next message in topic »

Messages

Show all messages in topic

How to merge works done on various branches ? Gabriel dot SCOLAN at messier-bugatti dot com Gabriel dot SCOLAN at messier-bugatti dot com 2009-04-27 02:41:13 PDT
     Re: How to merge works done on various branches ? obones Olivier Sannier 2009-04-27 04:41:45 PDT
         Re: How to merge works done on various branches ? marc gonzalez-carnicer <carnicer dot lists at gmail dot com> marc gonzalez-carnicer <carnicer dot lists at gmail dot com> 2009-04-28 04:00:20 PDT
             RE: How to merge works done on various branches ? troccoli Giulio Troccoli 2009-04-28 05:00:25 PDT
                 Re: How to merge works done on various branches ? marc gonzalez-carnicer <carnicer dot lists at gmail dot com> marc gonzalez-carnicer <carnicer dot lists at gmail dot com> 2009-04-28 05:05:27 PDT
Messages per page: