From: Peng Li Date: Tue, 8 Apr 2014 17:46:12 +0000 (-0700) Subject: Fix an issue in arc patch with git-svn X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0cff627d758c09b50872b5b516311fab9f6dcff4;p=arcanist.git Fix an issue in arc patch with git-svn Summary: We recently moved our HEAD and it caused some issues on `arc patch` with git-svn repos. The base revision is incorrect and patch will fail. Add the check in such case to make it work. The check was there before but removed in change b202158. The reason wasn't mentioned there though. Test Plan: Tried it on svn. Reviewers: lifeihuang, JoelB, #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D8717 --- diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php index 33d19999..ed66a9b0 100644 --- a/src/workflow/ArcanistPatchWorkflow.php +++ b/src/workflow/ArcanistPatchWorkflow.php @@ -296,6 +296,8 @@ EOTEXT $base_revision = $bundle->getBaseRevision(); if ($base_revision && $has_base_revision) { + $base_revision = $repository_api->getCanonicalRevisionName( + $base_revision); $repository_api->execxLocal( 'checkout -b %s %s', $branch_name,