changeset 24691:def1145cec2d

subrepo: use vfs.unlink instead of os.remove This patch also removes useless composing absolute path by "os.path.join()".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 11 Apr 2015 00:47:09 +0900
parents d1ddf1fe5d33
children 144883a8d0d4
files mercurial/subrepo.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Sat Apr 11 00:47:09 2015 +0900
+++ b/mercurial/subrepo.py	Sat Apr 11 00:47:09 2015 +0900
@@ -1626,11 +1626,10 @@
         for f, kind in self.wvfs.readdir():
             if f == '.git':
                 continue
-            path = os.path.join(self._abspath, f)
             if kind == stat.S_IFDIR:
                 self.wvfs.rmtree(f)
             else:
-                os.remove(path)
+                self.wvfs.unlink(f)
 
     def archive(self, archiver, prefix, match=None):
         total = 0