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

Re: Is there a replace or copy with replace command

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-09-11 23:57:36 CEST

Philip Martin <philip@codematters.co.uk> writes:

> Ben Collins-Sussman <sussman@collab.net> writes:
>
>> But I thought maybe I could do it in a single transaction, using the
>> 'replace' action in the working copy. I ran these commands:
>>
>> $ svn rm dir2
>> $ rm -rf dir2
>
> Sneaky! Is that breaking the rules?
>
>> $ svn cp dir1 dir2

Trying this with files gives

$ svn cp wc/zag wc/zig
../svn/subversion/libsvn_wc/copy.c:156: (apr_err=150002)
svn: Entry already exists
svn: 'wc/zig' is scheduled for deletion, it must be commited before being overwritten

which looks like the same limitation that we have for directories,
with the difference that it is caught at the copy stage rather than
the commit stage.

However, for files this works

$ svn rm wc/zig
$ touch wc/zig
$ svn add wc/zig
$ svn ci wc

and for directories this works

$ svn rm wc/zig
$ svn add wc/zig
$ svn ci wc

So an item that is schedule delete can be replaced by 'svn add' but
not by 'svn copy'. Odd.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 11 23:58:27 2003

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.