comparison mercurial/subrepo.py @ 37271:14cd5290c4e6

addremove: remove dry_run, similarity from scmutil.addremove (API) Differential Revision: https://phab.mercurial-scm.org/D3000
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sat, 31 Mar 2018 23:49:58 +0530
parents 32857300846c
children 56df2ca5c032
comparison
equal deleted inserted replaced
37270:a53b87e20132 37271:14cd5290c4e6
285 raise NotImplementedError 285 raise NotImplementedError
286 286
287 def add(self, ui, match, prefix, explicitonly, **opts): 287 def add(self, ui, match, prefix, explicitonly, **opts):
288 return [] 288 return []
289 289
290 def addremove(self, matcher, prefix, opts, dry_run, similarity): 290 def addremove(self, matcher, prefix, opts):
291 self.ui.warn("%s: %s" % (prefix, _("addremove is not supported"))) 291 self.ui.warn("%s: %s" % (prefix, _("addremove is not supported")))
292 return 1 292 return 1
293 293
294 def cat(self, match, fm, fntemplate, prefix, **opts): 294 def cat(self, match, fm, fntemplate, prefix, **opts):
295 return 1 295 return 1
508 return cmdutil.add(ui, self._repo, match, 508 return cmdutil.add(ui, self._repo, match,
509 self.wvfs.reljoin(prefix, self._path), 509 self.wvfs.reljoin(prefix, self._path),
510 explicitonly, **opts) 510 explicitonly, **opts)
511 511
512 @annotatesubrepoerror 512 @annotatesubrepoerror
513 def addremove(self, m, prefix, opts, dry_run, similarity): 513 def addremove(self, m, prefix, opts):
514 # In the same way as sub directories are processed, once in a subrepo, 514 # In the same way as sub directories are processed, once in a subrepo,
515 # always entry any of its subrepos. Don't corrupt the options that will 515 # always entry any of its subrepos. Don't corrupt the options that will
516 # be used to process sibling subrepos however. 516 # be used to process sibling subrepos however.
517 opts = copy.copy(opts) 517 opts = copy.copy(opts)
518 opts['subrepos'] = True 518 opts['subrepos'] = True
519 return scmutil.addremove(self._repo, m, 519 return scmutil.addremove(self._repo, m,
520 self.wvfs.reljoin(prefix, self._path), opts, 520 self.wvfs.reljoin(prefix, self._path), opts)
521 dry_run, similarity)
522 521
523 @annotatesubrepoerror 522 @annotatesubrepoerror
524 def cat(self, match, fm, fntemplate, prefix, **opts): 523 def cat(self, match, fm, fntemplate, prefix, **opts):
525 rev = self._state[1] 524 rev = self._state[1]
526 ctx = self._repo[rev] 525 ctx = self._repo[rev]