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

RE: Any difference between results of checkout and update ?

From: Rob Hubbard <Rob.Hubbard_at_celoxica.com>
Date: 2006-09-19 14:42:28 CEST

Andy,

I would not expect checkout or update to differ except in local modifications (e.g. modified files under version control, or generated files from a build).

If the "status" is clean (perhaps even with --no-ignore), then I'd expect identical results. In particular, a checkout to the HEAD followed by an update to a given version should result in the same as a checkout of that given version.

(Oh, I think that's basically what Felix has already replied.)

I'm curious as to what prompted your question.

Rob.

----
For other beginners, I hope the following comments may be helpful.
Beware that "update" and "checkout" operations are entirely different.
You would expect to checkout only once, or at least, rarely. Checkout creates a new "clean" working copy where there was none before. If you are doing a checkout in an existing working copy, then you're probably doing something wrong; this would be an unusual thing to do. In fact, I think the operation would fail as soon as the first pre-existing file or directory was encountered.
Update is used to bring an existing working copy up to date. This is something you would expect to do frequently.
Checkout must be told where the repository is, whereas update knows.
Sometimes the terminology is inconsistent between one VCS and another. If you have migrated from a different version control system, you might this confusing, initially. 
For example, Visual SourceSafe (VSS) uses a lock/modify/unlock model (I'll ignore its "multiple-checkout" mode), and SVN uses a copy/modify/merge model, so they're quite different in their behaviour, let alone the terminology. (See, for example <http://svnbook.red-bean.com/en/1.1/ch02s02.html#svn-ch-2-sect-2.2> versus <http://svnbook.red-bean.com/en/1.1/ch02s02.html#svn-ch-2-sect-2.3>.)
The term "checkout" in SVN corresponds roughly to "setting the working folder" in VSS.
In VSS, you "checkout" to edit an individual file; there's no equivalent in SVN; in Perforce (P4) I think the equivalent is "edit".
(So, confusingly, the same word, in this case "checkout", can be used by different VCSs to mean different things.)
In SVN you "update"; in VSS the rough equivalent is "get latest version", but VSS will overwrite rather than merge any local changes; in P4, I think you "sync".
In VSS you "checkin"; in SVN you "commit"; in P4 you "submit".
Read about the "Basic Work Cycle" in SVN <http://svnbook.red-bean.com/en/1.1/ch03s05.html>.
[The URLs I've given are for the SVN 1.1 book; the multi-HTML edition of the SVN 1.2 book seems to be temporarily unavailable. These may all be accessed from <http://svnbook.red-bean.com/>]
Rob.
-----Original Message-----
From: Andy Dingley [mailto:andy.dingley@talgentra.com]
Sent: 19 September 2006 11:55
To: users@subversion.tigris.org
Subject: Any difference between results of checkout and update ?
Is there any difference between the _results_ of using either checkout
or update?  
Particularly are there differences if trying to target a specific
non-HEAD revision?
Obviously there are differences in context when they can be run
(checkout can make a new WC), but assuming I already have a live WC, is
there any circumstance when their results could vary?
Thanks   (new list member, fairly newbie for SVN)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
_____________________________________________________________________
This message has been checked for all known viruses by the MessageLabs Virus Scanning Service, on behalf of Celoxica Ltd.
This email and any files transmitted with it are confidential and 
may be legally privileged. It is intended solely for the use of the 
individual or entity to whom it is addressed. If you have received 
this in error, please contact the sender and delete the material 
immediately. Whilst this email has been swept for viruses, you 
should carry out your own virus check before opening any 
attachment. Celoxica Ltd accepts no liability for any loss or 
damage which may be caused by software viruses or interception 
or interruption of this email.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 19 14:43:31 2006

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.