Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
10355:a5576908b589 | 10356:bc2414948012 |
---|---|
51 "": ("", nocompress), | 51 "": ("", nocompress), |
52 "HG10UN": ("HG10UN", nocompress), | 52 "HG10UN": ("HG10UN", nocompress), |
53 "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), | 53 "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), |
54 "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), | 54 "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), |
55 } | 55 } |
56 | |
57 def collector(cl, mmfs, files): | |
58 # Gather information about changeset nodes going out in a bundle. | |
59 # We want to gather manifests needed and filelogs affected. | |
60 def collect(node): | |
61 c = cl.read(node) | |
62 for fn in c[3]: | |
63 files.setdefault(fn, fn) | |
64 mmfs.setdefault(c[0], node) | |
65 return collect | |
56 | 66 |
57 # hgweb uses this list to communicate its preferred type | 67 # hgweb uses this list to communicate its preferred type |
58 bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] | 68 bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] |
59 | 69 |
60 def writebundle(cg, filename, bundletype): | 70 def writebundle(cg, filename, bundletype): |