]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix wrong plural of an `arc land` message
authorJavier Arteaga <code@jbeta.is>
Thu, 20 Aug 2015 11:19:22 +0000 (04:19 -0700)
committerepriestley <git@epriestley.com>
Thu, 20 Aug 2015 11:19:22 +0000 (04:19 -0700)
Summary:
"Branch" was pluralized as "branchs".

Fixes T9225.

Test Plan:
* Created test repo with two revisions on a feature branch.
* Saw old message, frowned a little.
* Applied patch.
* No longer frowning.

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: avivey, Korvin

Maniphest Tasks: T9225

Differential Revision: https://secure.phabricator.com/D13944

src/workflow/ArcanistLandWorkflow.php

index 98c804b6370032c2d9757a950edbafdbf823441a..8f4356eef1ec537f5d49ddb91e1fbacc2f898810 100644 (file)
@@ -492,17 +492,34 @@ EOTEXT
         'arc amend',
         '--revision <id>'));
     } else if (count($revisions) > 1) {
-      $message = pht(
-        "There are multiple revisions on feature %s '%s' which are not ".
-        "present on '%s':\n\n".
-        "%s\n".
-        "Separate these revisions onto different %s, or use --revision <id>' ".
-        "to use the commit message from <id> and land them all.",
-        $this->branchType,
-        $this->branch,
-        $this->onto,
-        $this->renderRevisionList($revisions),
-        $this->branchType.'s');
+      switch ($this->branchType) {
+        case self::REFTYPE_BOOKMARK:
+          $message = pht(
+            "There are multiple revisions on feature bookmark '%s' which are ".
+            "not present on '%s':\n\n".
+            "%s\n".
+            'Separate these revisions onto different bookmarks, or use '.
+            '--revision <id> to use the commit message from <id> '.
+            'and land them all.',
+            $this->branch,
+            $this->onto,
+            $this->renderRevisionList($revisions));
+          break;
+        case self::REFTYPE_BRANCH:
+        default:
+          $message = pht(
+            "There are multiple revisions on feature branch '%s' which are ".
+            "not present on '%s':\n\n".
+            "%s\n".
+            'Separate these revisions onto different branches, or use '.
+            '--revision <id> to use the commit message from <id> '.
+            'and land them all.',
+            $this->branch,
+            $this->onto,
+            $this->renderRevisionList($revisions));
+          break;
+      }
+
       throw new ArcanistUsageException($message);
     }