diff mercurial/exchange.py @ 23591:414374cfb531

bundle2: lowercase part types Since the capitalization no longer carries any meaning (previous diff), this patch normalizes all of the bundle2 part type strings to lower case.
author Eric Sumner <ericsumner@fb.com>
date Wed, 17 Dec 2014 15:11:26 -0800
parents 4dd8a6a1240d
children c5456b64eb07
line wrap: on
line diff
--- a/mercurial/exchange.py	Wed Dec 17 21:14:19 2014 -0800
+++ b/mercurial/exchange.py	Wed Dec 17 15:11:26 2014 -0800
@@ -49,7 +49,7 @@
         if version is None:
             raise ValueError('bundler do not support common obsmarker format')
         stream = obsolete.encodemarkers(markers, True, version=version)
-        return bundler.newpart('B2X:OBSMARKERS', data=stream)
+        return bundler.newpart('b2x:obsmarkers', data=stream)
     return None
 
 class pushoperation(object):
@@ -454,7 +454,7 @@
                                      pushop.remote,
                                      pushop.outgoing)
     if not pushop.force:
-        bundler.newpart('B2X:CHECK:HEADS', data=iter(pushop.remoteheads))
+        bundler.newpart('b2x:check:heads', data=iter(pushop.remoteheads))
     b2caps = bundle2.bundle2caps(pushop.remote)
     version = None
     cgversions = b2caps.get('b2x:changegroup')
@@ -469,7 +469,7 @@
         cg = changegroup.getlocalchangegroupraw(pushop.repo, 'push',
                                                 pushop.outgoing,
                                                 version=version)
-    cgpart = bundler.newpart('B2X:CHANGEGROUP', data=cg)
+    cgpart = bundler.newpart('b2x:changegroup', data=cg)
     if version is not None:
         cgpart.addparam('version', version)
     def handlereply(op):