[BUG] handle "-" as an argument
Robert Widhopf-Fenk
hack at robf.de
Fri Jun 23 21:02:42 BST 2006
A typo and its result.
I am not sure if the attached patch is the right fix ...
> bzr checkout - h
bzr: ERROR: exceptions.IndexError: string index out of range
Traceback (most recent call last):
File "/home/fenk/download/bzr.dev/bzrlib/commands.py", line 692, in run_bzr_catch_errors
return run_bzr(argv)
File "/home/fenk/download/bzr.dev/bzrlib/commands.py", line 655, in run_bzr
ret = run(*run_argv)
File "/home/fenk/download/bzr.dev/bzrlib/commands.py", line 259, in run_argv_aliases
args, opts = parse_args(self, argv, alias_argv)
File "/home/fenk/download/bzr.dev/bzrlib/commands.py", line 379, in parse_args
if a[1] == '-':
IndexError: string index out of range
bzr 0.9.0dev0 on python 2.4.1.final.0 (linux2)
arguments: ['./bzr', 'checkout', '-', 'h']
** please send this report to bazaar-ng at lists.ubuntu.com
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- bzrlib/commands.py 2006-06-20 05:32:16 +0000
+++ bzrlib/commands.py 2006-06-23 20:01:41 +0000
@@ -365,7 +365,7 @@
for proc_argv in alias_argv, argv:
while proc_argv:
a = proc_argv.pop(0)
- if argsover:
+ if argsover or a == '-':
args.append(a)
continue
elif a == '--':
More information about the bazaar
mailing list