monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Updated Issue 141 - Invariant when single letter option


From: code
Subject: [Monotone-devel] Updated Issue 141 - Invariant when single letter option is completed to negated option variable (monotone)
Date: Sat, 5 Feb 2011 00:40:19 GMT

Hello,

The following issue has been updated:

141 - Invariant when single letter option is completed to negated option 
variable
Project: monotone
Status: Fixed
Reported by: Thomas Keller
URL: https://code.monotone.ca/p/monotone/issues/141/
Labels:
 Type:Incorrect Behavior
 Priority:Medium
 Milestone:1.0

Comments (last first):

# By Thomas Keller, Feb  5, 2011:

Fixed in rev 649eb10a3481b527990a261b6e6297020d9aed22

 Status: Fixed

# By Thomas Keller, Feb  5, 2011:

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

$ mtn push -b foo

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

mtn: option error: unknown option 'b'


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

mtn: fatal: error: option.cc:462: I(!is_cancel) 


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

0.99.1 and 0.99


The "b" of "-b" is tried to be completed and since push has no other options 
that start with "b", it only matches
the global option "builtin-rcfile", which is the "cancel" version of 
"no-builtin-rcfile". The option parser on the other hand does not expect a 
single letter option to be completed to a negated option of a long option and 
therefor hits the above invariant.

Possible solutions include removing the invariant altogether, completing only 
on "--", not on "-" or completing only when at least two letters are given. The 
second solution seems to make the most sense.



--
Issue: https://code.monotone.ca/p/monotone/issues/141/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]