From b60eaa6487dda3be31d5a1bcfef350851edb473d Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Tue, 10 Jun 2014 10:20:39 -0700 Subject: [PATCH] Make retrieving parents for mercurial commits work consistently across platforms 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php index b77d2254..db23b94d 100644 --- a/src/repository/api/ArcanistMercurialAPI.php +++ b/src/repository/api/ArcanistMercurialAPI.php @@ -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); }