Patchwork [6,of,9] largefiles: extract 'orig' method in reposetup.status

login
register
mail settings
Submitter Martin von Zweigbergk
Date Sept. 17, 2014, 8:40 p.m.
Message ID <20ce7e4eb36f84fce4b3.1410986423@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/5859/
State Superseded
Commit 52dd6e25121fe0ed20faf69bc9848f2bfdc42547
Headers show

Comments

Martin von Zweigbergk - Sept. 17, 2014, 8:40 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1410904316 25200
#      Tue Sep 16 14:51:56 2014 -0700
# Node ID 20ce7e4eb36f84fce4b36b3bc838e9d170f77b42
# Parent  97f44bae21703df2de4ced621c8a798f4f83d73a
largefiles: extract 'orig' method in reposetup.status

Patch

diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -78,9 +78,10 @@ 
         def status(self, node1='.', node2=None, match=None, ignored=False,
                 clean=False, unknown=False, listsubrepos=False):
             listignored, listclean, listunknown = ignored, clean, unknown
+            orig = super(lfilesrepo, self).status
             if not self.lfstatus:
-                return super(lfilesrepo, self).status(node1, node2, match,
-                    listignored, listclean, listunknown, listsubrepos)
+                return orig(node1, node2, match, listignored, listclean,
+                            listunknown, listsubrepos)
 
             # some calls in this function rely on the old version of status
             self.lfstatus = False
@@ -120,9 +121,8 @@ 
                         if match(f):
                             break
                     else:
-                        return super(lfilesrepo, self).status(node1, node2,
-                                match, listignored, listclean,
-                                listunknown, listsubrepos)
+                        return orig(node1, node2, match, listignored, listclean,
+                                    listunknown, listsubrepos)
 
                 # Create a copy of match that matches standins instead
                 # of largefiles.
@@ -146,8 +146,8 @@ 
                 m = copy.copy(match)
                 m._files = tostandins(m._files)
 
-                result = super(lfilesrepo, self).status(node1, node2, m,
-                    listignored, listclean, listunknown, listsubrepos)
+                result = orig(node1, node2, m, listignored, listclean,
+                              listunknown, listsubrepos)
                 if working:
 
                     def sfindirstate(f):