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

Re: howto 'retrofit' a vendor branch?

From: John Peacock <zenoparadoxus_at_gmail.com>
Date: 2007-08-28 09:45:30 CEST

On 8/28/07, Ryan Schmidt <ryandesign@macports.org> wrote:
> You want to read the chapter in the book ( http://svnbook.org ) on
> Vendor Branches.
> You will want to ignore the fact that they use Subversion. Instead,
> get exports or source tarballs of their 1.0.0 and 1.0.2 source code.
> Import 1.0.0 into $REPO/vendor/mailguard/current using svn import.
> Copy it to $REPO/vendor/mailguard/1.0.0 using svn cp. Now import
> 1.0.2 into $REPO/vendor/mailguard/current and copy it to $REPO/vendor/
> mailguard/1.0.2 using svn_load_dirs.pl.

Alternatively, since this is going to be an ongoing process, Aaron may want
to install SVK <http://svk.bestpractical.com/view/HomePage> - which has
superior merge tracking (at least until 1.5.0 0) and a smarter import - and
mirror the remote project's entire repository, e.g.:

$ svk depot PROJECT /path/to/depot/PROJECT
$ svk mirror http://remote.server.tld/project /PROJECT/mirror
$ svk sync /PROJECT/mirror

Establish a local branch for custom development

$ svk cp /PROJECT/mirror/trunk@1234 /PROJECT/local/trunk

where 1234 was the change number where you are nominally branching from
(which you can probably find from the tag for 1.0.0). You want to copy your
local branch from the project's trunk, since that makes the inheritance

Now import the local changes into the local branch:

$ svk import path/to/local/version /PROJECT/local/trunk

This will automatically handle all of the adds/deletes/renames that you did
on the project locally. Finally, check out the local branch:

$ svk co /PROJECT/local/trunk project/trunk

and test the import to make sure it is exactly the same as your local
version (it should be file by file identical).

Finally, update the working copy to the latest mirrored code:

$ cd project/trunk
$ svk up -sm

That "-sm" both syncs the remote mirror and automatically merges in the
changes to the working copy. This is the real strength of SVK; going
forward, you only need to run 'svk up -sm' whenever you want to pick up the
upstream changes, and you are completely free to continue making changes to
your local branch.


Received on Tue Aug 28 09:42:55 2007

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.