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

RE: RE: file/dir checkout within subversion...

From: Geoff Krapf <geoffk_at_softartisans.com>
Date: 2004-08-25 15:58:42 CEST

Bruce, since you're coming from VSS, I think you may be getting some
concepts confused.

In Subversion, a checkout is simply an action to create a working copy.
Unlike VSS, this does not provide any sort of locking or change the
state of the repository, it simply creates a local copy for you to work
in. You then work on that copy, and when you're ready to make your
changes, you commit them.

A commit is NOT the same as a VSS checkin, as there's no locking and
releasing of files. It takes the changes that you've made and sends
them to the repository, which then tells you if there's any conflicts
(i.e., someone committed to the working copy since you last updated your
working copy, and their changes conflict with yours). If there is a
conflict, you must resolve it yourself then commit again. Otherwise,
the commit will go through.

The regular pattern of working with Subversion is to do a checkout once,
and then work on that working copy. You can do multiple updates and
commits using that copy. You should very rarely need to perform another
checkout on the same code.

It would be slightly crazy to put one file per directory, simply so you
can checkout. Put them ina single directory in the repository, then
have your developers checkout that directory to create their local
working copy. When they want their changes to be put in the repository,
they should commit that file. They should not need to checkout ever
again. To get the latest files from the repository, they should run
"svn update", which is the equivelent of VSS's Get Latest.

I highly recommend carefully reading the SVN book
(http://svnbook.red-bean.com/), and probably reading TortoiseSVN's book
as well (http://tortoisesvn.tigris.org/docs/TortoiseSVN_en/index.html).
It outlines the concepts very well. Subversion is a very different
model of version control than VSS, but I think once you start using in
the way it's designed and not trying to map VSS work patterns over it,
you'll find that it's much cleaner and more powerful.

Hope that helps!

- Geoff

-----Original Message-----
From: bruce [mailto:bedouglas@earthlink.net]
Sent: Wednesday, August 25, 2004 6:47 AM
To: 'Ulrich Eckhardt'; users@subversion.tigris.org
Subject: RE: file/dir checkout within subversion...

ok...

to make sure i understand. the only way to really get a single 'working
file' is to have one file per directory, which would allow me to simply
checkout the dir containing the single file... is this what you're
saying regarding how subversion works...

thanks...

-bruce

-----Original Message-----
From: Ulrich Eckhardt [mailto:eckhardt@satorlaser.com]
Sent: Wednesday, August 25, 2004 3:24 AM
To: users@subversion.tigris.org
Subject: Re: file/dir checkout within subversion...

bruce wrote:
> the docs/searching through google implies that you can only
> 'check-out' a directory, and that you cannot checkout an individual
> file. is this correct? if i've misunderstood, can someone provide
> insight into how can you check out a single file???

You can retrieve a single file via 'svn cat URL'.
In order to create a working copy(something you work on and commit
changes from), svn needs to store its metadata somewhere and that is in
the .svn subdir. That is why you can't create a working copy of a single
file.

Uli

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

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 25 15:58:12 2004

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