##// END OF EJS Templates
subrepo: pass wvfs to _sanitize instead of absolute path to a subrepository...
FUJIWARA Katsunori -
r24724:95eb067b default
parent child Browse files
Show More
@@ -302,8 +302,8 b' def _abssource(repo, push=False, abort=T'
302 if abort:
302 if abort:
303 raise util.Abort(_("default path for subrepository not found"))
303 raise util.Abort(_("default path for subrepository not found"))
304
304
305 def _sanitize(ui, path, ignore):
305 def _sanitize(ui, vfs, ignore):
306 for dirname, dirs, names in os.walk(path):
306 for dirname, dirs, names in os.walk(vfs.base):
307 for i, d in enumerate(dirs):
307 for i, d in enumerate(dirs):
308 if d.lower() == ignore:
308 if d.lower() == ignore:
309 del dirs[i]
309 del dirs[i]
@@ -1132,7 +1132,7 b' class svnsubrepo(abstractsubrepo):'
1132 # update to a directory which has since been deleted and recreated.
1132 # update to a directory which has since been deleted and recreated.
1133 args.append('%s@%s' % (state[0], state[1]))
1133 args.append('%s@%s' % (state[0], state[1]))
1134 status, err = self._svncommand(args, failok=True)
1134 status, err = self._svncommand(args, failok=True)
1135 _sanitize(self.ui, self._ctx.repo().wjoin(self._path), '.svn')
1135 _sanitize(self.ui, self.wvfs, '.svn')
1136 if not re.search('Checked out revision [0-9]+.', status):
1136 if not re.search('Checked out revision [0-9]+.', status):
1137 if ('is already a working copy for a different URL' in err
1137 if ('is already a working copy for a different URL' in err
1138 and (self._wcchanged()[:2] == (False, False))):
1138 and (self._wcchanged()[:2] == (False, False))):
@@ -1433,7 +1433,7 b' class gitsubrepo(abstractsubrepo):'
1433 self._gitcommand(['reset', 'HEAD'])
1433 self._gitcommand(['reset', 'HEAD'])
1434 cmd.append('-f')
1434 cmd.append('-f')
1435 self._gitcommand(cmd + args)
1435 self._gitcommand(cmd + args)
1436 _sanitize(self.ui, self._abspath, '.git')
1436 _sanitize(self.ui, self.wvfs, '.git')
1437
1437
1438 def rawcheckout():
1438 def rawcheckout():
1439 # no branch to checkout, check it out with no branch
1439 # no branch to checkout, check it out with no branch
@@ -1482,7 +1482,7 b' class gitsubrepo(abstractsubrepo):'
1482 if tracking[remote] != self._gitcurrentbranch():
1482 if tracking[remote] != self._gitcurrentbranch():
1483 checkout([tracking[remote]])
1483 checkout([tracking[remote]])
1484 self._gitcommand(['merge', '--ff', remote])
1484 self._gitcommand(['merge', '--ff', remote])
1485 _sanitize(self.ui, self._abspath, '.git')
1485 _sanitize(self.ui, self.wvfs, '.git')
1486 else:
1486 else:
1487 # a real merge would be required, just checkout the revision
1487 # a real merge would be required, just checkout the revision
1488 rawcheckout()
1488 rawcheckout()
@@ -1518,7 +1518,7 b' class gitsubrepo(abstractsubrepo):'
1518 self.get(state) # fast forward merge
1518 self.get(state) # fast forward merge
1519 elif base != self._state[1]:
1519 elif base != self._state[1]:
1520 self._gitcommand(['merge', '--no-commit', revision])
1520 self._gitcommand(['merge', '--no-commit', revision])
1521 _sanitize(self.ui, self._abspath, '.git')
1521 _sanitize(self.ui, self.wvfs, '.git')
1522
1522
1523 if self.dirty():
1523 if self.dirty():
1524 if self._gitstate() != revision:
1524 if self._gitstate() != revision:
General Comments 0
You need to be logged in to leave comments. Login now