[petsc-dev] I hate this one
Sean Farley
sean.michael.farley at gmail.com
Mon Jan 21 21:09:30 CST 2013
On Mon, Jan 21, 2013 at 8:58 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> On Mon, Jan 21, 2013 at 7:20 PM, Sean Farley <sean.michael.farley at gmail.com>
> wrote:
>>
>> Ah, ok, I wasn't paying that much attention. Then, I would stick to
>> wrapping this with a hook.
>
>
> It's not clear to me that the same functionality can be implemented using hg
> hooks. Looking at the documentation here,
>
> http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html
>
> It looks like pretxncommit is the only viable place to do the cleaning
> (because precommit doesn't know what will be committed yet), but modifying
> the commit that late is racy. Similarly, an update doesn't seem to be able
> to modify the state to be applied except retroactively through the working
> tree. (Please correct me if I'm wrong.) In general, it looks like hg hooks
> were designed for validating and notifying of operations rather than
> modifying their content.
Mayhaps hooks can't. I haven't looked too hard since I'm low on time
and my motivation for something like this is questionable at best. You
could do it with an extension (which could be a small python script in
the repo even), which would probably borrow heavily from,
http://mercurial.selenic.com/wiki/EolExtension
More information about the petsc-dev
mailing list