info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs commandline - best way to see what's modified before commiting?


From: Jim Hyslop
Subject: Re: cvs commandline - best way to see what's modified before commiting? + new questions...
Date: Tue, 18 Apr 2006 10:58:52 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Jørgensen wrote:
> "Break the build" - you mean a confict, I assume...

Nope. In projects where there's a separate build step (C, C++, Java,
etc.) it's possible to check in a file that makes the build process
fail. That's known as "breaking the build."

For example, if you add a declaration to a header, and check in a source
file that uses the declaration but forget to check in the header, anyone
who updates their files will get a compile error.

> Nice - thanks.
You're welcome.

> BTW: Another newbie question:
> 
> This is actually both a tortoisecvs and command-line-cvs question:
> 
> Today I accidentally deleted a file which I however don't need to modify
> and didn't modify.
> 
> If you can't remember the exact filename (it was cast1.dat or something)
> and you *ONLY* want to retrieve this individual file without touching or
> updating anything else...
> 
> What's the best way?

'cvs -nq update' to the rescue again - it will indicate

U cast1.dat

(or whatever the file name is).

> Because the problem is that it's easy to do a cvs update on a whole
> directory... But how do I update only a single file even though a lot
> else has changed in the current directory?

Once you know the file name, you can specify it in the update command:

cvs update cast1.dat


> Hints for both command-line and tortoisecvs will be appreciated...
I'm afraid I don't know how to do it in tortoise, though.

> My last concern is... Do you always update with -A (to remove sticky
> bit) ? I think I should try to remember that... Or else I might find
> myself looking at, and modifying, an old file suddenly... ?

In general, I try to avoid sticky tags (except branch tags) for
precisely that reason.  'cvs -nq update -A' (or, if you're on a branch,
'cvs -nq update -r branch') would indicate files that have sticky tags
applied, unless that sticky tag happens to correspond to HEAD. But, if
you forget, and try to check in a file that has a sticky tag, CVS will
spit out an error message telling you that the tag is not a branch.

So, I guess the solution is to modify my step 1 previously posted:

1) run 'cvs -nq update -A' or 'cvs -nq update -r current_branch'

- --
Jim Hyslop
Dreampossible: Better software. Simply.     http://www.dreampossible.ca
                 Consulting * Mentoring * Training in
    C/C++ * OOD * SW Development & Practices * Version Management
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFERP6sLdDyDwyJw+MRAgPMAJwJeEGRjBWT5NT27LgdjOt9ePYp7wCgk8IJ
/lRNTaRT2QJivjtVaAE/Huk=
=Hc63
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]