]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Make retrieving parents for mercurial commits work consistently across platforms
authorRichard van Velzen <rvanvelzen@experty.com>
Tue, 10 Jun 2014 17:20:39 +0000 (10:20 -0700)
committerepriestley <git@epriestley.com>
Tue, 10 Jun 2014 17:20:39 +0000 (10:20 -0700)
Summary:
Currently the template is single quoted, but Windows only supports double quotes. This meant that the output would be like:
  lang=text
  'aabbccddeeffaabbccddeeffaabbccddeeff0123
  '

Which is clearly wrong.

This is displayed like that in Phabricator as well, which is confusing.

Test Plan: ran `arc diff` on a Windows machine and saw the correct behaviour.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9450

src/repository/api/ArcanistMercurialAPI.php

index b77d22548abf57359bd9a22409f710ce87077b87..db23b94d64dbfbbad7e748fab64bacd359415959 100644 (file)
@@ -266,7 +266,8 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
           // We didn't get a cheap hit on previous commit, so do the full-cost
           // "hg parents" call. We can run these in parallel, at least.
           $futures[$node] = $this->execFutureLocal(
-            "parents --template='{node}\\n' --rev %s",
+            'parents --template %s --rev %s',
+            '{node}\n',
             $node);
         }