D2161: py3: use b'' for changegroup version literals

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sun Feb 11 21:36:09 EST 2018


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Test extensions aren't currently loaded with our custom module
  importer.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2161

AFFECTED FILES
  tests/flagprocessorext.py

CHANGE DETAILS

diff --git a/tests/flagprocessorext.py b/tests/flagprocessorext.py
--- a/tests/flagprocessorext.py
+++ b/tests/flagprocessorext.py
@@ -45,14 +45,14 @@
 
 def supportedoutgoingversions(orig, repo):
     versions = orig(repo)
-    versions.discard('01')
-    versions.discard('02')
-    versions.add('03')
+    versions.discard(b'01')
+    versions.discard(b'02')
+    versions.add(b'03')
     return versions
 
 def allsupportedversions(orig, ui):
     versions = orig(ui)
-    versions.add('03')
+    versions.add(b'03')
     return versions
 
 def noopaddrevision(orig, self, text, transaction, link, p1, p2,
@@ -106,7 +106,7 @@
 
     # Teach exchange to use changegroup 3
     for k in exchange._bundlespeccgversions.keys():
-        exchange._bundlespeccgversions[k] = '03'
+        exchange._bundlespeccgversions[k] = b'03'
 
     # Add wrappers for addrevision, responsible to set flags depending on the
     # revision data contents.



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list