]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use underscores instead of hyphens as bookmark suffixes.
authorMehdi Mulani <mehdi@fb.com>
Wed, 7 Aug 2013 21:56:03 +0000 (14:56 -0700)
committerepriestley <git@epriestley.com>
Wed, 7 Aug 2013 21:56:03 +0000 (14:56 -0700)
Summary:
When trying to find an unused bookmark we append hyphened suffixes to the end of the bookmark name. In Mercurial, these are treated the same as the bookmark name without the suffix, here's the output from hg log -r:

```
[mehdi] HGPLAIN=1 hg log -r "arcpatch-1"
abort: unknown revision 'arcpatch'!
[mehdi] HGPLAIN=1 hg log -r "arcpatch_1"
abort: unknown revision 'arcpatch_1'!
```

Test Plan: None.

Reviewers: epriestley, dschleimer

Reviewed By: dschleimer

CC: aran, Korvin, DurhamGoode, dschleimer
Differential Revision: https://secure.phabricator.com/D6698

src/workflow/ArcanistPatchWorkflow.php

index 36a320982e67ddb2aa8604be6c3d7319e496033f..a33e141952a29f48df419c6c24a1809f2831e783 100644 (file)
@@ -217,7 +217,7 @@ EOTEXT
       $base_name .= "-D{$revision_id}";
     }
 
-    $suffixes = array(null, '-1', '-2', '-3');
+    $suffixes = array(null, '_1', '_2', '_3');
     foreach ($suffixes as $suffix) {
       $proposed_name = $base_name.$suffix;