hgext/largefiles/reposetup.py
branchstable
changeset 16141 f346de4dff57
parent 16110 41417443b7d0
child 16247 d87d9d8a8e03
child 16281 d8cc67114dc3
--- a/hgext/largefiles/reposetup.py	Mon Feb 13 17:22:35 2012 +0100
+++ b/hgext/largefiles/reposetup.py	Mon Feb 20 17:59:48 2012 +0100
@@ -63,13 +63,21 @@
                         return man1
                     def filectx(self, path, fileid=None, filelog=None):
                         try:
-                            result = super(lfiles_ctx, self).filectx(path,
-                                fileid, filelog)
+                            if filelog is not None:
+                                result = super(lfiles_ctx, self).filectx(
+                                    path, fileid, filelog)
+                            else:
+                                result = super(lfiles_ctx, self).filectx(
+                                    path, fileid)
                         except error.LookupError:
                             # Adding a null character will cause Mercurial to
                             # identify this as a binary file.
-                            result = super(lfiles_ctx, self).filectx(
-                                lfutil.standin(path), fileid, filelog)
+                            if filelog is not None:
+                                result = super(lfiles_ctx, self).filectx(
+                                    lfutil.standin(path), fileid, filelog)
+                            else:
+                                result = super(lfiles_ctx, self).filectx(
+                                    lfutil.standin(path), fileid)
                             olddata = result.data
                             result.data = lambda: olddata() + '\0'
                         return result