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: Martin Jørgensen
Subject: Re: cvs commandline - best way to see what's modified before commiting? + new questions...
Date: Thu, 20 Apr 2006 03:34:11 +0200
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

Jim Hyslop wrote:
-----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.

Ok.

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).

Ok.

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

Nice.

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.

Oh, nice. I haven't seen that error message yet, but was afraid if it wouldn't complain.

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'

Thanks again.


Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk


reply via email to

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