##// END OF EJS Templates
largefiles: extract 'orig' method in lfilesctx.filectx
Martin von Zweigbergk -
r22517:e54a001a default
parent child Browse files
Show More
@@ -48,22 +48,20 b' def reposetup(ui, repo):'
48 48 man1.__class__ = lfilesmanifestdict
49 49 return man1
50 50 def filectx(self, path, fileid=None, filelog=None):
51 orig = super(lfilesctx, self).filectx
51 52 try:
52 53 if filelog is not None:
53 result = super(lfilesctx, self).filectx(
54 path, fileid, filelog)
54 result = orig(path, fileid, filelog)
55 55 else:
56 result = super(lfilesctx, self).filectx(
57 path, fileid)
56 result = orig(path, fileid)
58 57 except error.LookupError:
59 58 # Adding a null character will cause Mercurial to
60 59 # identify this as a binary file.
61 60 if filelog is not None:
62 result = super(lfilesctx, self).filectx(
63 lfutil.standin(path), fileid, filelog)
61 result = orig(lfutil.standin(path), fileid,
62 filelog)
64 63 else:
65 result = super(lfilesctx, self).filectx(
66 lfutil.standin(path), fileid)
64 result = orig(lfutil.standin(path), fileid)
67 65 olddata = result.data
68 66 result.data = lambda: olddata() + '\0'
69 67 return result
General Comments 0
You need to be logged in to leave comments. Login now