Reputation: 950
We're working on a project, then suddenly some uncooperative/stubborn guy get in and checked in something that messed up the project - made it un-buildable but has no effect on my modules. So we're still working while using the last known working revision and I checked in my changes like normal. Then the project manager resolved to reverting back everything to the last known working revision(r1810) and it became r1824.
Now, how to re-apply my revisions from 1814, 1815, and 1821?
I'm using Tortoise SVN on Windows explorer and AnkhSVN on Visual Studio most of the time so I can say that I'm still a newbie in using the command prompt while working on SVN.
Upvotes: 2
Views: 496
Reputation: 55463
You need to "cherry-pick" these changes.
To cite the manual:
<…> the term cherrypicking. This word refers to the act of choosing one specific changeset from a branch and replicating it to another. Cherrypicking may also refer to the act of duplicating a particular set of (not necessarily contiguous!) changesets from one branch to another. This is in contrast to more typical merging scenarios, where the “next” contiguous range of revisions is duplicated automatically.
To cherry-pick, use svn merge -c 1814 ^whatever/branch
;
again, to cite the manual
:
--change (-c) ARG
Perform the requested operation using a specific “change”. Generally speaking, this option is syntactic sugar for
-r ARG-1:ARG
. Some subcommands permit a comma-separated list of revision number arguments (e.g.,-c ARG1,ARG2,ARG3
). Alternatively, you can provide two arguments separated by a dash (as in-c ARG1-ARG2
) to identify the range of revisions betweenARG1
andARG2
, inclusive. Finally, if the revision argument is negated, the implied revision range is reversed:-c -45
is equivalent to-r 45:44
.
Update: as sugested by the OP, they needed to use the
--ignore-ancestry
command-line option to svn merge -c
since they are
using the single branch for development.
Upvotes: 5