[PATCH 2 of 5 more-in-stack] writebundle: use 'None' instead of 'UN' for the bundle2 case

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Sep 17 19:18:43 CDT 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1442364234 25200
#      Tue Sep 15 17:43:54 2015 -0700
# Node ID 2bb46f719cfd16ce8385a928546f81aea334fbad
# Parent  fd2be097daf47c1d8f94f1c99084c5240bdb3f95
writebundle: use 'None' instead of 'UN' for the bundle2 case

Let's be modern!

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -117,11 +117,11 @@ def writebundle(ui, cg, filename, bundle
         if bundletype == "HG20":
             from . import bundle2
             bundle = bundle2.bundle20(ui)
             part = bundle.newpart('changegroup', data=cg.getchunks())
             part.addparam('version', cg.version)
-            z = util.compressors['UN']()
+            z = util.compressors[None]()
             chunkiter = bundle.getchunks()
         else:
             if cg.version != '01':
                 raise util.Abort(_('old bundle types only supports v1 '
                                    'changegroups'))


More information about the Mercurial-devel mailing list