Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireproto.py @ 12042:210049a8d16e
bundle: unify/refactor unbundle/readbundle
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 25 Aug 2010 15:33:06 -0500 |
parents | 4e804302d30c |
children | 516b000fbb7e |
line wrap: on
line diff
--- a/mercurial/wireproto.py Wed Aug 25 15:33:05 2010 -0500 +++ b/mercurial/wireproto.py Wed Aug 25 15:33:06 2010 -0500 @@ -294,13 +294,7 @@ # push can proceed fp.seek(0) - header = fp.read(6) - if header.startswith('HG'): - if not header.startswith('HG10'): - raise ValueError('unknown bundle version') - elif header not in changegroupmod.bundletypes: - raise ValueError('unknown bundle compression type') - gen = changegroupmod.unbundle(header, fp) + gen = changegroupmod.readbundle(fp, None) try: r = repo.addchangegroup(gen, 'serve', proto._client(),