System Log viewer fails if .bzr.log path contains spaces: WindowsError 123

Reported by David Roberts on 2010-03-09
48
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Bazaar Explorer
High
André Bachmann

Bug Description

Bzr-Explorer v1.0.1 (Marco Polo) installed with bzr-2.1.0-2-setup.exe on WinXP.

Bazaar => Explore => System Log fails with

"bzr: ERROR:[Error 123] The filename, directory name, or volume label syntax is incorrect: u"'C:\\Documents and Settings\\David\\My Documents\\.bzr.log'"

This is apparently a converse of the fix released for #391334. If I back out the quoting introduced at r466 Qviewer finds the log file and displays it correctly.

With r466 in place, as released, .bzr.log says -
"0.125 bazaar version: 2.1.0
0.125 bzr arguments: [u'qviewer', u'"C:\\Documents and Settings\\David\\My Documents\\.bzr.log"']
0.156 looking for plugins in C:/Documents and Settings/David/Application Data/bazaar/2.0/plugins
0.156 looking for plugins in C:/Added Program Files/Bazaar/plugins
0.469 encoding stdout as sys.stdout encoding 'cp850'
0.766 encoding stdout as sys.stdout encoding 'cp850'
0.953 None"

With the r466 quoting removed, 'System Log' displays .bzr.log and says -
"0.125 bazaar version: 2.1.0
0.125 bzr arguments: [u'qviewer', u'C:\\Documents and Settings\\David\\My Documents\\.bzr.log']
0.156 looking for plugins in C:/Documents and Settings/David/Application Data/bazaar/2.0/plugins
0.156 looking for plugins in C:/Added Program Files/Bazaar/plugins
0.469 encoding stdout as sys.stdout encoding 'cp850'
0.734 encoding stdout as sys.stdout encoding 'cp850' "

Giving the 'broken' argument to qviewer on the windows command line succeeds -
>bzr qviewer "C:\\Documents and Settings\\David\\My Documents\\.bzr.log"

Related to the fine detail of unicode support across different OSes perhaps?

(As an aside, it would be an aid to bug-reporting if the text in Error dialog boxes could be selected by a standard 'copy' operation.)

Irongut (irongut) wrote :

Just tested this on XP, 2003 R2 64-bit and 7. Strangely System Log works for me on 7 but I see the same error on XP and 2003 R2 64-bit.

All were identical fresh installs of bzr 2.1.0-1 with the only change from the default install being I don't install bzr-svn.

Alexander Belchenko (bialix) wrote :

@Irongut: do you have spaces in the paths to .bzr.log?

On XP and 2003 yes, there will be spaces in "Documents and Settings".

On Windows 7 the path has no spaces, e.g. "C:\Users\test\Documents".

That explains why you don't have error on Windows 7: the path quoted only in the case it contains spaces.

Changed in bzr-explorer:
status: New → Confirmed
importance: Undecided → High
Joseph Price (pricechild) wrote :

In reply to the initial reporter:
> (As an aside, it would be an aid to bug-reporting if the text in Error dialog boxes could be selected by a standard 'copy' operation.)

I don't have an issue with this.

Just use ctrl+c when the dialogue box is open, then try ctrl+v into a notepad.

As an example, I pressed the 'push' button on an opened sftp:// branch. Error pops up, a ctrl+c, ctrl+v later and I have:

---------------------------
Sorry
---------------------------
Action not yet supported by current app_suite.
---------------------------
OK Show Details...
---------------------------

David Roberts (smartgpx) wrote :

Thanks to Joseph for that hint regarding cut/paste - I was fooled by the fact that the text could not be selected and assumed that no selection meant that cut would be ineffective.

wrt to the substantive issue:

This problem is still evident with the v1.1.0dev version of Explorer as installed with bzr-2.2b2-setup.exe
---------------------------
About Bazaar Explorer
---------------------------
<b>Bazaar Explorer</b> — Version Control for Human Beings<br>Version 1.1.0dev&nbsp;&nbsp;<a href="http://en.wikipedia.org/wiki/Bartolomeu_Dias">"Bartolomeu Dias"</a><br><br><small>QBzr 0.19.0dev1, bzrlib 2.2b2, PyQt 4.4.3, Qt 4.4.1, Python 2.5.4</small><br><br>Copyright © 2009-2010 Canonical Ltd<br><br><a href="http://doc.bazaar.canonical.com/explorer/en/">http://doc.bazaar.canonical.com/explorer/en/</a>
---------------------------
&OK
---------------------------

---------------------------
Error
---------------------------
bzr: ERROR: [Error 123] The filename, directory name, or volume label syntax is incorrect: u'"C:\\Documents and Settings\\David\\My Documents\\.bzr.log"'

---------------------------
Ignore Close
---------------------------

tags: added: easy quoting-paths
Martin Packman (gz) on 2012-01-04
summary: - System Log viewer fails (Marco Polo on WinXP)
+ System Log viewer fails if .bzr.log path contains spaces
summary: - System Log viewer fails if .bzr.log path contains spaces
+ System Log viewer fails if .bzr.log path contains spaces: WindowsError
+ 123

I created a bugfix and tested it successfully under Windows and Linux.

Martin Packman (gz) on 2012-08-08
Changed in bzr-explorer:
assignee: nobody → André Bachmann (andrebachmann-dd)
status: Confirmed → In Progress
Martin Packman (gz) on 2012-08-08
Changed in bzr-explorer:
milestone: none → 1.3.1
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers