Invalid entry name because it contains a backslash (\)

Bug #458260 reported by Daniel Clemente
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

While exporting from git to bzr a branch which contains my Emacs configuration, I got:


17:20:24 3000/3873 commits processed at 402/minute (:18229)
ABORT: exception occurred processing commit :20414
bzr: ERROR: bzrlib.errors.InvalidEntryName: Invalid entry name: \begin{}…\end{}.yasnippet

Traceback (most recent call last):
  File "/w/bzr/oficial/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/w/bzr/oficial/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/w/bzr/oficial/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/__init__.py", line 384, in run
    params, verbose, user_map=user_map)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/__init__.py", line 111, in _run
    return proc.process(p.iter_commands)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/processor.py", line 95, in process
    self._process(command_iter)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/processors/generic_processor.py", line 280, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/processor.py", line 117, in _process
    handler(self, cmd)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/processors/generic_processor.py", line 487, in commit_handler
    handler.process()
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/processor.py", line 207, in process
    handler(self, fc)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/bzr_commit_handler.py", line 826, in modify_handler
    filecmd.is_executable, data, self.basis_inventory)
  File "/home/dc/.mirp/.bazaar/plugins/fastimport/bzr_commit_handler.py", line 284, in _modify_item
    ie = inventory.make_entry(kind, basename, parent_id, file_id)
  File "/w/bzr/oficial/bzrlib/inventory.py", line 2315, in make_entry
    return factory(file_id, name, parent_id)
  File "/w/bzr/oficial/bzrlib/inventory.py", line 536, in __init__
    super(InventoryFile, self).__init__(file_id, name, parent_id)
  File "/w/bzr/oficial/bzrlib/inventory.py", line 215, in __init__
    raise errors.InvalidEntryName(name=name)
InvalidEntryName: Invalid entry name: \begin{}…\end{}.yasnippet

bzr 2.1.0dev2 on python 2.5.4 (Linux-2.6.30-2-686-i686-with-debian-squeeze-sid)
arguments: ['/usr/local/bin/bzr', 'fast-import', '/home/dc/.mirp/n/mirepogit']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'ca_ES.UTF-8'
plugins:
  bzrtools /home/dc/.mirp/.bazaar/plugins/bzrtools [2.1.0b1]
  etckeeper /usr/lib/python2.5/site-packages/bzrlib/plugins/etckeeper [unknown]
  explorer /home/dc/.mirp/.bazaar/plugins/explorer [0.8.1]
  fastimport /home/dc/.mirp/.bazaar/plugins/fastimport [0.9.0dev]
  gtk /home/dc/.mirp/.bazaar/plugins/gtk [0.98.0dev1]
  launchpad /w/bzr/oficial/bzrlib/plugins/launchpad [2.1.0dev2]
  netrc_credential_store /w/bzr/oficial/bzrlib/plugins/netrc_credential_store [2.1.0dev2]
  qbzr /home/dc/.mirp/.bazaar/plugins/qbzr [0.15.0dev]

The problem is due to a file called "\begin{}…\end{}.yasnippet" (without the quotes). This comes with yasnippet, an Emacs package ( http://code.google.com/p/yasnippet/ ). This file was correctly tracked in the git repository.

~ $ ls -l .emacs.d/yasnippet-svn/extras/imported/LaTeX-mode/Insert/
total 12
-rw-r--r-- 1 dc dc 139 18 set 11:21 Beamer Overlay Specification.yasnippet
-rw-r--r-- 1 dc dc 222 24 set 08:32 \\begin{}\342\200\246\\end{}.yasnippet
-rw-r--r-- 1 dc dc 222 18 set 11:21 \begin{}…\end{}.yasnippet

If git can handle this, I assume bzr can too.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I can confirm this bug is in bzr itself, not bzr-fastimport. To reproduce:

echo > '\begin{}…\end{}.yasnippet'
bzr init .
bzr add

Here's the exception:

Traceback (most recent call last):
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/builtins.py", line 661, in run
    no_recurse, action=action, save=not dry_run)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/mutabletree.py", line 49, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/mutabletree.py", line 493, in smart_add
    _add_one(self, inv, parent_ie, directory, kind, action)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/mutabletree.py", line 690, in _add_one
    file_id=file_id)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/inventory.py", line 925, in make_entry
    return make_entry(kind, name, parent_id, file_id)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/inventory.py", line 2315, in make_entry
    return factory(file_id, name, parent_id)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/inventory.py", line 536, in __init__
    super(InventoryFile, self).__init__(file_id, name, parent_id)
  File "/home/ian/Projects/bzr/bzr/trunk/bzrlib/inventory.py", line 215, in __init__
    raise errors.InvalidEntryName(name=name)
InvalidEntryName: Invalid entry name: \begin{}…\end{}.yasnippet

affects: bzr-fastimport → bzr
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 458260] Re: Invalid entry name because it contains a backslash (\)

On Mon, 2009-10-26 at 01:03 +0000, Ian Clatworthy wrote:
> I can confirm this bug is in bzr itself, not bzr-fastimport. To
> reproduce:
>
> echo > '\begin{}…\end{}.yasnippet'

This is a dupe, the bug number is quite low.

-Rob

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.