Page MenuHomePhabricator

When users specify a meaningless "literal:" rule, second-guess them
Open, WishlistPublic

Description

libphutil loaded from '/home/thiblahute/devel/libphutil/src'.
arcanist loaded from '/home/thiblahute/devel/arcanist/src'.
Config: Reading user configuration file "/home/thiblahute/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Unable to find .arcconfig in any of these locations: /home/thiblahute/devel/pitivi/1.0-uninstalled/gst-editing-services/.arcconfig.
Working Copy: Path "/home/thiblahute/devel/pitivi/1.0-uninstalled/gst-editing-services" is part of `git` working copy "/home/thiblahute/devel/pitivi/1.0-uninstalled/gst-editing-services".
Working Copy: Project root is at "/home/thiblahute/devel/pitivi/1.0-uninstalled/gst-editing-services".
Config: Did not find local configuration at "/home/thiblahute/devel/pitivi/1.0-uninstalled/gst-editing-services/.git/arc/config".
>>> [0] <conduit> user.whoami() <bytes = 117>
>>> [1] <http> http://SOMETHING/api/user.whoami
<<< [1] <http> 4,474,917 us
<<< [0] <conduit> 4,475,120 us
>>> [2] <exec> $ git diff --no-ext-diff --no-textconv --raw 'HEAD' --
>>> [3] <exec> $ git ls-files --others --exclude-standard
<<< [3] <exec> 70,033 us
<<< [2] <exec> 86,477 us
>>> [4] <exec> $ git diff-files --name-only
<<< [4] <exec> 87,854 us
You have untracked files in this working copy.

  Working copy: /home/thiblahute/devel/pitivi/1.0-uninstalled/gst-editing-services/

  Untracked files in working copy:
    docs/design/ges-cli-formatter.md
    ges/nle/tags
    ges/tags
    raw
    tags
    test
    test.py
    test.xges
    tests/check/ges/tags
    tests/check/nle/tags
    tests/validate/scenarios/remove-last-clip.scenario
    tests/validate/tags
    tools/lex.priv_ges_parse_yy.c
    tools/parse_lex.h
    tools/tags

Since you don't have '.gitignore' rules for these files and have not listed
them in '.git/info/exclude', you may have forgotten to 'git add' them to your
commit.
>>> [5] <exec> $ git rev-parse --verify HEAD^
<<< [5] <exec> 69,755 us
>>> [6] <exec> $ git rev-parse 'HEAD'
<<< [6] <exec> 67,442 us
>>> [7] <exec> $ git log 'cd982f06d0d867a446597f043d646656e1c5be6b' --not '*' --format='%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02' --
<<< [7] <exec> 71,077 us

[2015-02-19 17:41:51] EXCEPTION: (CommandException) Command failed with error #128!
COMMAND
git log 'cd982f06d0d867a446597f043d646656e1c5be6b' --not '*' --format='%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02' --

STDOUT
(empty)

STDERR
fatal: bad revision '*'
 at [<phutil>/src/future/exec/ExecFuture.php:397]
  #0 ExecFuture::resolvex() called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:394]
  #1 ArcanistRepositoryAPI::execxLocal(string, PhutilCommandString, string) called at [<arcanist>/src/repository/api/ArcanistGitAPI.php:173]
  #2 ArcanistGitAPI::getLocalCommitInformation() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:985]
  #3 ArcanistWorkflow::calculateShouldAmend() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:973]
  #4 ArcanistWorkflow::getShouldAmend() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1050]
  #5 ArcanistWorkflow::getAskForAddPrompt(array) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1045]
  #6 ArcanistWorkflow::askForAdd(array) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:864]
  #7 ArcanistWorkflow::requireCleanWorkingCopy() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:642]
  #8 ArcanistDiffWorkflow::runDiffSetupBasics() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:431]
  #9 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:378]

I got it working with that dumb patch:

diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php
index 15850c6..efdf3fa 100644
--- a/src/repository/api/ArcanistGitAPI.php
+++ b/src/repository/api/ArcanistGitAPI.php
@@ -151,10 +151,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
         }
       }
 
-      $against = csprintf(
-        '%s --not %s',
-        $this->getHeadCommit(),
-        $this->getBaseCommit());
+      $against = csprintf( '%s', $this->getHeadCommit());
     }
 
     // NOTE: Windows escaping of "%" symbols apparently is inherently broken;

Event Timeline

thiblahute raised the priority of this task from to Needs Triage.
thiblahute updated the task description. (Show Details)
thiblahute updated the task description. (Show Details)
thiblahute added a subscriber: thiblahute.
chad claimed this task.
chad added a subscriber: chad.

I did update arcanist + libphutil (and by update I even mean removed the repos and cloned again) as recommanded on https://secure.phabricator.com/T7330 but that issue is still here:

My current heads are:

libphutil:

commit e2cdf9f89c88721e7d0b578c30d05d97ea3d8b24
Author: epriestley <git@epriestley.com>
Date:   Tue Feb 17 14:20:43 2015 -0800

    Make parsing of daemon PIDs more robust

arcanist:

commit 8f8fe44b05a464410ce2e2a797c96ec1f7d96c81
Author: epriestley <git@epriestley.com>
Date:   Wed Feb 11 13:02:11 2015 -0800

    Update arcanist to work with more modular translations

Can you give more details on how we can reproduce this?

chad removed chad as the assignee of this task.Feb 20 2015, 2:40 PM

I just managed to get it working specifying the base commit by hand.

Actually it was a mistake on my end since I had set 'lliteral:*' in my commit range rule.

I just think that in that particular case arc could fail more gracefully :)

epriestley renamed this task from Getting "fatal: bad revision '*'" trying to open a new revision to When users specify a meaningless "literal:" rule, second-guess them.Feb 20 2015, 2:51 PM
epriestley triaged this task as Wishlist priority.
epriestley added a project: Arcanist.