Mercurial > hg
changeset 22517:e54a001ace06
largefiles: extract 'orig' method in lfilesctx.filectx
author | Martin von Zweigbergk <martinvonz@gmail.com> |
---|---|
date | Tue, 16 Sep 2014 14:51:25 -0700 |
parents | 5e27eccbc0a4 |
children | 52dd6e25121f |
files | hgext/largefiles/reposetup.py |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py Tue Sep 16 14:50:38 2014 -0700 +++ b/hgext/largefiles/reposetup.py Tue Sep 16 14:51:25 2014 -0700 @@ -48,22 +48,20 @@ man1.__class__ = lfilesmanifestdict return man1 def filectx(self, path, fileid=None, filelog=None): + orig = super(lfilesctx, self).filectx try: if filelog is not None: - result = super(lfilesctx, self).filectx( - path, fileid, filelog) + result = orig(path, fileid, filelog) else: - result = super(lfilesctx, self).filectx( - path, fileid) + result = orig(path, fileid) except error.LookupError: # Adding a null character will cause Mercurial to # identify this as a binary file. if filelog is not None: - result = super(lfilesctx, self).filectx( - lfutil.standin(path), fileid, filelog) + result = orig(lfutil.standin(path), fileid, + filelog) else: - result = super(lfilesctx, self).filectx( - lfutil.standin(path), fileid) + result = orig(lfutil.standin(path), fileid) olddata = result.data result.data = lambda: olddata() + '\0' return result