Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 23576:70a7478c33de
subrepo: drop the 'ui' parameter to cat()
This no longer needs to be explicitly passed because the subrepo object tracks
a 'ui' reference since fcbc66b5da6a. See the change to 'archive' for details
about the differences between the output level in the root repo and subrepo 'ui'
object.
The only use for 'ui' in cat is to emit a status message when a subrepo is
missing. The bad() method on the matcher still uses the root repo's ui, because
narrowing the matcher doesn't change the ui object.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 13 Dec 2014 14:26:38 -0500 |
parents | a2f139d25845 |
children | 597b071a0e0d |
comparison
equal
deleted
inserted
replaced
23575:a2f139d25845 | 23576:70a7478c33de |
---|---|
440 | 440 |
441 def addremove(self, matcher, prefix, opts, dry_run, similarity): | 441 def addremove(self, matcher, prefix, opts, dry_run, similarity): |
442 self.ui.warn("%s: %s" % (prefix, _("addremove is not supported"))) | 442 self.ui.warn("%s: %s" % (prefix, _("addremove is not supported"))) |
443 return 1 | 443 return 1 |
444 | 444 |
445 def cat(self, ui, match, prefix, **opts): | 445 def cat(self, match, prefix, **opts): |
446 return 1 | 446 return 1 |
447 | 447 |
448 def status(self, rev2, **opts): | 448 def status(self, rev2, **opts): |
449 return scmutil.status([], [], [], [], [], [], []) | 449 return scmutil.status([], [], [], [], [], [], []) |
450 | 450 |
634 return scmutil.addremove(self._repo, m, | 634 return scmutil.addremove(self._repo, m, |
635 os.path.join(prefix, self._path), opts, | 635 os.path.join(prefix, self._path), opts, |
636 dry_run, similarity) | 636 dry_run, similarity) |
637 | 637 |
638 @annotatesubrepoerror | 638 @annotatesubrepoerror |
639 def cat(self, ui, match, prefix, **opts): | 639 def cat(self, match, prefix, **opts): |
640 rev = self._state[1] | 640 rev = self._state[1] |
641 ctx = self._repo[rev] | 641 ctx = self._repo[rev] |
642 return cmdutil.cat(ui, self._repo, ctx, match, prefix, **opts) | 642 return cmdutil.cat(self.ui, self._repo, ctx, match, prefix, **opts) |
643 | 643 |
644 @annotatesubrepoerror | 644 @annotatesubrepoerror |
645 def status(self, rev2, **opts): | 645 def status(self, rev2, **opts): |
646 try: | 646 try: |
647 rev1 = self._state[1] | 647 rev1 = self._state[1] |