# HG changeset patch # User Martin von Zweigbergk # Date 2014-09-16 21:50:38 # Node ID 5e27eccbc0a4500dd1670652af4ccbba991dc44a # Parent b4e251b7e9a8dcc798ba011f070a9efda4474fef largefiles: extract 'orig' method in lfilesmanifestdict.__contains__ diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -37,11 +37,8 @@ def reposetup(ui, repo): 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()