diff 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
line wrap: on
line diff
--- a/mercurial/bundle2.py	Thu Apr 17 02:01:38 2014 -0400
+++ b/mercurial/bundle2.py	Thu Apr 17 15:27:54 2014 -0400
@@ -151,7 +151,7 @@
 _pack = struct.pack
 _unpack = struct.unpack
 
-_magicstring = 'HG20'
+_magicstring = 'HG2X'
 
 _fstreamparamsize = '>H'
 _fpartheadersize = '>H'
@@ -456,7 +456,7 @@
             magic, version = header[0:2], header[2:4]
             if magic != 'HG':
                 raise util.Abort(_('not a Mercurial bundle'))
-            if version != '20':
+            if version != '2X':
                 raise util.Abort(_('unknown bundle version %s') % version)
         self.ui.debug('start processing of %s stream\n' % header)