Patchwork [4,of,4,STABLE] context.status: remove overriding in workingctx

mail settings
Submitter Martin von Zweigbergk
Date Oct. 23, 2014, 9:27 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/6450/
State Superseded
Headers show


Martin von Zweigbergk - Oct. 23, 2014, 9:27 p.m.
# HG changeset patch
# User Martin von Zweigbergk <>
# Date 1414097000 25200
#      Thu Oct 23 13:43:20 2014 -0700
# Branch stable
# Node ID 47d1e211f68485ad2070fb505966edf34178a564
# Parent  2eb04f88de4b5103fb3c3584811b557b3ec2b771
context.status: remove overriding in workingctx

The workingctx method simply calls the super method. The only effect
it has is that it uses a different default argument for the 'other'
argument. The only in-tree caller is patch.diff, which always passes
an argument to the method, so it should be safe to remove the
overriding. Having the default argument depend on the type seems
rather dangerous anyway.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -1495,14 +1495,6 @@ 
             match.bad = bad
         return match
-    def status(self, other='.', match=None, listignored=False,
-               listclean=False, listunknown=False, listsubrepos=False):
-        # yet to be determined: what to do if 'other' is a 'workingctx' or a
-        # 'memctx'?
-        return super(workingctx, self).status(other, match, listignored,
-                                              listclean, listunknown,
-                                              listsubrepos)
 class committablefilectx(basefilectx):
     """A committablefilectx provides common functionality for a file context
     that wants the ability to commit, e.g. workingfilectx or memfilectx."""