regarding pre commit hooks
Steve Borho
steve at borho.org
Wed Oct 17 11:51:14 CDT 2007
On Wed, 2007-10-17 at 21:32 +0530, Amit Upadhyay wrote:
> Hi,
>
> I am considering moving from subversion to mercurial, but I have a
> doubt. In the current system, I require a bug to be open, assigned to
> commiter, and be in "assigned" state before any commit is allowed by
> commiter. There is bugzilla hook in mercurial that will do this, but
> what will happen to my local repository if commit fails?
Changes remain in your local repository until you commit them, revert
them, or use 'hg update -C' to checkout another reversion.
> Lets say I checked in 20 changes, and the log message on first one of
> them was wrong, then what? Can I go back and change the log message of
> an old commit, or may be "pop" the new commits out, fix the offending
> commit, and push the commits back before trying to push to the
> "central" server again?
So long as you've never pushed those revisions to another repository,
the MQ extension will allow you to qimport -r all the revisions down to
the one with the bad comment. You pop them all off, qrefresh -e to edit
the comment, qpush all the revisions back, then qdel -r causes them to
be permanent changesets again.
Once you've published your changes, the cat is out of the bag. History
is generally immutable.
--
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F E2E4 B0C2 5292 F2C6 2C8C
More information about the Mercurial
mailing list