svk patch — Manage patches.
svk patch --list|--ls
svk patch --cat|--view PATCHNAME
svk patch --regenerate|--regen PATCHNAME
svk patch --update|--up PATCHNAME
svk patch --apply PATCHNAME [TARGET] [-- MERGEOPTIONS]
svk patch --delete|--rm PATCHNAME
Let say you want to create a patch for something rather than actually commit it. To do so you would:
$ touch foo $ svk add foo $ svk commit --message "Added foo" --patch bug1 Patching locally against mirror source file:///Users/sally/.svk/local/calc. Patch bug1 created.
Currently SVK doesn't track which depot a patch is
for. If you are using more than one depot and a patch
applies to a depot other than the default, or
// depot you need to specify the
DEPOTNAME switch to let SVK
know which depot the patch is meant for.
To view the contents of a patch you would run:
$ svk patch --cat bug1 ==== Patch <bug1> level 1 Source: [No source] Target: f5a4d37e-57fc-0310-86b3-8bf2ff90d511:/calc:53 [local] Log: Added foo === foo ==================================================================
Now let's revert the uncommitted change and apply the patch to our wc:
$ svk revert foo $ rm foo $ svk patch --apply bug1 A foo
We could also apply the patch directly to the depot—this could be on a different machine, like the one we are mirroring from:
$ svk patch --apply bug1 //calc A foo Committed revision 54.
If we no longer need a patch we can delete it:
$ svk patch --delete bug1