Cannot use backslash character in file name

Bug #212195 reported by James Ascroft-Leigh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

I am attempting to use bzr as an svn client. The svn repository seems to contain some file names which bzr struggles with. The bzr-svn plugin seems to be aware of this limitation because it outputs a "friendly" message:

> bzr: ERROR: Unable to convert Subversion path file with \ backslash because it contains characters invalid in Bazaar.

Whereas using a bzr repository directly (without branching from svn) prints a traceback:

> bzr: ERROR: bzrlib.errors.InvalidEntryName: Invalid entry name: file with \ backslash
>
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
> return run_bzr(argv)
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 758, in run_bzr
> ret = run(*run_argv)
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 384, in run
> no_recurse, action=action, save=not dry_run)
> File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 51, in tree_write_locked
> return unbound(self, *args, **kwargs)
> File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 315, in smart_add
> added.extend(_add_one_and_parent(self, inv, None, rf, kind, action))
> File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 518, in _add_one_and_parent
> _add_one(tree, inv, parent_ie, path, kind, action)
> File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 534, in _add_one
> file_id=file_id)
> File "/usr/lib/python2.5/site-packages/bzrlib/inventory.py", line 1083, in make_entry
> return make_entry(kind, name, parent_id, file_id)
> File "/usr/lib/python2.5/site-packages/bzrlib/inventory.py", line 1417, in make_entry
> return factory(file_id, name, parent_id)
> File "/usr/lib/python2.5/site-packages/bzrlib/inventory.py", line 642, in __init__
> super(InventoryFile, self).__init__(file_id, name, parent_id)
> File "/usr/lib/python2.5/site-packages/bzrlib/inventory.py", line 308, in __init__
> raise errors.InvalidEntryName(name=name)
> InvalidEntryName: Invalid entry name: file with \ backslash
>
> bzr 1.0.0 on python 2.5.1.final.0 (linux2)
> arguments: ['/usr/bin/bzr', 'add', 'file with \\ backslash']
> encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
> plugins:
> launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
> multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
> svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.7]
> *** Bazaar has encountered an internal error.
> Please report a bug at https://bugs.launchpad.net/bzr/+filebug
> including this traceback, and a description of what you
> were doing when the error occurred.
> added "file with \ backslash"

As tested on Ubuntu 7.10 (Gutsy Gibbon) with the version of bzr and bzr-svn packaged for that distribution.

Revision history for this message
James Ascroft-Leigh (jwal) wrote :
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.