adding files below symlink causes error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
In Progress
|
Medium
|
Martin Pool |
Bug Description
I got the error below with bzr 0.92 on Linux. To reproduce the problem just do:
mkdir dir1
ln -s dir1 sym1
echo "hi" > dir1/test.txt
bzr init .
bzr add */*.txt
(this effectively does "bzr add dir1/test.txt sym1/test.txt")
bzr ci
Then I got the error listed at the end of this bug report.
John Arbash Meinel commented about a potential fix:
>
> I suppose we could call "os.realpath()" on all user supplied
> paths? I'm not
> sure if that will dereference "symlink" (I believe it does.)
>
So, if I make the following change:
--- ../../bzr-
+++ mutabletree.py 2007-11-29 16:06:45.000000000 -0800
@@ -291,7 +291,7 @@
# relative : it's cheaper to make a tree relative path an abspath
# than to convert an abspath to tree relative.
for filepath in file_list:
- rf = _FastPath(
+ rf = _FastPath(
# validate user parameters. Our recursive code avoids adding new files
# that need such validation
if self.is_
then the test case above passes. I don't know if this is a good fix, so I'm filing a bug to keep track of this problem.
Here's the full error message for reference:
added dir1
added sym1
added dir1/test.txt
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/usr/local/
return run_bzr(argv)
File "/usr/local/
ret = run(*run_argv)
File "/usr/local/
return self.run(
File "/usr/local/
author=author)
File "/usr/local/
return unbound(self, *args, **kwargs)
File "/usr/local/
result = WorkingTree3.
File "/usr/local/
return unbound(self, *args, **kwargs)
File "/usr/local/
revprops=
File "/usr/local/
self.
File "/usr/local/
self.
File "/usr/local/
content_
File "/usr/local/
self.
File "/usr/local/
self.
File "/usr/local/
if entry.name in parent.children:
AttributeError: children
bzr 0.92.0 on python 2.4.2.final.0 (linux2)
arguments: ['/usr/
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
launchpad /usr/local/
multiparent /usr/local/
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in bzr: | |
status: | Triaged → Confirmed |
Changed in bzr: | |
status: | Confirmed → In Progress |
assignee: | nobody → Martin Pool (mbp) |
Hi,
Does anyone want to evaluate the suitability of the proposed
fix?
Will, would you like to turn it in to a patch with test case to move forward
on getting this fixed?
Thanks,
James