qrun: internal error in shlex while parsing command line with unmatched quote

Bug #586257 reported by Andrey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Confirmed
Medium
Unassigned

Bug Description

When a leading quotation mark is missing in command line arguments, at least when using "ignore", triggers an internal error.

WinXP under virtualbox, win7 host OS, bzrlib 2.1.1, QBzr 0.18.4, PyQt 4.4.3

trace:
bzr: ERROR: exceptions.ValueError: No closing quotation

Traceback (most recent call last):
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\subprocess.py", line 195, in do_accept
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\run.py", line 302, in do_start
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\util.py", line 1001, in _shlex_split_unicode_windows
  File "shlex.pyo", line 279, in split
  File "shlex.pyo", line 269, in next
  File "shlex.pyo", line 96, in get_token
  File "shlex.pyo", line 172, in read_token
ValueError: No closing quotation

bzr 2.1.1 on python 2.5.4 (win32)
arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qrun', '--ui-mode']
encoding: 'cp1251', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.0.1]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.1]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.1.1]
  news_merge C:\Program Files\Bazaar\plugins\news_merge [2.1.1]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.18.4]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.2]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.7.dev]

Tags: qrun shlex
Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 586257] [NEW] bzr ignore command on a branch containing multiple "_"s and a mixture of cyrillic and latin characters.

Andrey пишет:
> Traceback (most recent call last):
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\subprocess.py", line 195, in do_accept
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\run.py", line 302, in do_start
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\util.py", line 1001, in _shlex_split_unicode_windows
> File "shlex.pyo", line 279, in split
> File "shlex.pyo", line 269, in next
> File "shlex.pyo", line 96, in get_token
> File "shlex.pyo", line 172, in read_token
> ValueError: No closing quotation
>
> bzr 2.1.1 on python 2.5.4 (win32)
> arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qrun', '--ui-mode']

Can you tell the command and its arguments you're trying to run?

Revision history for this message
Andrey (bolibr) wrote : Re: [Bug 586257] [NEW] bzr ignore command on a branch containing multiple "_"s and a mixture of cyrillic and latin characters.

Forgot the opening ' " '; the parameter looked like this:
obj/Debug"

Command thus was:
bzr ignore obj/Debug"

Appears reproducible.

On Thu, May 27, 2010 at 2:02 PM, Alexander Belchenko <email address hidden> wrote:

> Andrey пишет:
> > Traceback (most recent call last):
> > File "C:/Program Files/Bazaar/plugins\qbzr\lib\subprocess.py", line
> 195, in do_accept
> > File "C:/Program Files/Bazaar/plugins\qbzr\lib\run.py", line 302, in
> do_start
> > File "C:/Program Files/Bazaar/plugins\qbzr\lib\util.py", line 1001, in
> _shlex_split_unicode_windows
> > File "shlex.pyo", line 279, in split
> > File "shlex.pyo", line 269, in next
> > File "shlex.pyo", line 96, in get_token
> > File "shlex.pyo", line 172, in read_token
> > ValueError: No closing quotation
> >
> > bzr 2.1.1 on python 2.5.4 (win32)
> > arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qrun', '--ui-mode']
>
> Can you tell the command and its arguments you're trying to run?
>
> --
> bzr ignore command on a branch containing multiple "_"s and a mixture of
> cyrillic and latin characters.
> https://bugs.launchpad.net/bugs/586257
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Qt frontend for Bazaar: New
>
> Bug description:
> Not much to explain, was getting started with Bazaar, tried the ignore
> command and it failed.
> Might even have been human error since I'm new to this one and could have
> done something improperly.
>
>
> WinXP under virtualbox, win7 host OS, bzrlib 2.1.1, QBzr 0.18.4, PyQt 4.4.3
>
> trace:
> bzr: ERROR: exceptions.ValueError: No closing quotation
>
> Traceback (most recent call last):
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\subprocess.py", line 195,
> in do_accept
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\run.py", line 302, in
> do_start
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\util.py", line 1001, in
> _shlex_split_unicode_windows
> File "shlex.pyo", line 279, in split
> File "shlex.pyo", line 269, in next
> File "shlex.pyo", line 96, in get_token
> File "shlex.pyo", line 172, in read_token
> ValueError: No closing quotation
>
> bzr 2.1.1 on python 2.5.4 (win32)
> arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qrun', '--ui-mode']
> encoding: 'cp1251', fsenc: 'mbcs', lang: None
> plugins:
> bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
> explorer C:\Program Files\Bazaar\plugins\explorer [1.0.1]
> launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.1]
> netrc_credential_store C:\Program
> Files\Bazaar\plugins\netrc_credential_store [2.1.1]
> news_merge C:\Program Files\Bazaar\plugins\news_merge [2.1.1]
> qbzr C:\Program Files\Bazaar\plugins\qbzr [0.18.4]
> rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
> svn C:\Program Files\Bazaar\plugins\svn [1.0.2]
> upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
> xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.7.dev]
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/qbzr/+bug/586257/+subscribe
>

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: bzr ignore command on a branch containing multiple "_"s and a mixture of cyrillic and latin characters.

OK. I think we should throw away shlex and use new command-line parser from bzrlib. Although it's different in 2.1 and 2.2 :-/

Changed in qbzr:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Andrey (bolibr) wrote : Re: [Bug 586257] Re: bzr ignore command on a branch containing multiple "_"s and a mixture of cyrillic and latin characters.

The name is misleading tbh, might wanna change it to smth like "Problems
when missing leading quotation mark in command line arguments".

On Thu, May 27, 2010 at 3:17 PM, Alexander Belchenko <email address hidden> wrote:

> OK. I think we should throw away shlex and use new command-line parser
> from bzrlib. Although it's different in 2.1 and 2.2 :-/
>
> ** Changed in: qbzr
> Status: New => Confirmed
>
> ** Changed in: qbzr
> Importance: Undecided => Medium
>
> --
> bzr ignore command on a branch containing multiple "_"s and a mixture of
> cyrillic and latin characters.
> https://bugs.launchpad.net/bugs/586257
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Qt frontend for Bazaar: Confirmed
>
> Bug description:
> Not much to explain, was getting started with Bazaar, tried the ignore
> command and it failed.
> Might even have been human error since I'm new to this one and could have
> done something improperly.
>
>
> WinXP under virtualbox, win7 host OS, bzrlib 2.1.1, QBzr 0.18.4, PyQt 4.4.3
>
> trace:
> bzr: ERROR: exceptions.ValueError: No closing quotation
>
> Traceback (most recent call last):
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\subprocess.py", line 195,
> in do_accept
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\run.py", line 302, in
> do_start
> File "C:/Program Files/Bazaar/plugins\qbzr\lib\util.py", line 1001, in
> _shlex_split_unicode_windows
> File "shlex.pyo", line 279, in split
> File "shlex.pyo", line 269, in next
> File "shlex.pyo", line 96, in get_token
> File "shlex.pyo", line 172, in read_token
> ValueError: No closing quotation
>
> bzr 2.1.1 on python 2.5.4 (win32)
> arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qrun', '--ui-mode']
> encoding: 'cp1251', fsenc: 'mbcs', lang: None
> plugins:
> bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
> explorer C:\Program Files\Bazaar\plugins\explorer [1.0.1]
> launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.1]
> netrc_credential_store C:\Program
> Files\Bazaar\plugins\netrc_credential_store [2.1.1]
> news_merge C:\Program Files\Bazaar\plugins\news_merge [2.1.1]
> qbzr C:\Program Files\Bazaar\plugins\qbzr [0.18.4]
> rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
> svn C:\Program Files\Bazaar\plugins\svn [1.0.2]
> upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
> xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.7.dev]
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/qbzr/+bug/586257/+subscribe
>

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 586257] Re: bzr ignore command on a branch containing multiple "_"s and a mixture of cyrillic and latin characters.

Andrey пишет:
> The name is misleading tbh, might wanna change it to smth like "Problems
> when missing leading quotation mark in command line arguments".

You can edit it.

Andrey (bolibr)
description: updated
summary: - bzr ignore command on a branch containing multiple "_"s and a mixture of
- cyrillic and latin characters.
+ ignore triggers an internal error when a command line argument with a
+ missing leading quotation mark is provided
summary: - ignore triggers an internal error when a command line argument with a
- missing leading quotation mark is provided
+ qrun: internal error in shlex while parsing command line with unmatched
+ quote
tags: added: qrun shlex
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.