##// END OF EJS Templates
keyword: make overwrite() arguments mandatory
Christian Ebert -
r6505:7ae26bb2 default
parent child Browse files
Show More
@@ -169,7 +169,7 b' class kwtemplater(object):'
169 Caveat: localrepository._link fails on Windows.'''
169 Caveat: localrepository._link fails on Windows.'''
170 return self.matcher(path) and not islink(path)
170 return self.matcher(path) and not islink(path)
171
171
172 def overwrite(self, node=None, expand=True, files=None):
172 def overwrite(self, node, expand, files):
173 '''Overwrites selected files expanding/shrinking keywords.'''
173 '''Overwrites selected files expanding/shrinking keywords.'''
174 ctx = self.repo.changectx(node)
174 ctx = self.repo.changectx(node)
175 mf = ctx.manifest()
175 mf = ctx.manifest()
@@ -272,7 +272,7 b' def _kwfwrite(ui, repo, expand, *pats, *'
272 try:
272 try:
273 wlock = repo.wlock()
273 wlock = repo.wlock()
274 lock = repo.lock()
274 lock = repo.lock()
275 kwt.overwrite(expand=expand, files=clean)
275 kwt.overwrite(None, expand, clean)
276 finally:
276 finally:
277 del wlock, lock
277 del wlock, lock
278
278
@@ -489,7 +489,7 b' def reposetup(ui, repo):'
489 for name, cmd in commithooks.iteritems():
489 for name, cmd in commithooks.iteritems():
490 ui.setconfig('hooks', name, cmd)
490 ui.setconfig('hooks', name, cmd)
491 if n is not None:
491 if n is not None:
492 kwt.overwrite(node=n)
492 kwt.overwrite(n, True, None)
493 repo.hook('commit', node=n, parent1=_p1, parent2=_p2)
493 repo.hook('commit', node=n, parent1=_p1, parent2=_p2)
494 return n
494 return n
495 finally:
495 finally:
General Comments 0
You need to be logged in to leave comments. Login now