Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changegroup.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 | 903c7e8c97ad |
children | 90f2b9de30f2 |
line wrap: on
line diff
--- a/mercurial/changegroup.py Wed Apr 08 09:38:09 2015 -0700 +++ b/mercurial/changegroup.py Thu Apr 09 16:25:48 2015 -0400 @@ -71,7 +71,7 @@ "": ("", nocompress), # only when using unbundle on ssh and old http servers # since the unification ssh accepts a header but there # is no capability signaling it. - "HG2Y": (), # special-cased below + "HG20": (), # special-cased below "HG10UN": ("HG10UN", nocompress), "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), @@ -102,10 +102,10 @@ fh = os.fdopen(fd, "wb") cleanup = filename - if bundletype == "HG2Y": + if bundletype == "HG20": import bundle2 bundle = bundle2.bundle20(ui) - part = bundle.newpart('b2x:changegroup', data=cg.getchunks()) + part = bundle.newpart('changegroup', data=cg.getchunks()) part.addparam('version', cg.version) z = nocompress() chunkiter = bundle.getchunks()