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

file/dir checkout within subversion...+ possible bug

From: Andrew Barber <andrew.barber_at_amd.com>
Date: 2004-08-25 21:35:04 CEST

I also would like to be able to check out single files, or groups of
files from svn. I don't see the need for a wc directory for each file
though. If they live in the same repository hierarhcy, they should live
in the same WC directory. So, if do

svn co $REPO/trunk/foo.c .

At some point later I should be able to do
svn co $REPO/trunk/bar.c .

and it should show up in the same directory (thus sharing the .svn file
like a directory checkout would have done).

In one particular case, I wanted to abandon a local modification and go
to a different rev of a file. I tried

svn co -r <other rev> $REPO/trunk/foo.c

But this did not work. I had to do

svn revert foo.c
svn update -r <other rev> foo.c

In the former case, it would be even better if I could give svn co a
working copy path instead and it can figure out the repository path to
fetch it from. Like an update, but desctructive to the working copy. I
also noticed that checkout was much faster than update. To check out
the 900 files in my repository, it took ~3 minutes. To update each file
to a different rev took more than twice as long. If I want unique
revisions on all the files in my WC dir, I'd rather use co to get them
since it's apparently faster.

As for what I think is a bug, I had a case where I back revved a file in
my working copy

> svn update -r 100 foo.c
D foo.c
Updated to revision 100.

Oops, that file didn't exist for that rev. Ok, makes sense that it
should be removed from my WC. So lets go back to the HEAD revision for
that file so I can have my file back.

> svn update -r HEAD foo.c
svn: 'foo.c' is not under version control

Hmm. Didn't expect that. I expected the file to disappear from my
working copy, but not svn to forget that it does exist in the repository.
Perhaps I can recheck out the file...
> svn co -r HEAD $REPO/trunk/foo.c
svn: Working copy 'foo.c' not locked

Whatever that means. I know for sure that it means it didn't work.
What other command could I try...

> svn switch -r HEAD $REPO/trunk/foo.c foo.c
svn: Attempted to create entry in non-directory parent

Not sure what it's telling me here either other than it refused to
switch it.

Ooo, ooo I know, svn copy!

> svn copy -r HEAD $REPO/trunk/foo.c foo.c
> svn status foo.c
svn status -v foo.c
? foo.c

Well, I guess that didn't work either.

I give up, I'll just update the whole directory to get the file back. I
really didn't want to do this as I spent some time updating different
files to different revisions and I have local modifications I didn't
want to merge yet.

> svn update -r HEAD .
U bar.c
svn: Failed to add file 'foo.c': object of the same name already exists

Oops the file from the copy is still there. If I hadn't done the svn
copy I got:
svn: Can't copy '.svn/text-base/foo.c.svn-base' to
'.svn/tmp/text-base/foo.c.svn-base.tmp': No such file or directory

So it seems as though I am wedged. I can't get this file back into my
working repository other than starting over with a fresh new checkout.
Any thoughts?

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 25 22:00:39 2004

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.