From 1c507f14af116338bc30825aaeaeba3a5cb1524f Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 24 Apr 2013 17:09:19 -0700 Subject: [PATCH] Support Mercurial commands on Windows Test Plan: Grepped Hg repo. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5774 --- src/applications/repository/storage/PhabricatorRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 2623eae213..08eb853b11 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -252,7 +252,8 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO array_unshift($args, $this->getLocalPath()); break; case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: - $pattern = "(cd %s && HGPLAIN=1 hg {$pattern})"; + $hgplain = (phutil_is_windows() ? "set HGPLAIN=1 &&" : "HGPLAIN=1"); + $pattern = "(cd %s && {$hgplain} hg {$pattern})"; array_unshift($args, $this->getLocalPath()); break; default: