You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2003/11/15 16:06:43 UTC

Working with incomplete WC, or no WC [was: Re: Abolish instant-commit commands]

Branko Čibej wrote:
> Julian Foad wrote:
> 
>>For instance, there is an argument that "svn mkdir URL" is useful to
>>make a branch directory.  Of course it is, in the limited circumstance
>>of not wanting any properties set on that new directory.  As soon as
>>you go beyond the simple, the idea falls apart.
> 
> Uh. Compare this:
> 
>     svn cp http://svn.collab.net/repos/svn/trrunk \
>            http://svn.collab.net/repos/svn/branches/issue-xxx-dev
> 
> and this:
> 
>     svn co http://svn.collab.net/repos/svn
>     cd svn
>     svn cp trunk branches/issue-xxx-dev
>     svn ci

... your point being, presumably, that the second version requires so much data transfer as to make it impractical, and a bit more typing too.

OK, I was being over-dramatic when I suggested "abolishing" the existing instant-commit commands.  I concede that it is necessary to have a way to do operations like this directly on the repository and, for the time being, those commands are the means to do it.

My point is that if the action that you want to perform is not a single copy or propset or mkdir, but a combination of any two or more of those (e.g. you want to set a custom property on your branch) then the instant-commit syntax cannot do it in one commit.  We ought to consider providing some mechanism for building up a multi-part transaction without a working copy - or at least without a complete working copy.

"svn checkout --non-recursive" is probably the way to go, but I am not sure to what extent Subversion can cope with an incomplete working copy through a full cycle of checkout+modify+commit.  I got stuck at the first hurdle: after a non-recursive checkout (which gets all of the files but none of the subdirectories) I have not managed to get a subdirectory.  I tried "svn update subdir" and "svn copy URL subdir" and "svn checkout URL subdir".  The test script is attached, and the output from these attempts is shown below.

+ svn list -vR
      1 julianfo          6 Nov 15 15:54 file
      1 julianfo            Nov 15 15:54 subdir/
      1 julianfo          6 Nov 15 15:54 subdir/file
+ svn status -vu
                1        1 julianfoad   .
                1        1 julianfoad   file
Status against revision:      1

+ svn update subdir
svn: warning: svn_wc_is_wc_root: 'subdir' is not a versioned resource

+ svn copy file:///home/julianfoad/tmp/incomplete-wc/repos/subdir .
/home/julianfoad/src/subversion/subversion/libsvn_wc/lock.c:165: (apr_err=155004)
svn: Attempted to lock an already-locked dir
svn: working copy locked: .
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

+ svn checkout file:///home/julianfoad/tmp/incomplete-wc/repos/subdir
/home/julianfoad/src/subversion/subversion/libsvn_wc/lock.c:600: (apr_err=155005)
svn: Working copy not locked
svn: directory 'subdir' not locked

Each of "copy" and "checkout" creates a directory "subdir" and "subdir/.svn", but does not integrate it into its parent or populate it.  The WC is not reported as Locked before or after these attempts.

Perhaps this is possible but I'm not trying the right way?

- Julian

Re: Working with incomplete WC, or no WC [was: Re: Abolish instant-commit commands]

Posted by Greg Hudson <gh...@MIT.EDU>.
On Sat, 2003-11-15 at 11:06, Julian Foad wrote:
> My point is that if the action that you want to perform is not a
> single copy or propset or mkdir, but a combination of any two or more
> of those (e.g. you want to set a custom property on your branch) then
> the instant-commit syntax cannot do it in one commit.  We ought to
> consider providing some mechanism for building up a multi-part
> transaction without a working copy - or at least without a complete
> working copy.

Ah, yes.  See
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=188086
for an example proposal involving long-lived transactions.

One could, alternatively, do all the work on the client.  "svn cp" could
have an option, perhaps just -N, to avoid populating the area being
copied to, or we could have a thing for queuing up operations
client-side without reflecting them in a working copy, and committing
them all at once.  Big design space here.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Working with incomplete WC, or no WC [was: Re: Abolish instant-commit commands]

Posted by Ben Collins-Sussman <su...@collab.net>.
On Sat, 2003-11-15 at 10:06, Julian Foad wrote:

> We ought to consider providing some mechanism for building up a
> multi-part transaction without a working copy - or at least without a
> complete working copy.

Ha, welcome to DeltaV.  It has a whole model for server-side working
copies, we just happen to ignore it right now.  :-)




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org