svk merge — Apply differences between two sources.
svk merge --revision N:M DEPOTPATH [WCPATH]
svk merge --revision DEPOTPATH1 DEPOTPATH2
svk merge --revision N:M [--to|--from] [WCPATH]
TODO ## In the first and second forms, the source paths (URLs
in the first form, working copy paths in the second) are
specified at revisions N and
M. These are the two sources
to be compared. The revisions default to
HEAD if omitted.
In the third form, SOURCE
can be a URL or working copy item, in which case the
corresponding URL is used. This URL, at revisions
N and
M, defines the two sources to
be compared.
WCPATH is the working copy
path that will receive the changes. If
WCPATH is omitted, a default
value of “.” is assumed,
unless the sources have identical basenames that match a
file within “.”: in which
case, the differences will be applied to that file.
Unlike svk diff, the merge command takes the ancestry of a file into consideration when performing a merge operation. This is very important when you're merging changes from one branch into another and you've renamed a file on one branch but not the other.
Working copy if merging to a working copy. Depot if merging to a depotpath, and mirrored repository if the destination is a mirrored depotpath.
--revision (-r) REV --change (-c) REV --incremental (-I) --auto (-a) --log (-l) --sync (-s) --to (-t) --from (-f) --verbatim --no-ticket --track-rename --message (-m) --file (-F) --template --encoding ENC --patch (-P) NAME --sign (-S) --check-only (-C) --direct
Merge a branch back into the trunk (assuming that you have a working copy of the trunk, and that the branch was created in revision 250):
$ svk merge --revision 250:HEAD //branches/my-branch U myproj/tiny.txt U myproj/thhgttg.txt U myproj/win.txt U myproj/flo.txt
If you branched at revision 23, and you want to merge changes on trunk into your branch, you could do this from inside the working copy of your branch:
$ svk merge --revision 23:30 //trunk/vendors U myproj/thhgttg.txt …
To merge changes to a single file:
$ cd myproj $ svk merge --revision 30:31 thhgttg.txt U thhgttg.txt