[PATCH 10 of 14] changegroup: collect manifest nodes for shallow clone
Vishakh H
vsh426 at gmail.com
Fri Jul 16 02:15:18 CDT 2010
# HG changeset patch
# User Vishakh H <vsh426 at gmail.com>
# Date 1279263210 -19800
# Node ID 2a420893bd473f2d187089e314a86f8ccfe5979f
# Parent 6235071ccd5e7973389a890abb64a88c6d8ccb27
changegroup: collect manifest nodes for shallow clone
collect changedfiles and manifests when changelog node is descendant
of shallowroot.
diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -56,14 +56,15 @@
"HG10GZ": ("HG10GZ", lambda: zlib.compressobj()),
}
-def collector(cl, mmfs, files):
+def collector(cl, mmfs, files, sh_cl=set()):
# Gather information about changeset nodes going out in a bundle.
# We want to gather manifests needed and filelogs affected.
def collect(node):
c = cl.read(node)
- for fn in c[3]:
- files.setdefault(fn, fn)
- mmfs.setdefault(c[0], node)
+ if not sh_cl or node in sh_cl:
+ for fn in c[3]:
+ files.setdefault(fn, fn)
+ mmfs.setdefault(c[0], node)
return collect
# hgweb uses this list to communicate its preferred type
More information about the Mercurial-devel
mailing list