comparison mercurial/subrepo.py @ 23537:f1b06a8aad42

commit: propagate --addremove to subrepos if -S is specified (issue3759) The recursive addremove operation occurs completely before the first subrepo is committed. Only hg subrepos support the addremove operation at the moment- svn and git subrepos will warn and abort the commit.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 24 Nov 2014 22:27:49 -0500
parents fcbc66b5da6a
children f274d27f1994
comparison
equal deleted inserted replaced
23536:fcbc66b5da6a 23537:f1b06a8aad42
435 raise NotImplementedError 435 raise NotImplementedError
436 436
437 def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly): 437 def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly):
438 return [] 438 return []
439 439
440 def addremove(self, matcher, prefix, opts, dry_run, similarity):
441 self._ui.warn("%s: %s" % (prefix, _("addremove is not supported")))
442 return 1
443
440 def cat(self, ui, match, prefix, **opts): 444 def cat(self, ui, match, prefix, **opts):
441 return 1 445 return 1
442 446
443 def status(self, rev2, **opts): 447 def status(self, rev2, **opts):
444 return scmutil.status([], [], [], [], [], [], []) 448 return scmutil.status([], [], [], [], [], [], [])
616 620
617 @annotatesubrepoerror 621 @annotatesubrepoerror
618 def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly): 622 def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly):
619 return cmdutil.add(ui, self._repo, match, dryrun, listsubrepos, 623 return cmdutil.add(ui, self._repo, match, dryrun, listsubrepos,
620 os.path.join(prefix, self._path), explicitonly) 624 os.path.join(prefix, self._path), explicitonly)
625
626 def addremove(self, m, prefix, opts, dry_run, similarity):
627 return scmutil.addremove(self._repo, m,
628 os.path.join(prefix, self._path), opts,
629 dry_run, similarity)
621 630
622 @annotatesubrepoerror 631 @annotatesubrepoerror
623 def cat(self, ui, match, prefix, **opts): 632 def cat(self, ui, match, prefix, **opts):
624 rev = self._state[1] 633 rev = self._state[1]
625 ctx = self._repo[rev] 634 ctx = self._repo[rev]