PathNotChild traceback trying to add a directory that's inside a different working tree

Bug #538352 reported by Mark Summerfield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

I moved two directories (both of which I'd done bzr init; bzr add; bzr ci on) under another directory that itself was within a repository. So the error was mine. Nonetheless, crashing rather than a sensible error message (such as "can't add files to repository X when they are already in repository Y") would help.

Traceback:
 Traceback (most recent call last):
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
     return the_callable(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
     ret = run(*run_argv)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
     return self.run(**all_cmd_args)
   File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 659, in run
     no_recurse, action=action, save=not dry_run)
   File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 53, in tree_write_locked
     return unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 391, in smart_add
     for filepath in osutils.canonical_relpaths(self.basedir, file_list):
   File "/usr/lib/python2.6/dist-packages/bzrlib/osutils.py", line 1122, in canonical_relpaths
     return [canonical_relpath(base, p) for p in paths]
   File "/usr/lib/python2.6/dist-packages/bzrlib/osutils.py", line 1045, in relpath
     raise errors.PathNotChild(rp, base)
 PathNotChild: Path "/home/mark/books/advanced-qt-programming/sandbox/listwidgets" is not a child of path "/home/mark/books/advanced-qt-programming/sandbox/graphicseffects"

Tags: traceback add
Martin Pool (mbp)
description: updated
summary: - I crashed bzr by doing "bzr add" (but know why)
+ PathNotChild traceback trying to add a directory that's inside a
+ different working tree
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: add traceback
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.