subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <>
Subject Re: using "svn merge", "svn diff", and "svn patch"
Date Fri, 23 Aug 2013 11:41:42 GMT
On Thu, Aug 22, 2013 at 09:40:08AM -0400, James Hanley wrote:
> So other then tar-ing up the WC, there is no way to reproduce local changes
> like this on another system?  I know the example given is fairly simple,
> but it could be very useful.

If the changeset you want to transfer between working copies cannot
be fully represented by 'svn diff'/'svn patch' (i.e. it contains copies,
replacements, or svn:mergeinfo changes), I would recommend to commit
your changeset to a new branch and checkout/merge that branch elsewhere.

The changes will appear in repository history but they don't need
to affect anything of value.

Say you did:

  svn checkout TRUNK_URL first-wc
  cd first-wc
  make changes in first-wc

Now you could do this to create a new branch:

  svn copy ^/trunk ^/branches/my-new-branch
  svn switch ^/branches/my-new-branch
  svn commit

Or even just:

  svn copy . ^/branches/my-new-branch

The other side can now checkout the branch:

  svn checkout ^/branches/my-new-branch

Or switch an existing trunk working copy to the branch:

  cd other-trunk-wc
  svn switch ^/branches/my-new-branch

Or merge the branch into an existing trunk working copy:

  cd other-trunk-wc
  svn merge ^/branches/my-new-branch

(The above assumes a Subversion 1.8 client. Older clients need the
--reintegrate option).

View raw message