Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/subrepo.py @ 22914:c95db3208a33
status: update various other methods to return new class
author | Martin von Zweigbergk <martinvonz@gmail.com> |
---|---|
date | Tue, 14 Oct 2014 00:52:27 -0500 |
parents | 15a70ca40b22 |
children | 7d754b7acd55 |
comparison
equal
deleted
inserted
replaced
22913:cb4449921a1d | 22914:c95db3208a33 |
---|---|
7 | 7 |
8 import errno, os, re, shutil, posixpath, sys | 8 import errno, os, re, shutil, posixpath, sys |
9 import xml.dom.minidom | 9 import xml.dom.minidom |
10 import stat, subprocess, tarfile | 10 import stat, subprocess, tarfile |
11 from i18n import _ | 11 from i18n import _ |
12 import config, util, node, error, cmdutil, match as matchmod | 12 import config, util, node, error, cmdutil, scmutil, match as matchmod |
13 import phases | 13 import phases |
14 import pathutil | 14 import pathutil |
15 import exchange | 15 import exchange |
16 hg = None | 16 hg = None |
17 propertycache = util.propertycache | 17 propertycache = util.propertycache |
446 | 446 |
447 def cat(self, ui, match, prefix, **opts): | 447 def cat(self, ui, match, prefix, **opts): |
448 return 1 | 448 return 1 |
449 | 449 |
450 def status(self, rev2, **opts): | 450 def status(self, rev2, **opts): |
451 return [], [], [], [], [], [], [] | 451 return scmutil.status([], [], [], [], [], [], []) |
452 | 452 |
453 def diff(self, ui, diffopts, node2, match, prefix, **opts): | 453 def diff(self, ui, diffopts, node2, match, prefix, **opts): |
454 pass | 454 pass |
455 | 455 |
456 def outgoing(self, ui, dest, opts): | 456 def outgoing(self, ui, dest, opts): |
648 ctx2 = self._repo[rev2] | 648 ctx2 = self._repo[rev2] |
649 return self._repo.status(ctx1, ctx2, **opts) | 649 return self._repo.status(ctx1, ctx2, **opts) |
650 except error.RepoLookupError, inst: | 650 except error.RepoLookupError, inst: |
651 self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n') | 651 self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n') |
652 % (inst, subrelpath(self))) | 652 % (inst, subrelpath(self))) |
653 return [], [], [], [], [], [], [] | 653 return scmutil.status([], [], [], [], [], [], []) |
654 | 654 |
655 @annotatesubrepoerror | 655 @annotatesubrepoerror |
656 def diff(self, ui, diffopts, node2, match, prefix, **opts): | 656 def diff(self, ui, diffopts, node2, match, prefix, **opts): |
657 try: | 657 try: |
658 node1 = node.bin(self._state[1]) | 658 node1 = node.bin(self._state[1]) |
1581 added.append(f) | 1581 added.append(f) |
1582 elif status == 'D': | 1582 elif status == 'D': |
1583 removed.append(f) | 1583 removed.append(f) |
1584 | 1584 |
1585 deleted = unknown = ignored = clean = [] | 1585 deleted = unknown = ignored = clean = [] |
1586 return modified, added, removed, deleted, unknown, ignored, clean | 1586 return scmutil.status(modified, added, removed, deleted, |
1587 unknown, ignored, clean) | |
1587 | 1588 |
1588 def shortid(self, revid): | 1589 def shortid(self, revid): |
1589 return revid[:7] | 1590 return revid[:7] |
1590 | 1591 |
1591 types = { | 1592 types = { |