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

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

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-11-15 17:06:43 CET

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

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

Received on Sat Nov 15 17:04:49 2003

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.