diff -r 685639f9430d -r 60fecc5b14a4 mercurial/bundle2.py --- a/mercurial/bundle2.py Mon Apr 06 15:40:12 2015 -0700 +++ b/mercurial/bundle2.py Mon Apr 06 16:04:33 2015 -0700 @@ -521,6 +521,10 @@ if util.safehasattr(self._fp, 'close'): return self._fp.close() +def getunbundler(ui, fp, header=None): + """return a valid unbundler object for a given header""" + return unbundle20(ui, fp, header) + class unbundle20(unpackermixin): """interpret a bundle2 stream