logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Questions about precommit: msg#00302

Subject: Questions about precommit
Hi all,

I have been playing around with commit/precommit hooks, and attempting
to implement some regulations for our "production" repositories.  In
digging around I have discovered that maybe precommit is a bit
misleading.  At least it was misleading to me comming from an SVN
background where start-commit is more in line with what Hg's precommit
is.  I'm wondering if we could have a SVN, which according to the SVN
doco:

This is run when the transaction is complete, but before it is committed.

It is useful for all kinds of stuff, where knowing the actual data
being commited is necesary.  Mercurial's precommit hook is more like a
pre-submit.  The hook is passed zero knowledge.

I have tried to see how this could be implemented in the Mercurial
code, but I don't have the same view of the code as others that have
worked in all the areas (plus, my python is pretty infant still). 
This hook would be ran immediately before the commit hook is ran, and
would rollback the steps performed up to this point on the repository.
 I'm not sure what data can be passed to the hook, but I'm sure there
are plenty of opinions about this.

Thanks,
Daniel.



<Prev in Thread] Current Thread [Next in Thread>