monotone

Issue 143: bad error message on malformed p: selector

Reported by joe 23, Feb 5, 2011

I was trying to look at the parent of the head, I guess p:h: isn't 
it.

Steps to reproduce the problem:
-------------------------------

1. mtn list cert p:h:

Expected result:
----------------

Decent error message

Actual results:
---------------

mtn: expanding selection 'p:h:'
mtn: fatal: error: invalid hex character 'h'
mtn: error: this may be due to a memory glitch, data corruption 
during
mtn: error: a network transfer, corruption of your database or 
workspace,
mtn: error: or a bug in monotone.  if the error persists, please 
contact
mtn: error: monotone-devel@nongnu.org for assistance.
mtn: this is almost certainly a bug in monotone.


Output of `mtn version --full`:
-------------------------------

0.99.1

_MTN/debug:
-----------
expanding selection 'p:h:'
Encountered an error while musing upon the following:
transforms.cc:88: detected internal error, 'E(false)' violated
Current work set: 4 items
----- begin 'system_flavour' (in virtual void 
sanity::initialize(int, char**, const char*), at sanity.cc:117)
Linux 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 
i686
-----   end 'system_flavour' (in virtual void 
sanity::initialize(int, char**, const char*), at sanity.cc:117)
----- begin 'cmdline_string' (in virtual void 
sanity::initialize(int, char**, const char*), at sanity.cc:131)
'mtn', 'list', 'cert', 'p:h:'
-----   end 'cmdline_string' (in virtual void 
sanity::initialize(int, char**, const char*), at sanity.cc:131)
----- begin 'string(lc_all)' (in virtual void 
sanity::initialize(int, char**, const char*), at sanity.cc:136)
en_US.utf8
-----   end 'string(lc_all)' (in virtual void 
sanity::initialize(int, char**, const char*), at sanity.cc:136)
----- begin 'full_version_string' (in virtual void 
mtn_sanity::initialize(int, char**, const char*), at 
mtn-sanity.cc:32)
monotone 0.99.1 (base revision: 
8973482283db7c36780dce2b54721ccc0f5b7388)
Running on          : Linux 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 
2 01:41:57 UTC 2010 i686
C++ compiler        : GNU C++ version 4.3.2
C++ standard library: GNU libstdc++ version 20080905
Boost version       : 1_40
SQLite version      : 3.5.9 (compiled against 3.5.9)
Lua version         : Lua 5.1
PCRE version        : 7.6 2008-01-28 (compiled against 7.6)
Botan version       : 1.8.9 (compiled against 1.8.9)
Changes since base revision:
format_version "1"

new_manifest [c1270158b7fa91abf8235ad129b0476943bde1ed]

old_revision [8973482283db7c36780dce2b54721ccc0f5b7388]

  Generated from data cached in the distribution;
  further changes may have been made.
-----   end 'full_version_string' (in virtual void 
mtn_sanity::initialize(int, char**, const char*), at 
mtn-sanity.cc:32)

Comment 1 by Thomas Keller, Feb 5, 2011

Yes, the p: selector is a simple selector, not a selector function, 
and can therefor not be used like this. But you can use the new 
'parent' selector function, which was introduced in 0.99:

$ mtn list certs parents(h:)

The error message is really a bit unfortunate, probably caused by a 
bad origin scope - I'll look into this.
Labels: Milestone:1.0
Status: Accepted
Owner: tommyd

Comment 2 by Thomas Keller, Feb 6, 2011

The error message has been improved in revision ab18e9a864. This 
fixes similar issues with the i: selector as well.
Status: Fixed

Created: 13 years 9 months ago by joe 23

Updated: 13 years 9 months ago

Status: Fixed

Owner: Thomas Keller

Labels:
Type:Defect
Priority:Medium
Milestone:1.0

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status