Page MenuHomePhabricator

"arc feature" and "arc bookmark" do not handle 'no bookmarks' correctly
Closed, ResolvedPublic

Description

In Mercurial, if you have no bookmarks in your working copy and run arc bookmarks or arc feature, you get an error:

$ arc bookmark
Exception
Command failed with error #255!
COMMAND
HGPLAIN=1 hg log -l 1 --template '{node}{date|hgdate}{p1node}{desc|firstline}{desc}' -r ''\''no bookmarks'\'''

Instead, we should detect that there are no bookmarks correctly.

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Arcanist.
epriestley added a subscriber: epriestley.

A similar error also happens with arc feature even after creating a feature with arc feature test. (I'm using Mercurial 1.4 .) The following error is generated:

EXCEPTION: (CommandException) Command failed with error #255!
COMMAND
HGPLAIN=1 hg log -l 1 --template '{node}{date|hgdate}{p1node}{desc|firstline}{desc}' -r ''\''test'\'''

STDOUT
(empty)

STDERR
abort: unknown revision ''test''!
 at [/usr/share/arcanist/libphutil/src/future/exec/ExecFuture.php:398]
  #0 ExecFuture::resolvex() called at [/usr/share/arcanist/arcanist/src/workflow/ArcanistFeatureWorkflow.php:207]
  #1 ArcanistFeatureWorkflow::loadCommitInfo(Array { 0 => Array of size 2 starting with: { current => true } }) called at [/usr/share/arcanist/arcanist/src/workflow/ArcanistFeatureWorkflow.php:95]
  #2 ArcanistFeatureWorkflow::run() called at [/usr/share/arcanist/arcanist/scripts/arcanist.php:322]

Note: there are "special characters" that appear over top of the left curly brackets ( { ) on the HGPLAIN line before date, p1node, desc|firstline and desc but NOT on the curly brace before node. These special character do not appear when pasting here.

Note 2: The error indicates unknown revision ' ' test ' ' with 2 sets of single quotes. Perhaps the 2 sets of single quotes is part of the issue?