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

Re: Can svn_fs_copy() copy from txn nodes in the same txn?

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-11-08 14:15:27 CET

Ph. Marek wrote:
> On Donnerstag, 8. November 2007, David Glasser wrote:
>> On 11/7/07, Ph. Marek <philipp.marek@bmlv.gv.at> wrote:
>>> On Mittwoch, 7. November 2007, C. Michael Pilato wrote:
>>>> Blair Zajac wrote:
>>>>> Currently svn_fs_copy() only allows you to copy a node from a
>>>>> revision fs root into a txn fs root.
>>>>>
>>>>> Would it work in the BDB and FSFS backends with no code changes if we
>>>>> allow copies from a txn fs root only if the destination fs root is
>>>>> the same txn as the source fs root?
>>> I'd like to have that, too; in FSVS I'd like to avoid having two
>>> revisions for a (copy, change) operation.
>> Huh? You can copy and change in one revision... what exactly are you
>> trying to accomplish?
> Not if both are new files:
> $ svnadmin create r
> $ svn co file:///tmp/test/r wc
> Checked out revision 0.
> $ cd wc/
> $ date > f1
> /wc$ svn add f1
> A f1
> /wc$ svn cp f1 f2
> svn: Cannot copy or move 'f1': it's not in the repository yet; try committing first

Seems it'd be pretty trivial to teach the Subversion command-line that 'svn
copy schedule-add-file' should just do a literal file copy and schedule the
result for addition (without history).

> And that's (something like) my use-case ...
> (User creates 5 new files - all with the same data. FSVS detect that
> they're identical, and would like to link them in the repository to
> save space).

Oh, well, I can't help with that aspect of it.

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Thu Nov 8 14:15:41 2007

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