largefiles: extract 'orig' method in lfilesmanifestdict.__contains__
authorMartin von Zweigbergk <martinvonz@gmail.com>
Tue, 16 Sep 2014 14:50:38 -0700
changeset 22516 5e27eccbc0a4
parent 22515 b4e251b7e9a8
child 22517 e54a001ace06
largefiles: extract 'orig' method in lfilesmanifestdict.__contains__
hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py	Tue Sep 16 14:40:25 2014 -0700
+++ b/hgext/largefiles/reposetup.py	Tue Sep 16 14:50:38 2014 -0700
@@ -37,11 +37,8 @@
             if self.lfstatus:
                 class lfilesmanifestdict(manifest.manifestdict):
                     def __contains__(self, filename):
-                        if super(lfilesmanifestdict,
-                                self).__contains__(filename):
-                            return True
-                        return super(lfilesmanifestdict,
-                            self).__contains__(lfutil.standin(filename))
+                        orig = super(lfilesmanifestdict, self).__contains__
+                        return orig(filename) or orig(lfutil.standin(filename))
                 class lfilesctx(ctx.__class__):
                     def files(self):
                         filenames = super(lfilesctx, self).files()