$ svn co \ https://svn.local/svn/test/trunk
$ svn cp \ https://svn.local/svn/test/trunk \ https://svn.local/svn/test/branches/private_vnaum
Like any operation that changes repo, copy will require a commit message. Your $EDITOR will be spawned. Enter something meaningful (like "Creating private branch private_vnaum for testing")
$ svn switch \ https://svn.local/svn/test/branches/private_vnaum
$ date > QQ $ svn add QQ A QQ
$ date >> ZZ
$ svn stat A QQ M ZZ
QQ - locally added, ZZ - locally modified.
$ svn diff Index: QQ =================================================================== --- QQ (revision 0) +++ QQ (revision 0) @@ -0,0 +1 @@ +Thu Jan 4 13:42:28 OMST 2007 ...
$ svn commit
$ date >> QQ
$ svn diff
$ svn revert -R .
The easies way to do that is to switch to a donor branch and use svn log command. We will merge changes from our private branch - and our working copy already is on that branch.
Looking at svn log:
$ svn log --stop-on-copy ------------------------------------------------------------------------ r7 | vnaum | 2007-01-04 14:13:19 +0600 (Thu, 04 Jan 2007) | 2 lines test edits ------------------------------------------------------------------------ r6 | vnaum | 2007-01-04 12:59:31 +0600 (Thu, 04 Jan 2007) | 1 line Creating private branch ------------------------------------------------------------------------
--stop-on-copy will stop log after copy command (branch creation).
So, we see our changes were from r6 to r7 (r6:7) on branch https://svn.local/svn/test/branches/private_vnaum (If you forgot what is your current branch - check svn info)
$ svn cp \ https://svn.local/svn/test/trunk \ https://svn.local/svn/test/branches/private_vnaum_merge_target
(There were no changes on trunk).
$ svn switch \ https://svn.local/svn/test/branches/private_vnaum_merge_target D QQ U ZZ Updated to revision 10.
Forgot your branch name? svn list can list any directory in repository:
$ svn list https://svn.local/svn/test/branches private_vnaum/ private_vnaum_merge_target/
To do this we need two things: donor branch name (private_vnaum) and changeset revisions. Changeset is applied to working copy.
$ svn merge \ -r 6:7 \ https://svn.local/svn/test/branches/private_vnaum A QQ U ZZ
New file added, old file changed.
$ svn commit \ -m "Merged changeset 6:7 from private_vnaum (test changes)"
Commit message must contain changeset description (what revisions and from which branch were merged)!
It is a good idea to put a summary of changes (will save a lot of time someday).