[Top][All Lists]

[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: Tue, 18 Apr 2006 16:32:17 +0200
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

Jim Hyslop wrote:

I use 'cvs -nq update'. Note that the options precede the command. -n
tells CVS not to actually do anything, but simply to report what it
_would_ do if you let it. -q suppresses the 'Processing directory
foo...' output. The command will generate a list of files that are not
under CVS control, locally modified files, and files which need to be
updated from the repository.

Great! Just what I wanted... I don't have to commit in "two steps" like I've done before...

Before I did a 1) "cvs commit", 2) cvs update, 3) cvs add + cvs remove whatever I forgot... (then I usually did one more cvs update, just to make sure everything is okay).

This looks like a much better method, so I can commit everything in one step...

Is cvs update absolutely safe in that, it doesn't overwriting anything
newer? Because I think that would do the trick...

I'm just a bit paranoid if it some day overwrites my new files with cvs
update, before I commited them...

As Todd says, CVS won't overwrite existing files. It's always best to
make sure your local copy is up to date before committing. First, if
someone else has modified the same file, CVS won't let you commit until
you've updated. Second, if someone else modifies a different file in a
way that's incompatible with your changes, you could break the build.

"Break the build" - you mean a confict, I assume...

Breaking the build is a major faux pas. So, whenever I'm about to
commit, my steps are:

1) run 'cvs -nq update'
2) For each file that is unknown (preceded by '?'), do one of:
  a) delete the file
  b) add the file to .cvsignore
  c) 'cvs add' the file

Nice - thanks.

3) If step 1 indicated NO updates or merges were required, commit;
4) run 'cvs update'
5) resolve any conflicts that may have occurred
6) go through the entire build process again
7) go back to step 1

Thanks - this looks *EXACTLY* like what I needed to know... I'll try it later...

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?

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?

Hints for both command-line and tortoisecvs will be appreciated...

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

Best regards / Med venlig hilsen
Martin Jørgensen

Home of Martin Jørgensen -

reply via email to

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