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

committing a rename with a delta editor

From: Geoff Richards <qef_at_ungwe.org>
Date: 2006-04-05 15:52:25 CEST

Hi,

I'm trying to commit a 'rename' (delete and copy) using a commit
editor, and I've got a few questions about how to do this:

 * Does it make any difference whether I delete the old file first,
   before adding a copy of it from the last revision, or add the
   copy first?

 * It doesn't seem to make any difference whether the paths I use
   to add or open files and directories start with a slash or not.
   Is there any reason I should or should not use '/trunk/blah' instead
   of 'trunk/blah'?

 * What form should the copyfrom_path value take? In the docs it
   just says that it should be a path, but it seems to require a
   full URL. When I try with just a path I get this:

   General filesystem error: Source url '/trunk/foo' is
   from different repository at test.pl line 125

(I'm doing this from Perl, but these things are probably applicable
more generally.)

Here's the code that generates the error above:

    $trunk_baton = $ed->open_directory('trunk', $root_baton, $cur_rev);
    $ed->delete_entry('trunk/foo', $cur_rev, $trunk_baton);
    my $bar_baton = $ed->add_file('trunk/bar', $trunk_baton,
                                  '/trunk/bar', $cur_rev);

Thanks.

-- 
--- Geoff Richards -------------><-------------- http://ungwe.org/ ---
"I tried to fling my shadow at the moon,
 The while my blood leapt with a wordless song."  --  Theodore Roethke
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 5 15:53:09 2006

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

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