[issue314] disallow command prefixes if run non-interactively
Bryan O'Sullivan
mercurial-bugs at selenic.com
Sat Jul 15 06:02:41 UTC 2006
New submission from Bryan O'Sullivan <bos at serpentine.com>:
Mercurial currently lets you use an unambiguous prefix of a command name if
you're feeling lazy, so "hg up" means the same as "hg update", etc.
However, this will wreak havoc with lazy scripts if someone adds a new command
that makes a previously unambiguous command name ambiguous. In the example
above, if someone adds a "hg upchuck" command, all scripts that run "hg up" will
break. Worse, if someone adds the command in an extension, we won't even have a
QA process for noticing.
I think that we should do the moral equivalent of os.isatty() in the command
parser and turn off the prefix matching if we find that stdin/stdout is not a
terminal, i.e. we're running in a script.
----------
messages: 1694
nosy: bos
priority: bug
status: unread
title: disallow command prefixes if run non-interactively
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue314>
____________________________________________________
More information about the Mercurial
mailing list