RE: Newbie: update vs. checkout

2004-05-27 Thread Christopher.Fouts
cvs checkout means you want to check out the files that you need from
the CVS repository into your workspace, or sandbox. These files are
essentially
your working copies of the files in the repository. Any changes you make
to
these files from now on will only exist on YOUR sandbox, NOT the
repository.
You commit your changes to the repository by doing a cvs commit.

Ok so far?

Now say one of the files you checked out (I assume you know what this
means
now :) is file.cpp. But later on someone else checked this out, made
some changes,
and committed the changes in the repository. Now YOUR copy of file.cpp
does NOT
the other person's changes correct? Now to update your copy with the
other person's
changes, you do a cvs update. So now when you do a cvs commit, you
include
BOTH the other person's changes AND your changes. If you do a cvs
commit without
doing a cvs update, you will have eclipsed the other person's changes.

Make sense?

-chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Irving Kimura
Sent: Wednesday, May 26, 2004 1:31 PM
To: [EMAIL PROTECTED]
Subject: Newbie: update vs. checkout





I'm sorry for this very stupid question, but after spending a lot of
time reading the CVS documentation, I still don't understand what
*exactly* is the difference between update and checkout. Could someone
explain it to me?

Thanks!

Irv

___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Newbie: update vs. checkout

2004-05-26 Thread Irving Kimura



I'm sorry for this very stupid question, but after spending a lot
of time reading the CVS documentation, I still don't understand
what *exactly* is the difference between update and checkout.
Could someone explain it to me?

Thanks!

Irv

___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


RE: Newbie: update vs. checkout

2004-05-26 Thread Jim.Hyslop
Irving Kimura wrote:
 I'm sorry for this very stupid question, but after spending a lot
 of time reading the CVS documentation, I still don't understand
 what *exactly* is the difference between update and checkout.
 Could someone explain it to me?
There is a little bit of overlap in the functionality.

You use checkout when you have nothing in your working directory yet, i.e.
when you're doing a fresh checkout. You use update to refresh an existing
checked-out project.

If you use the checkout command in an existing working directory, then it
will behave as if you issued the update command.

Clear as mud? :-)

Maybe an example will help:

mkdir fresh
cd fresh # at this point, there is no working directory
cvs update # error - there's nothing to update
cvs checkout mymodule
cd mymodule
[some time passes]
cvs update # refresh the working copy
cvs checkout # refresh the working copy


-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. (http://www.leitch.com)
Columnist, C/C++ Users Journal (http://www.cuj.com/experts)


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Newbie: update vs. checkout

2004-05-26 Thread Colin Robinson
Irving Kimura [EMAIL PROTECTED] wrote:

 I'm sorry for this very stupid question, but after spending a lot
 of time reading the CVS documentation, I still don't understand
 what *exactly* is the difference between update and checkout.
 Could someone explain it to me?
 
 Thanks!
 
 Irv

Checkout gets a copy from the Repository so you can work with it.

Update - 'After you've run checkout to create your private copy of
source from the common repository, other developers will continue
changing the central source. From time to time, when it is convenient in
your development process, you can use the update command from within
your working directory to reconcile your work with any revisions applied
to the source repository since your last checkout or update.'

So it seems to me that your working copy will be updated from the
Repository.

Someone that knows more should be along shortly if I've got it wrong.

CR
Norwich
___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Newbie: update vs. checkout

2004-05-26 Thread Frederic Brehm
At 01:31 PM 5/26/2004, Irving Kimura wrote:
the difference between update and checkout
Checkout creates a brand new sandbox (working directory) from some version 
of files in the repository. Usually this is the HEAD version, but you can 
specify others.

Update makes the files in an existing sandbox correspond to some version of 
files in the repository merged with local changes if necessary. Usually 
this is the HEAD version of some branch, but you can specify others.

I think that checkout can act like update (in WinCVS only?) if it is run 
from an existing sandbox. Ignore that behavior. It's too confusing.

Fred
___
Frederic W. Brehm, Sarnoff Corporation, http://www.sarnoff.com/

___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Newbie: update vs. checkout

2004-05-26 Thread bill
In [EMAIL PROTECTED] Jim.Hyslop [EMAIL PROTECTED] writes:

Irving Kimura wrote:
 I'm sorry for this very stupid question, but after spending a lot
 of time reading the CVS documentation, I still don't understand
 what *exactly* is the difference between update and checkout.
 Could someone explain it to me?
There is a little bit of overlap in the functionality.

You use checkout when you have nothing in your working directory yet, i.e.
when you're doing a fresh checkout. You use update to refresh an existing
checked-out project.

If you use the checkout command in an existing working directory, then it
will behave as if you issued the update command.

Clear as mud? :-)

Maybe an example will help:

mkdir fresh
cd fresh # at this point, there is no working directory
cvs update # error - there's nothing to update
cvs checkout mymodule
cd mymodule
[some time passes]
cvs update # refresh the working copy
cvs checkout # refresh the working copy


Thanks!  The fog is lifting.  One question that remains has to do
with update/checkout after tagging/rtagging.  It is actually the
exact same question about four different cases:

  cvs  tagSome_Tag
  cvs  tag -b Some_Branch_Tag
  cvs rtagSome_TagMyProject
  cvs rtag -b Some_Branch_Tag MyProject

I've read that one has to call either checkout or update (I can't
remember which) right after doing cvs tag?  (Something about cvs
tag not affecting the working copy, so that if one wants to work
on a tagged copy one has to checkout/update.)

To be more concrete:

  % cd MyProject
  % ls -F CVS
  CVS/
  % cvs -q update
   no output: everything is up-to-date
  % cvs -Q tag Some_Tag

At this point, do I need to cvs update or cvs checkout if I
want to work on the copy I just tagged?

What about exactly the same situation for branched tags, i.e.
everything as before, except that the last command is:

  % cvs -Q tag -b Some_Branch_Tag

?

The manual (4.6, p. 37) actually recommends using cvs rtag rather
than cvs tag for most situations, because rtag will tag even those
checked-in files for which no copy exists in the current working
directory.  Hence the interest in the rtag case:

  % cd MyProject
  % ls -F CVS
  CVS/
  % cvs -q update
   no output: everything is up-to-date
  % cvs -Q rtag Some_Tag MyProject

How about now?  Assuming that I am interested in working only on
those files for which copies already exist in the working directory,
do I need to do cvs update or cvs checkout at this point?

What about the branch tag case?

  % cvs -Q rtag -b Some_Branch_Tag MyProject

Many, many thanks!

Irv
___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Newbie: update vs. checkout

2004-05-26 Thread Mark D. Baushke
#part sign=pgp [EMAIL PROTECTED]
Irving Kimura [EMAIL PROTECTED] writes:

Note: Using a pseudonym is considered bad form. Get a disposable e-mail
address and use that if you must, but there are times when a direct
response rather than a list response is the correct action and you have
made that action impossible.

 I'm sorry for this very stupid question, but after spending a lot
 of time reading the CVS documentation, I still don't understand
 what *exactly* is the difference between update and checkout.
 Could someone explain it to me?

A checkout starts with no files in the current directory and populates
the files from the repository into the current directory.

An update will merge any changes that have been committed into the
repository since the last update into your current tree without losing
any of your local changes.

-- Mark



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


RE: Newbie: update vs. checkout

2004-05-26 Thread Jim.Hyslop
bill wrote:
 Thanks!  The fog is lifting.  One question that remains has to do
 with update/checkout after tagging/rtagging.  It is actually the
 exact same question about four different cases:
 
   cvs  tagSome_Tag
   cvs  tag -b Some_Branch_Tag
   cvs rtagSome_TagMyProject
   cvs rtag -b Some_Branch_Tag MyProject

 I've read that one has to call either checkout or update (I can't
 remember which) right after doing cvs tag?  (Something about cvs
 tag not affecting the working copy, so that if one wants to work
 on a tagged copy one has to checkout/update.)
Well, the answer is the same whether you're using tag or rtag, so there are
really two distinct cases: branches and non-branches.

For non-branch tags, you *cannot* modify them, so if you've applied a
non-branch tag you probably do not want to update to that tag. On the other
hand, if you've just applied a branch tag, then you may or may not want to
update to that tag - it depends whether you want to work on the branch or on
the trunk.

 The manual (4.6, p. 37) actually recommends using cvs rtag rather
 than cvs tag for most situations, because rtag will tag even those
 checked-in files for which no copy exists in the current working
 directory.
Well, that's certainly one valid use case. There are other, equally valid
use-cases for not using rtag.

Look at it this way: if you are applying a tag, why is the file not in your
working directory? Are you trying to apply the tag to a subset of the files
- in which case you *don't* want to use rtag?

I generally use tag, but it's mostly a matter of personal preference.

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. (http://www.leitch.com)
Columnist, C/C++ Users Journal (http://www.cuj.com/experts)



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs