hgext/fastannotate/protocol.py
changeset 41365 876494fd967d
parent 41264 dfc73c803b77
child 43076 2372284d9457
equal deleted inserted replaced
41364:0132221c25cd 41365:876494fd967d
    69         # agree where the main branch is.
    69         # agree where the main branch is.
    70         if actx.lastnode != lastnode:
    70         if actx.lastnode != lastnode:
    71             for p in [actx.revmappath, actx.linelogpath]:
    71             for p in [actx.revmappath, actx.linelogpath]:
    72                 if not os.path.exists(p):
    72                 if not os.path.exists(p):
    73                     continue
    73                     continue
    74                 content = ''
       
    75                 with open(p, 'rb') as f:
    74                 with open(p, 'rb') as f:
    76                     content = f.read()
    75                     content = f.read()
    77                 vfsbaselen = len(repo.vfs.base + '/')
    76                 vfsbaselen = len(repo.vfs.base + '/')
    78                 relpath = p[vfsbaselen:]
    77                 relpath = p[vfsbaselen:]
    79                 result += '%s\0%d\0%s' % (relpath, len(content), content)
    78                 result += '%s\0%d\0%s' % (relpath, len(content), content)