Patchwork [5,of,8,v2] largefiles: extract 'orig' method in reposetup.status

login
register
mail settings
Submitter Martin von Zweigbergk
Date Sept. 23, 2014, 9:46 p.m.
Message ID <a6e0710be72f0df3e84e.1411508770@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/5927/
State Superseded
Commit 52dd6e25121fe0ed20faf69bc9848f2bfdc42547
Headers show

Comments

Martin von Zweigbergk - Sept. 23, 2014, 9:46 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 a6e0710be72f0df3e84ef410b9f34d86a9990bd4
# Parent  58593ed2f24b47c7fb51be71cc854367f0a79aa8
largefiles: extract 'orig' method in reposetup.status
Pierre-Yves David - Sept. 24, 2014, 12:42 a.m.
On 09/23/2014 02:46 PM, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@gmail.com>
> # Date 1410904316 25200
> #      Tue Sep 16 14:51:56 2014 -0700
> # Node ID a6e0710be72f0df3e84ef410b9f34d86a9990bd4
> # Parent  58593ed2f24b47c7fb51be71cc854367f0a79aa8
> largefiles: extract 'orig' method in reposetup.status

Patches 1-5 pushed to the clowncopter, waiting for a V3 with patch 6 fixed.

Thanks a lot to Mads for the review.

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,
-                    ignored, clean, unknown, listsubrepos)
+                result = orig(node1, node2, m, ignored, clean, unknown,
+                              listsubrepos)
                 if working:
 
                     def sfindirstate(f):