use self.{w,}join when possible
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 08 Nov 2005 10:34:50 -0800
changeset 1510 755e7ac351ef
parent 1509 46a07392cf28
child 1511 a91bfbbe88d3
use self.{w,}join when possible
mercurial/dirstate.py
mercurial/localrepo.py
--- a/mercurial/dirstate.py	Mon Nov 07 15:40:24 2005 -0800
+++ b/mercurial/dirstate.py	Tue Nov 08 10:34:50 2005 -0800
@@ -175,7 +175,7 @@
             if state == "r":
                 self.map[f] = ('r', 0, 0, 0)
             else:
-                s = os.lstat(os.path.join(self.root, f))
+                s = os.lstat(self.wjoin(f))
                 st_size = kw.get('st_size', s.st_size)
                 st_mtime = kw.get('st_mtime', s.st_mtime)
                 self.map[f] = (state, s.st_mode, st_size, st_mtime)
@@ -332,7 +332,7 @@
         # step one, find all files that match our criteria
         files.sort()
         for ff in util.unique(files):
-            f = os.path.join(self.root, ff)
+            f = self.wjoin(ff)
             try:
                 st = os.lstat(f)
             except OSError, inst:
@@ -380,7 +380,7 @@
                 nonexistent = True
                 if not st:
                     try:
-                        f = os.path.join(self.root, fn)
+                        f = self.wjoin(fn)
                         st = os.lstat(f)
                     except OSError, inst:
                         if inst.errno != errno.ENOENT:
--- a/mercurial/localrepo.py	Mon Nov 07 15:40:24 2005 -0800
+++ b/mercurial/localrepo.py	Tue Nov 08 10:34:50 2005 -0800
@@ -43,7 +43,7 @@
 
         self.dirstate = dirstate.dirstate(self.opener, ui, self.root)
         try:
-            self.ui.readconfig(os.path.join(self.path, "hgrc"))
+            self.ui.readconfig(self.join("hgrc"))
         except IOError: pass
 
     def hook(self, name, **args):