Illegal option names should be ignored

Bug #1235099 reported by Vincent Ladeuil on 2013-10-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Vincent Ladeuil

Bug Description

Reported on IRC:

<exarkun> I can't push my branch: bzr: ERROR: Option 1,2 is not defined while expanding "lp:~exarkun/pyopenssl/tlsv1_{1,2}".
<exarkun> Can I work-around that somehow or do I have to pick a different branch name?
<mwhudson> you can't call a branch that on lp
<mwhudson> but that error is pretty special
<mwhudson> is it coming from curl or somethign?
<mwhudson> no, that makes no sense
<exarkun> File "/usr/lib/python2.7/dist-packages/bzrlib/config.py", line 3758, in _expand_options_in_string
<exarkun> raise errors.ExpandingUnknownOption(name, string)
<exarkun> ExpandingUnknownOption: Option 1,2 is not defined while expanding "lp:~exarkun/pyopenssl/tlsv1_{1,2}".
<exarkun> with `return self.get_config_stack().get('push_location')` up above it on the stack
<mwhudson> huh huh
<mwhudson> yeah, it's something in the bzr config machinery
<mwhudson> anyway, if you made it work client side, pretty sure lp would tell you to FOAD so try another name i guess
<exarkun> Yea okay. Thanks.
<mwhudson> valid_branch_name_pattern = re.compile(r"^(?i)[a-z0-9][a-z0-9+\.\-@_]*\Z")

While in this specific case launchpad would have refuse the branch, bzr should not try to expand such option names in the first place.

For consistency, trying to register such an option name should also be forbidden (that won't catch the use of illegal option names in option values but is still better than allowing them).

Related branches

Vincent Ladeuil (vila) on 2013-10-04
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila) on 2013-10-08
Changed in bzr:
milestone: none → 2.7b1
status: In Progress → Fix Released
tags: added: config
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers