Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changegroup.py @ 10356:bc2414948012
localrepo: unify changegroup and changegroupsubset code paths a bit
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sun, 07 Feb 2010 09:58:41 +0100 |
parents | 25e572394f5c |
children | 5cef810e588f |
line wrap: on
line diff
--- a/mercurial/changegroup.py Sun Feb 07 00:51:59 2010 +0100 +++ b/mercurial/changegroup.py Sun Feb 07 09:58:41 2010 +0100 @@ -54,6 +54,16 @@ "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), } +def collector(cl, mmfs, files): + # 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) + return collect + # hgweb uses this list to communicate its preferred type bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN']