Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/subrepo.py @ 41663:6a447a3d1bd0
addremove: pass around uipathfn and use instead of m.uipath() (API)
Differential Revision: https://phab.mercurial-scm.org/D5903
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 23:25:39 -0800 |
parents | b2df5dc3ebfb |
children | 16a49c778bde |
comparison
equal
deleted
inserted
replaced
41662:b2df5dc3ebfb | 41663:6a447a3d1bd0 |
---|---|
288 raise NotImplementedError | 288 raise NotImplementedError |
289 | 289 |
290 def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): | 290 def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): |
291 return [] | 291 return [] |
292 | 292 |
293 def addremove(self, matcher, prefix, opts): | 293 def addremove(self, matcher, prefix, uipathfn, opts): |
294 self.ui.warn("%s: %s" % (prefix, _("addremove is not supported"))) | 294 self.ui.warn("%s: %s" % (prefix, _("addremove is not supported"))) |
295 return 1 | 295 return 1 |
296 | 296 |
297 def cat(self, match, fm, fntemplate, prefix, **opts): | 297 def cat(self, match, fm, fntemplate, prefix, **opts): |
298 return 1 | 298 return 1 |
519 def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): | 519 def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): |
520 return cmdutil.add(ui, self._repo, match, prefix, uipathfn, | 520 return cmdutil.add(ui, self._repo, match, prefix, uipathfn, |
521 explicitonly, **opts) | 521 explicitonly, **opts) |
522 | 522 |
523 @annotatesubrepoerror | 523 @annotatesubrepoerror |
524 def addremove(self, m, prefix, opts): | 524 def addremove(self, m, prefix, uipathfn, opts): |
525 # In the same way as sub directories are processed, once in a subrepo, | 525 # In the same way as sub directories are processed, once in a subrepo, |
526 # always entry any of its subrepos. Don't corrupt the options that will | 526 # always entry any of its subrepos. Don't corrupt the options that will |
527 # be used to process sibling subrepos however. | 527 # be used to process sibling subrepos however. |
528 opts = copy.copy(opts) | 528 opts = copy.copy(opts) |
529 opts['subrepos'] = True | 529 opts['subrepos'] = True |
530 return scmutil.addremove(self._repo, m, prefix, opts) | 530 return scmutil.addremove(self._repo, m, prefix, uipathfn, opts) |
531 | 531 |
532 @annotatesubrepoerror | 532 @annotatesubrepoerror |
533 def cat(self, match, fm, fntemplate, prefix, **opts): | 533 def cat(self, match, fm, fntemplate, prefix, **opts): |
534 rev = self._state[1] | 534 rev = self._state[1] |
535 ctx = self._repo[rev] | 535 ctx = self._repo[rev] |