]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Disable color extensions in Mercurial
authorepriestley <git@epriestley.com>
Fri, 4 Nov 2011 20:33:08 +0000 (13:33 -0700)
committerepriestley <git@epriestley.com>
Fri, 4 Nov 2011 22:21:57 +0000 (15:21 -0700)
Summary: Mercurial has a --color flag which disables the use of ANSI colors. Use
it to prevent "hg diff" from giving us colorized diff output.

Test Plan: Ran "hg diff --color never", verified it disabled ANSI color in diff
output.

Reviewers: Makinde, jungejason, nh, tuomaspelkonen, aran

Reviewed By: aran

CC: aran
Differential Revision: 1079

src/repository/api/mercurial/ArcanistMercurialAPI.php

index fe771736daf34422cab93bf74c54ffe624312a39..23133ca5c0deb077f3aea2f119c2a23ec2081b4b 100644 (file)
@@ -226,6 +226,7 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
   private function getDiffOptions() {
     $options = array(
       '--git',
+      '--color never',
       '-U'.$this->getDiffLinesOfContext(),
     );
     return implode(' ', $options);