See the previous patch for the reason.
Details
Details
- Reviewers
ryanmce - Group Reviewers
hg-reviewers - Commits
- rHG68ed3b4f86ef: logtoprocess: do not use platform.system()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
I'm +1 on this direction but think we shouldn't have == 'nt' as the "is this windows?" check here.
hgext/logtoprocess.py | ||
---|---|---|
54 | seems like this should be pycompat.iswindows (which probably doesn't exist yet, but should) because comparisons to things that should be constants scattered throughout the code scare me. |
hgext/logtoprocess.py | ||
---|---|---|
54 | This check is common in the code base: mercurial/scmutil.py 44:if pycompat.osname == 'nt': 294: abort = pycompat.osname == 'nt' or lval == 'abort' mercurial/i18n.py 32:if (pycompat.osname == 'nt' mercurial/rcutil.py 18:if pycompat.osname == 'nt': mercurial/subrepo.py 1350: elif pycompat.osname == 'nt': mercurial/color.py 213: if pycompat.osname == 'nt': 382:if pycompat.osname == 'nt': mercurial/vfs.py 546: defaultenabled = pycompat.osname == 'nt' mercurial/util.py 95:if pycompat.osname == 'nt': 1351:if pycompat.osname == 'nt': mercurial/ui.py 1044: if pycompat.osname == 'nt' and not shell: mercurial/sslutil.py 480: pycompat.osname == 'nt'): 720: if pycompat.osname == 'nt': hgext/win32mbcs.py 193: if pycompat.osname == 'nt': hgext/logtoprocess.py 55: if pycompat.osname == 'nt': hgext/schemes.py 119: if (pycompat.osname == 'nt' and len(scheme) == 1 and scheme.isalpha() mercurial/hgweb/server.py 269: if pycompat.osname == 'nt': hgext/convert/subversion.py 106: if pycompat.osname == 'nt': 257: if (pycompat.osname == 'nt' and path[:1] == '/' hgext/largefiles/lfutil.py 78: if pycompat.osname == 'nt': |
seems like this should be pycompat.iswindows (which probably doesn't exist yet, but should) because comparisons to things that should be constants scattered throughout the code scare me.