Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireproto.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 | e53f6b72a0e4 |
children | c5456b64eb07 |
line wrap: on
line diff
--- a/mercurial/wireproto.py Wed Dec 17 21:14:19 2014 -0800 +++ b/mercurial/wireproto.py Wed Dec 17 15:11:26 2014 -0800 @@ -837,7 +837,7 @@ os.unlink(tempname) except error.BundleValueError, exc: bundler = bundle2.bundle20(repo.ui) - errpart = bundler.newpart('B2X:ERROR:UNSUPPORTEDCONTENT') + errpart = bundler.newpart('b2x:error:unsupportedcontent') if exc.parttype is not None: errpart.addparam('parttype', exc.parttype) if exc.params: @@ -854,7 +854,7 @@ advargs = [] if inst.hint is not None: advargs.append(('hint', inst.hint)) - bundler.addpart(bundle2.bundlepart('B2X:ERROR:ABORT', + bundler.addpart(bundle2.bundlepart('b2x:error:abort', manargs, advargs)) return streamres(bundler.getchunks()) else: @@ -863,7 +863,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('b2x:error:pushraced', [('message', str(exc))]) return streamres(bundler.getchunks()) else: return pusherr(str(exc))