hgext/largefiles/reposetup.py
branchstable
changeset 16141 f346de4dff57
parent 16110 41417443b7d0
child 16247 d87d9d8a8e03
child 16281 d8cc67114dc3
equal deleted inserted replaced
16124:0e0060bf2f44 16141:f346de4dff57
    61                         man1 = super(lfiles_ctx, self).manifest()
    61                         man1 = super(lfiles_ctx, self).manifest()
    62                         man1.__class__ = lfiles_manifestdict
    62                         man1.__class__ = lfiles_manifestdict
    63                         return man1
    63                         return man1
    64                     def filectx(self, path, fileid=None, filelog=None):
    64                     def filectx(self, path, fileid=None, filelog=None):
    65                         try:
    65                         try:
    66                             result = super(lfiles_ctx, self).filectx(path,
    66                             if filelog is not None:
    67                                 fileid, filelog)
    67                                 result = super(lfiles_ctx, self).filectx(
       
    68                                     path, fileid, filelog)
       
    69                             else:
       
    70                                 result = super(lfiles_ctx, self).filectx(
       
    71                                     path, fileid)
    68                         except error.LookupError:
    72                         except error.LookupError:
    69                             # Adding a null character will cause Mercurial to
    73                             # Adding a null character will cause Mercurial to
    70                             # identify this as a binary file.
    74                             # identify this as a binary file.
    71                             result = super(lfiles_ctx, self).filectx(
    75                             if filelog is not None:
    72                                 lfutil.standin(path), fileid, filelog)
    76                                 result = super(lfiles_ctx, self).filectx(
       
    77                                     lfutil.standin(path), fileid, filelog)
       
    78                             else:
       
    79                                 result = super(lfiles_ctx, self).filectx(
       
    80                                     lfutil.standin(path), fileid)
    73                             olddata = result.data
    81                             olddata = result.data
    74                             result.data = lambda: olddata() + '\0'
    82                             result.data = lambda: olddata() + '\0'
    75                         return result
    83                         return result
    76                 ctx.__class__ = lfiles_ctx
    84                 ctx.__class__ = lfiles_ctx
    77             return ctx
    85             return ctx