giving bzr two options results in one being uknown

Bug #5637 reported by Wouter van Heyst
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Unassigned

Bug Description

/usr/bin/bzr --profile revno
no problem

/usr/bin/bzr --no-plugins revno
no problem

/usr/bin/bzr --profile --no-plugins revno
bzr: ERROR: unknown command '--no-plugins'

/usr/bin/bzr --no-plugins --profile revno
bzr: ERROR: unknown command '--profile'

/usr/bin/bzr is 0.6 as in Debian sid, the problem also exists in bzr.dev

testcase coming up

Revision history for this message
Wouter van Heyst (larstiq) wrote : test that bzr can be passed more than one master option

Not asserting anything, just asserting that the self.run_bzr passes

Revision history for this message
Wouter van Heyst (larstiq) wrote :

The problem can be 'fixed' by not removing entries from argv while we're looping over it.

=== modified file 'bzrlib/commands.py'
--- bzrlib/commands.py
+++ bzrlib/commands.py
@@ -479,7 +479,7 @@
     # to load plugins before doing other command parsing so that they
     # can override commands, but this needs to happen first.

- for a in argv:
+ for a in list(argv):
         if a == '--profile':
             opt_profile = True
         elif a == '--no-plugins':

Revision history for this message
Martin Pool (mbp) wrote :

Fix seems to be in main now - thanks Wouter.

Changed in bzr:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.