Mercurial > hg
comparison mercurial/bundle2.py @ 21144:7a20fe8dc080
bundle2: use HG2X in the header
The current implementation of bundle2 is still very experimental and the 3.0
freeze is yesterday. The current bundle2 format has never been field-tested, so
we rename the header to HG2X. This leaves the HG20 header available for real
usage as a stable format in Mercurial 3.1.
We won't guarantee that future mercurial versions will keep supporting this
`HG2X` format.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 17 Apr 2014 15:27:54 -0400 |
parents | 2b8c82f7f11d |
children | 4676135ac555 |
comparison
equal
deleted
inserted
replaced
21143:5bb5d4ba14e5 | 21144:7a20fe8dc080 |
---|---|
149 from i18n import _ | 149 from i18n import _ |
150 | 150 |
151 _pack = struct.pack | 151 _pack = struct.pack |
152 _unpack = struct.unpack | 152 _unpack = struct.unpack |
153 | 153 |
154 _magicstring = 'HG20' | 154 _magicstring = 'HG2X' |
155 | 155 |
156 _fstreamparamsize = '>H' | 156 _fstreamparamsize = '>H' |
157 _fpartheadersize = '>H' | 157 _fpartheadersize = '>H' |
158 _fparttypesize = '>B' | 158 _fparttypesize = '>B' |
159 _fpartid = '>I' | 159 _fpartid = '>I' |
454 if header is None: | 454 if header is None: |
455 header = self._readexact(4) | 455 header = self._readexact(4) |
456 magic, version = header[0:2], header[2:4] | 456 magic, version = header[0:2], header[2:4] |
457 if magic != 'HG': | 457 if magic != 'HG': |
458 raise util.Abort(_('not a Mercurial bundle')) | 458 raise util.Abort(_('not a Mercurial bundle')) |
459 if version != '20': | 459 if version != '2X': |
460 raise util.Abort(_('unknown bundle version %s') % version) | 460 raise util.Abort(_('unknown bundle version %s') % version) |
461 self.ui.debug('start processing of %s stream\n' % header) | 461 self.ui.debug('start processing of %s stream\n' % header) |
462 | 462 |
463 @util.propertycache | 463 @util.propertycache |
464 def params(self): | 464 def params(self): |