[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: using "svn merge", "svn diff", and "svn patch"

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 23 Aug 2013 13:41:42 +0200

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).
Received on 2013-08-23 13:42:21 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.