]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Added missing space between words in messages.
authorMartin Kralik <majak47@gmail.com>
Fri, 3 May 2013 23:12:16 +0000 (16:12 -0700)
committerepriestley <git@epriestley.com>
Fri, 3 May 2013 23:12:17 +0000 (16:12 -0700)
Summary:
During my attept to `arc land master` on `master` branch
I have discovered that error message is missing few spaces between words.

I have added them and used this ugly readonly command:

  pcregrep --include="\.php$" -M -r '(?<!\\n| )("|'"'"')\.\n\s*\1(?!\\n| )' ~/arc/arcanist/src

to detect other instances of this serious bug.

Two more were found.
This time they were probably introduced in order to abide
to the draconian lint rule about number of columns.

Since I want to be a good citizen,
I have added this missing space to the begining of the next line in both cases.
It is an ugly hack, but I think user should not suffer due to missing spaces.

Another solution could be preserving no leading spaces and splitting long lines.
Or just providing excuse to lint.

Test Plan: Ran `arc land master` on `master` branch.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin
Maniphest Tasks: T3008

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

src/repository/api/ArcanistMercurialAPI.php
src/workflow/ArcanistLandWorkflow.php

index da82d3a30ad8aa17906e85033fd14916b1d837b6..f555b413e133a4326884823f5fb13ca2a08a5c34 100644 (file)
@@ -760,7 +760,7 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
           if (!$err) {
             $this->setBaseCommitExplanation(
               "it is the greatest common ancestor of '{$matches[1]}' and ., as".
-              "specified by '{$rule}' in your {$source} 'base' ".
+              " specified by '{$rule}' in your {$source} 'base' ".
               "configuration.");
             return trim($merge_base);
           }
index aa55e0622529844a8b0ce94c9b913936d1e7c30b..65f798e2676da0ff0c42e69a258f403d027b04e8 100644 (file)
@@ -123,7 +123,7 @@ EOTEXT
       'update-with-rebase' => array(
         'help'    => 'When updating the feature branch, use rebase instead of '.
                      'merge. This might make things work better in some cases.'.
-                     'Set arc.land.update.default to \'rebase\' to make this '.
+                     ' Set arc.land.update.default to \'rebase\' to make this '.
                      'default.',
         'conflicts' => array(
           'merge' => 'The --merge strategy does not update the feature branch.',
@@ -292,9 +292,9 @@ EOTEXT
 
     if ($this->onto == $this->branch) {
       $message =
-        "You can not land a {$this->branchType} onto itself -- you are trying".
-        "to land '{$this->branch}' onto '{$this->onto}'. For more".
-        "information on how to push changes, see 'Pushing and Closing".
+        "You can not land a {$this->branchType} onto itself -- you are trying ".
+        "to land '{$this->branch}' onto '{$this->onto}'. For more ".
+        "information on how to push changes, see 'Pushing and Closing ".
         "Revisions' in 'Arcanist User Guide: arc diff' in the documentation.";
       if (!$this->isHistoryImmutable()) {
         $message .= " You may be able to 'arc amend' instead.";