Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireproto.py @ 24686:e0e28e910fa3
bundle2: rename format, parts and config to final names
It is finally time to freeze the bundle2 format! To do so we:
- rename HG2Y to HG20,
- drop "b2x:" prefix from all part names,
- rename capability to "bundle2-exp" to "bundle2"
- rename the hook flag from 'bundle2-exp' to 'bundle2'
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 09 Apr 2015 16:25:48 -0400 |
parents | 2d15c59a001b |
children | 553dc2b094d9 |
line wrap: on
line diff
--- a/mercurial/wireproto.py Wed Apr 08 09:38:09 2015 -0700 +++ b/mercurial/wireproto.py Thu Apr 09 16:25:48 2015 -0400 @@ -617,7 +617,7 @@ caps.append('streamreqs=%s' % ','.join(requiredformats)) if repo.ui.configbool('experimental', 'bundle2-exp', False): capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo)) - caps.append('bundle2-exp=' + urllib.quote(capsblob)) + caps.append('bundle2=' + urllib.quote(capsblob)) caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) caps.append('httpheader=1024') return caps @@ -843,7 +843,7 @@ os.unlink(tempname) except error.BundleValueError, exc: bundler = bundle2.bundle20(repo.ui) - errpart = bundler.newpart('b2x:error:unsupportedcontent') + errpart = bundler.newpart('error:unsupportedcontent') if exc.parttype is not None: errpart.addparam('parttype', exc.parttype) if exc.params: @@ -860,7 +860,7 @@ advargs = [] if inst.hint is not None: advargs.append(('hint', inst.hint)) - bundler.addpart(bundle2.bundlepart('b2x:error:abort', + bundler.addpart(bundle2.bundlepart('error:abort', manargs, advargs)) return streamres(bundler.getchunks()) else: @@ -869,7 +869,7 @@ except error.PushRaced, exc: if getattr(exc, 'duringunbundle2', False): bundler = bundle2.bundle20(repo.ui) - bundler.newpart('b2x:error:pushraced', [('message', str(exc))]) + bundler.newpart('error:pushraced', [('message', str(exc))]) return streamres(bundler.getchunks()) else: return pusherr(str(exc))