Error with 0.92

Will Lentz Will_Lentz at Trimble.com
Fri Nov 30 00:12:52 GMT 2007


> John Arbash Meinel wrote:
>
> 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.)
> 

Thanks, that makes sense.

If I make the following change:
--- ../../bzr-0.92/bzrlib/mutabletree.py        2007-11-09
05:19:24.000000000 -0800
+++ 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(self.relpath(filepath))
+            rf = _FastPath(self.relpath(osutils.realpath(filepath)))
             # validate user parameters. Our recursive code avoids
adding new files
             # that need such validation
             if self.is_control_filename(rf.raw_path): 

then the test case I gave no longer fails.  (But I don't know if this is
a good general fix?)

Thanks,
Will



More information about the bazaar mailing list