comparison mercurial/subrepo.py @ 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 f282db2834f9
comparison
equal deleted inserted replaced
24690:d1ddf1fe5d33 24691:def1145cec2d
1624 self.ui.note(_('removing subrepo %s\n') % self._relpath) 1624 self.ui.note(_('removing subrepo %s\n') % self._relpath)
1625 self._gitcommand(['config', 'core.bare', 'true']) 1625 self._gitcommand(['config', 'core.bare', 'true'])
1626 for f, kind in self.wvfs.readdir(): 1626 for f, kind in self.wvfs.readdir():
1627 if f == '.git': 1627 if f == '.git':
1628 continue 1628 continue
1629 path = os.path.join(self._abspath, f)
1630 if kind == stat.S_IFDIR: 1629 if kind == stat.S_IFDIR:
1631 self.wvfs.rmtree(f) 1630 self.wvfs.rmtree(f)
1632 else: 1631 else:
1633 os.remove(path) 1632 self.wvfs.unlink(f)
1634 1633
1635 def archive(self, archiver, prefix, match=None): 1634 def archive(self, archiver, prefix, match=None):
1636 total = 0 1635 total = 0
1637 source, revision = self._state 1636 source, revision = self._state
1638 if not revision: 1637 if not revision: