Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(142)

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 4 months ago by M-A
Modified:
14 years, 4 months ago
Reviewers:
gvrpython
CC:
codereview-discuss_googlegroups.com
Visibility:
Public.

Description

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

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -8 lines) Patch
M upload.py View 3 chunks +3 lines, -8 lines 0 comments Download

Messages

Total messages: 2
M-A
14 years, 4 months ago (2012-02-14 23:38:21 UTC) #1
gvrpython
14 years, 4 months ago (2012-02-14 23:57:47 UTC) #2
LGTM

On Tue, Feb 14, 2012 at 3:38 PM,  <maruel@chromium.org> wrote:
> 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 (python.org/~guido)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b