[issue8999] Add Mercurial support to patchcheck

Éric Araujo report at bugs.python.org
Tue Jun 22 12:56:29 CEST 2010


Éric Araujo <merwok at netwok.org> added the comment:

In the absence of formal testing, a few comments on my patch to help
reviewers.

1) If the code is both an svn and hg checkout, hg wins, since it’s not unheard of to use hg on top of svn, whereas the contrary does not make sense to me.

2) The hg status command does not need post-processing like the svn one, since hg status --added --modified will already filter the output, and --no-status means “don’t print A or M at the start of each line”.

3) I changed a list comp for a genexp, and used startswith instead of getitem+contains+eq; does not change behavior.

4) I suppressed the unneeded shell=True argument to subprocess.Popen (and made the command string into a list); does not change behavior since there were no globbing or path expansion of any kind.

Testing is easy: Apply the patch, add bad indentation in a Python file, run make patchcheck (./python Tools/scripts/patchcheck.py on OSes without make), profit.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8999>
_______________________________________


More information about the Python-bugs-list mailing list