Remove --color never for hg calls. It's only available in fairly recent hg versions (issue 5671047)

13 views
Skip to first unread message

mar...@chromium.org

unread,
Feb 14, 2012, 6:38:21 PM2/14/12
to gu...@python.org, coderevie...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: gvrpython,

Description:
Remove --color never for hg calls. It's only available in fairly recent
hg versions

Please review this at http://codereview.appspot.com/5671047/

Affected files:
M upload.py


Index: upload.py
===================================================================
--- a/upload.py
+++ b/upload.py
@@ -1452,9 +1452,7 @@
return os.path.relpath(absname)

def GenerateDiff(self, extra_args):
- cmd = [
- "hg", "diff", "--color", "never", "--git", "-r", self.base_rev
- ] + extra_args
+ cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args
data = RunShell(cmd, silent_ok=True)
svndiff = []
filecount = 0
@@ -1480,8 +1478,7 @@
def GetUnknownFiles(self):
"""Return a list of files unknown to the VCS."""
args = []
- status = RunShell(
- ["hg", "status", "--color", "never", "--rev",
self.base_rev, "-u", "."],
+ status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."],
silent_ok=True)
unknown_files = []
for line in status.splitlines():
@@ -1498,9 +1495,7 @@
is_binary = False
oldrelpath = relpath = self._GetRelPath(filename)
# "hg status -C" returns two lines for moved/copied files, one
otherwise
- out = RunShell(
- [ "hg", "status", "--color", "never", "-C", "--rev", self.base_rev,
- relpath])
+ out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath])
out = out.splitlines()
# HACK: strip error message about missing file/directory if it isn't in
# the working copy


Guido van Rossum

unread,
Feb 14, 2012, 6:57:26 PM2/14/12
to mar...@chromium.org, gu...@python.org, coderevie...@googlegroups.com, re...@codereview-hr.appspotmail.com
LGTM

--
--Guido van Rossum (python.org/~guido)

Reply all
Reply to author
Forward
0 new messages