This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients ezio.melotti, ncoghlan, ned.deily, ronaldoussoren, terry.reedy, willingc
Date 2015-04-14.17:35:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429032944.12.0.652889560365.issue16405@psf.upfronthosting.co.za>
In-reply-to
Content
The wording of the patch looks good to me other than one issue: which hook to use.  I notice Nick's suggestion is to use the hg "commit" hook.  But in the comments for the checkwhitespace hook itself, "pretxncommit" is the suggested hook.  The difference between them, AFAIK, is that the "commit" hook is executed after the changeset has been created and applied in the local repo, while the "pretxncommit" hook is called before the changeset is committed and can thus abort the commit.  So in either case, you'll see the warning message from the hook if the changeset has extraneous white space but when using the "commit" hook the changeset will be applied anyway and, to fix it, you either have to strip it or commit a fix in an additional changeset.  There may be some workflows where using "commit" is a better choice (like when using mq) but I think in general using the "pretxncommit" hook is the better choice.

Opinions?

https://hg.python.org/hooks/file/default/checkwhitespace.py#l10
History
Date User Action Args
2015-04-14 17:35:44ned.deilysetrecipients: + ned.deily, terry.reedy, ronaldoussoren, ncoghlan, ezio.melotti, willingc
2015-04-14 17:35:44ned.deilysetmessageid: <1429032944.12.0.652889560365.issue16405@psf.upfronthosting.co.za>
2015-04-14 17:35:44ned.deilylinkissue16405 messages
2015-04-14 17:35:43ned.deilycreate