[Top][All Lists]

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

Re: CVS commits and logs

From: Miles Bader
Subject: Re: CVS commits and logs
Date: Mon, 06 Nov 2006 11:30:07 +0900

Bill Wohler <address@hidden> writes:
> I agree if only one file is committed. However, if multiple files are
> committed, I'd say leave the file names and strip the leading TABs.

And what about multiple _authors_?  Most of my commits are from
automatic merging, which more often than not involves multiple authors.
[I could just strip the author info from the commit messages, but it
seems silly to remove useful information.]

> I check in the ChangeLog at the same time as I check in the file whose
> change it describes. It's easy and the ChangeLog check-in is less
> prone to be forgotten. It seems this is a common practice. Is there a
> good reason for your rule?

Yes.  Indeed, I think it's far better practice to check in all changed
files (including ChangeLogs) with one CVS command, because it reduces
the chance that someone will see a partial commit (something I see
rather commonly actually -- some people seem to have a habit of
commiting the source files first, and then waiting a while before
committing the related ChangeLog changes (and it's not so uncommon that
they just forget to commit the ChangeLog entirely!).

Anyway, because of the nature of most of my commits, these rules seem
very hard to follow -- doing so would automatically would be difficult,
and the amount of extra work required to do so manually non-trivial -- I
see no choice other than to basically ignore them.

I can't see much justification for these specific rules anyway, other
than a vague sense that the commit logs are prettier.  [If there is some
better justification, please do tell.]

In fact, I think a rather different commit guideline might be more
useful from a technical point of view:  Commit all files in a single
"changeset" with a single "cvs ci" command, with a single log message.
This of course requires a commit-message format which can represent, at
the least, multiple file.

This particular guideline is useful because (1) it reduces the window of
opportunity for race conditions, and (2) the identical commit messages
are a _really_ useful hint to programs which scan the CVS repository
trying to group related commits into logical changesets; this is
typically done by gateways from CVS to a more modern source-code
management systems.


Fast, small, soon; pick any 2.

reply via email to

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