bzr rm \\ crashes with IndexError

Bug #176263 reported by Martin Pool on 2007-12-14
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Unassigned
Breezy
Medium
Jelmer Vernooij

Bug Description

bazaar can't remove a file named '\' intuitively.

$ touch \\
$ bzr add \\
$ bzr rm \\
bzr quits with the attached error report.

Torsten
--

bzr: ERROR: exceptions.IndexError: list index out of range

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 1121, in run
    force=file_deletion_strategy=='force')
  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/workingtree.py", line 1905, in remove
    want_unversioned=True, specific_files=files):
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 2172, in _iter_changes
    (None, splitpath(current_root_unicode)[-1]),
IndexError: list index out of range

bzr 1.0.0.candidate.1 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'rm', '\\']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_CA.UTF-8'
plugins:
  builddeb /home/spindler/.bazaar/plugins/builddeb [0.92.0dev0]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.0.0]
  gtk /home/spindler/.bazaar/plugins/gtk [0.92.0dev0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  xmloutput /home/spindler/.bazaar/plugins/xmloutput [0.2.0]

** Please send this report to <email address hidden>
   with a description of what you were doing when the
   error occurred.

Related branches

Martin Pool (mbp) on 2007-12-14
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Jelmer Vernooij (jelmer) wrote :

Related to bug 165151 ?

Robert Collins (lifeless) wrote :

Still occurs today. I don't see that this is really dirstate related looking at the traceback, so untagging that.

tags: removed: dirstate
Marius Kruger (amanica) on 2010-04-24
tags: added: rm
Parth Malwankar (parthm) wrote :

This is also present in bzr 2.1.1

[xab]% bzr init
Created a standalone tree (format: 2a)
[xab]% touch \\
[xab]% ls
\
[xab]% bzr add \\
[xab]% bzr -Derror rm \\
bzr: ERROR: exceptions.IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1542, in run
    force=file_deletion_strategy=='force')
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 49, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 2002, in remove
    want_unversioned=True, specific_files=files):
  File "_dirstate_helpers_pyx.pyx", line 1410, in bzrlib._dirstate_helpers_pyx.ProcessEntryC.__next__
  File "_dirstate_helpers_pyx.pyx", line 1539, in bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next
IndexError: list index out of range
[xab]% bzr version
Bazaar (bzr) 2.1.1
  Python interpreter: /usr/bin/python 2.6.5
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.32-21-generic-i686-with-Ubuntu-10.04-lucid
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/parthm/.bazaar
  Bazaar log file: /home/parthm/.bzr.log

Copyright 2005-2010 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Bazaar is part of the GNU Project to produce a free operating system.

[xab]%

Jelmer Vernooij (jelmer) on 2017-11-08
tags: added: check-for-breezy
Jelmer Vernooij (jelmer) on 2018-05-12
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
tags: added: filenames
removed: check-for-breezy
Jelmer Vernooij (jelmer) on 2018-09-17
Changed in brz:
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer) on 2018-09-17
Changed in brz:
status: Triaged → Fix Committed
milestone: none → 3.0.0
Jelmer Vernooij (jelmer) on 2018-11-17
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers