before commit hook; list files to be committed respecting cmd arguments?
Ulrich Thomas Gabor
ulrich.thomas.gabor at googlemail.com
Mon Jul 11 21:22:34 UTC 2016
> Am 11.07.2016 um 23:12 schrieb Ethan Furman <ethan at stoneleaf.us>:
>
> On 07/11/2016 02:01 PM, Ulrich Thomas Gabor via Mercurial wrote:
>
>> I would like to aid the user in cleaning up his proposed changeset as
>> best as possible. This sometimes requires changing files, which should
>> be included in the changeset.
>
> If a file has not been changed why would it need to be included? Or are you saying if file a changes, than file b should have also changed and your hook can check for this?
Yes, the latter is the case. And if file B has not changed, the hook can automatically change it correctly in most cases.
>
>> With a precommit hook this is easy, as the
>> changeset has not been constructed yet, and whatever the hook changes is
>> automatically included in the commit.
>
> Can you give an example?
I want to keep an up-to-date PDF created out of a LaTeX file in every changeset that changes the tex file. There are sometimes compatibility issues between LaTeX versions, so I always want to have the PDF file in the changeset to make sure one has it even when some update to LaTeX prevents the compilation of the original document in the future.
Since compiling takes a while, I neither want to check nor compile the PDF, when the user did not select the tex file to commit.
More information about the Mercurial
mailing list