diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php
--- a/src/repository/api/ArcanistMercurialAPI.php
+++ b/src/repository/api/ArcanistMercurialAPI.php
@@ -266,8 +266,8 @@
           // 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",
-            $node);
+            'parents --template %s --rev %s',
+            "{node}\n", $node);
         }
 
         $commits[$node] = array(