Show More
@@ -528,9 +528,10 b' def getunbundler(ui, fp, header=None):' | |||||
528 |
|
|
528 | magic, version = header[0:2], header[2:4] | |
529 |
|
|
529 | if magic != 'HG': | |
530 |
|
|
530 | raise util.Abort(_('not a Mercurial bundle')) | |
531 | if version != '2Y': |
|
531 | unbundlerclass = formatmap.get(version) | |
|
532 | if unbundlerclass is None: | |||
532 |
|
|
533 | raise util.Abort(_('unknown bundle version %s') % version) | |
533 |
unbundler = unbundle |
|
534 | unbundler = unbundlerclass(ui, fp) | |
534 | ui.debug('start processing of %s stream\n' % header) |
|
535 | ui.debug('start processing of %s stream\n' % header) | |
535 | return unbundler |
|
536 | return unbundler | |
536 |
|
537 | |||
@@ -615,6 +616,8 b' class unbundle20(unpackermixin):' | |||||
615 | def compressed(self): |
|
616 | def compressed(self): | |
616 | return False |
|
617 | return False | |
617 |
|
618 | |||
|
619 | formatmap = {'2Y': unbundle20} | |||
|
620 | ||||
618 | class bundlepart(object): |
|
621 | class bundlepart(object): | |
619 | """A bundle2 part contains application level payload |
|
622 | """A bundle2 part contains application level payload | |
620 |
|
623 |
General Comments 0
You need to be logged in to leave comments.
Login now