]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix an issue in arc patch with git-svn
authorPeng Li <pengli@fb.com>
Tue, 8 Apr 2014 17:46:12 +0000 (10:46 -0700)
committerepriestley <git@epriestley.com>
Tue, 8 Apr 2014 17:46:27 +0000 (10:46 -0700)
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

src/workflow/ArcanistPatchWorkflow.php

index 33d199993246a69f56e5542d1a6df77ddf85ed91..ed66a9b04f07ee4469819d7abe7a1170c083d2b6 100644 (file)
@@ -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,