Differential D17377 Diff 41804 src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Show First 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | private function executeMercurialUpdate() { | ||||
$remote = $repository->getRemoteURIEnvelope(); | $remote = $repository->getRemoteURIEnvelope(); | ||||
$future = $repository->getRemoteCommandFuture('pull -u -- %P', $remote); | $future = $repository->getRemoteCommandFuture('pull -u -- %P', $remote); | ||||
$future->setCWD($path); | $future->setCWD($path); | ||||
try { | try { | ||||
$future->resolvex(); | $future->resolvex(); | ||||
} catch (CommandException $ex) { | } catch (CommandException $ex) { | ||||
$err = $ex->getError(); | $err = $ex->getError(); | ||||
$stdout = $ex->getStdOut(); | $stdout = $ex->getStdout(); | ||||
// NOTE: Between versions 2.1 and 2.1.1, Mercurial changed the behavior | // NOTE: Between versions 2.1 and 2.1.1, Mercurial changed the behavior | ||||
// of "hg pull" to return 1 in case of a successful pull with no changes. | // of "hg pull" to return 1 in case of a successful pull with no changes. | ||||
// This behavior has been reverted, but users who updated between Feb 1, | // This behavior has been reverted, but users who updated between Feb 1, | ||||
// 2012 and Mar 1, 2012 will have the erroring version. Do a dumb test | // 2012 and Mar 1, 2012 will have the erroring version. Do a dumb test | ||||
// against stdout to check for this possibility. | // against stdout to check for this possibility. | ||||
// See: https://github.com/phacility/phabricator/issues/101/ | // See: https://github.com/phacility/phabricator/issues/101/ | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |