mercurial/bundlerepo.py
changeset 18410 de7dac2a58e8
parent 18216 46f624780ee8
child 18411 8b0f0dd56cec
--- a/mercurial/bundlerepo.py	Wed Jan 16 13:18:22 2013 +0100
+++ b/mercurial/bundlerepo.py	Wed Jan 16 20:41:32 2013 +0100
@@ -20,14 +20,16 @@
 class bundlerevlog(revlog.revlog):
     def __init__(self, opener, indexfile, bundle, linkmapper):
         # How it works:
-        # to retrieve a revision, we need to know the offset of
-        # the revision in the bundle (an unbundle object).
+        # To retrieve a revision, we need to know the offset of the revision in
+        # the bundle (an unbundle object). We store this offset in the index
+        # (start).
         #
-        # We store this offset in the index (start), to differentiate a
-        # rev in the bundle and from a rev in the revlog, we check
-        # len(index[r]). If the tuple is bigger than 7, it is a bundle
-        # (it is bigger since we store the node to which the delta is)
+        # basemap is indexed with revisions coming from the bundle, and it
+        # maps to the corresponding node that is the base of the corresponding
+        # delta.
         #
+        # To differentiate a rev in the bundle from a rev in the revlog, we
+        # check revision against basemap.
         opener = scmutil.readonlyvfs(opener)
         revlog.revlog.__init__(self, opener, indexfile)
         self.bundle = bundle
@@ -385,4 +387,3 @@
         other.close()
 
     return (localrepo, csets, cleanup)
-