# HG changeset patch # User Martin von Zweigbergk # Date 2014-10-14 05:52:27 # Node ID c95db3208a33f5146722a79da92a21ccac4696f1 # Parent cb4449921a1d0120428dee395b124376903ccbc4 status: update various other methods to return new class diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -1149,7 +1149,8 @@ def overridepurge(orig, ui, repo, *dirs, modified, added, removed, deleted, unknown, ignored, clean = r unknown = [f for f in unknown if lfdirstate[f] == '?'] ignored = [f for f in ignored if lfdirstate[f] == '?'] - return modified, added, removed, deleted, unknown, ignored, clean + return scmutil.status(modified, added, removed, deleted, + unknown, ignored, clean) repo.status = overridestatus orig(ui, repo, *dirs, **opts) repo.status = oldstatus diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -12,7 +12,7 @@ import os from mercurial import error, manifest, match as match_, util from mercurial.i18n import _ -from mercurial import localrepo +from mercurial import localrepo, scmutil import lfcommands import lfutil @@ -242,7 +242,7 @@ def reposetup(ui, repo): wlock.release() self.lfstatus = True - return result + return scmutil.status(*result) # As part of committing, copy all of the largefiles into the # cache. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -341,7 +341,7 @@ class basectx(object): l.sort() # we return a tuple to signify that this list isn't changing - return tuple(r) + return scmutil.status(*r) def makememctx(repo, parents, text, user, date, branch, files, store, @@ -1482,7 +1482,7 @@ class workingctx(committablectx): # (s[1] is 'added' and s[2] is 'removed') s = list(s) s[1], s[2] = s[2], s[1] - return tuple(s) + return scmutil.status(*s) class committablefilectx(basefilectx): """A committablefilectx provides common functionality for a file context diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -9,7 +9,7 @@ import errno, os, re, shutil, posixpath, import xml.dom.minidom import stat, subprocess, tarfile from i18n import _ -import config, util, node, error, cmdutil, match as matchmod +import config, util, node, error, cmdutil, scmutil, match as matchmod import phases import pathutil import exchange @@ -448,7 +448,7 @@ class abstractsubrepo(object): return 1 def status(self, rev2, **opts): - return [], [], [], [], [], [], [] + return scmutil.status([], [], [], [], [], [], []) def diff(self, ui, diffopts, node2, match, prefix, **opts): pass @@ -650,7 +650,7 @@ class hgsubrepo(abstractsubrepo): except error.RepoLookupError, inst: self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n') % (inst, subrelpath(self))) - return [], [], [], [], [], [], [] + return scmutil.status([], [], [], [], [], [], []) @annotatesubrepoerror def diff(self, ui, diffopts, node2, match, prefix, **opts): @@ -1583,7 +1583,8 @@ class gitsubrepo(abstractsubrepo): removed.append(f) deleted = unknown = ignored = clean = [] - return modified, added, removed, deleted, unknown, ignored, clean + return scmutil.status(modified, added, removed, deleted, + unknown, ignored, clean) def shortid(self, revid): return revid[:7] diff --git a/tests/test-context.py.out b/tests/test-context.py.out --- a/tests/test-context.py.out +++ b/tests/test-context.py.out @@ -2,7 +2,7 @@ workingfilectx.date = (1000, 0) ASCII : Gr?ezi! Latin-1 : Gr�ezi! UTF-8 : Grüezi! -(['foo'], [], [], [], [], [], []) + diff --git a/foo b/foo --- a/foo