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

RE: What happens on a checkout

From: Erik Hemdal <erik_at_comprehensivepower.com>
Date: 2006-09-13 15:06:49 CEST

 

-----Original Message-----
From: Bob Butterworth [mailto:BButterworth@techpro.com]
Sent: Tuesday, September 12, 2006 5:09 PM
To: users@subversion.tigris.org
Subject: What happens on a checkout

I just got subversion completely working with webDav and started playing
around with my first checkouts and commits.
 
While playing around, i tested if you could check out the same folder more
than once. It did.
 
Right. By default, Subversion doesn't lock any files, so multiple working
copies (might be for different developers or the same developer) can exist.
 
Now I have 3 folders that are checked out and contain a file test.txt . I
commited that last one I checked out and the server is now updated.
 
The other working copies would now be out of date. If you tried to commit
them, your client should give you a message that you need to 'svn update'
first.
 
I'm left with 3 working copies. Can I remove them? Does the server store
something and wait for a file to be checked back in if it's checked out?
 
What I understand is this: If you delete a working copy, any changes you
have made, but not committed, will be lost. Once you commit, the changes
are saved back to the repository. But you can always delete a working copy.
Inside the working copy are folders named ".svn" which contain the data
needed to maintain source control.
 
I think the situation is different if you use file locks, but I don't
routinely use locks. Someone else with more experience (or your
experiments) should help you with that case.
 
 
I understand usually I'll have one working copy and always keep it there.
 
But can I delete these other 2 copies without future repercussions. I tried
deleting them already but it says the directory is now emtpy. I now see
there is a .svn folder in it and if I remove that first I can delete it.
 
If you're on Windows, I recommend having Windows Explorer show you hidden
files so you don't forget about those .svn folders, but that's my
preference.
 
Is that ok to do?
 
I do it because often I create a fresh working copy if I want to merge or
something similar. When I'm done, I just delete the working copy and move
on. I'm surprised at how convenient that is. Again, the situation may be
different if your work process includes locks on files.
 
Good luck. Erik
Received on Wed Sep 13 15:08:29 2006

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