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

Re: Branching directories with fully-contained externals with svncopy.pl

From: Anthony Foglia <AFoglia_at_princeton.com>
Date: Thu, 23 Sep 2010 15:09:02 -0400

Anthony Foglia wrote:
> I have found a bug in the svncopy.pl script that fails to properly
> handle fully-contained externals when branching and copying from a
> single source. When branching from a single source, the externals are
> updated to directories that do not exist.

I've figured out where the problem is and have attached a patch
(single_source_and_branching.patch) that correctly rewrites the
externals when branching using Bradey Honsinger's patch.

There is still another bug with his patch that is probably too
complicated for my perl skills. When you use svncopy.pl to copy from a
single source to a destination folder that already exists, like "svn
copy" it makes a subdirectory named with the last component of the
source directory. But when it tries to fix the externals, it checks out
the destination directory (as passed on the command-line), and any of
its siblings, and tries to change the externals in those directories.

So, if you have a repository of the form

repos/
   branches/
     release_2.0/
   tags/
     release_1.0/

And you do

$ svncopy.pl --tag repos/branches/release_2.0 repos/tags

The script will make repos/tags/release_2.0, but checkout repos/tags and
try to change all the externals in there, including those in release_1.0.

The workaround is to make sure the source is always a non-existent
directory, and let the script create it. So the above command should be.

$ svncopy.pl --tag repos/branches/release_2.0 repos/tags/release_2.0

-- 
Anthony Foglia
Princeton Consultants
(609) 987-8787 x233

Received on 2010-09-23 21:09:59 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.