hgk: (re)optimize reading of changelog and manifest
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 26 Dec 2006 03:42:17 +0100
changeset 3981 180670f14045
parent 3980 e9460fe2f548
child 3982 714fbfe5c9e5
hgk: (re)optimize reading of changelog and manifest
hgext/hgk.py
--- a/hgext/hgk.py	Tue Dec 26 03:29:00 2006 +0100
+++ b/hgext/hgk.py	Tue Dec 26 03:42:17 2006 +0100
@@ -12,11 +12,11 @@
     """diff trees from two commits"""
     def __difftree(repo, node1, node2, files=[]):
         assert node2 is not None
+        mmap = repo.changectx(node1).manifest()
         mmap2 = repo.changectx(node2).manifest()
         status = repo.status(node1, node2, files=files)[:5]
         modified, added, removed, deleted, unknown = status
 
-        mmap = repo.changectx(node1).manifest()
         empty = hg.short(hg.nullid)
 
         for f in modified:
@@ -153,6 +153,7 @@
                     break
                 if full != None:
                     l[x] = repo.changectx(i + x)
+                    l[x].changeset() # force reading
                 else:
                     l[x] = 1
             for x in xrange(chunk-1, -1, -1):