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

REVISION SUMMARY
  The test doesn't pass for what superficially look like good
  reasons. We'll need to come back to it later.
  
  1. skip-blame because it's b prefixes and a couple of b'N' instead of str(N)

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-bundle2-exchange.t

CHANGE DETAILS

diff --git a/tests/test-bundle2-exchange.t b/tests/test-bundle2-exchange.t
--- a/tests/test-bundle2-exchange.t
+++ b/tests/test-bundle2-exchange.t
@@ -472,28 +472,28 @@
   > 
   > configtable = {}
   > configitem = registrar.configitem(configtable)
-  > configitem('failpush', 'reason',
+  > configitem(b'failpush', b'reason',
   >     default=None,
   > )
   > 
   > def _pushbundle2failpart(pushop, bundler):
-  >     reason = pushop.ui.config('failpush', 'reason')
+  >     reason = pushop.ui.config(b'failpush', b'reason')
   >     part = None
-  >     if reason == 'abort':
-  >         bundler.newpart('test:abort')
-  >     if reason == 'unknown':
-  >         bundler.newpart('test:unknown')
-  >     if reason == 'race':
+  >     if reason == b'abort':
+  >         bundler.newpart(b'test:abort')
+  >     if reason == b'unknown':
+  >         bundler.newpart(b'test:unknown')
+  >     if reason == b'race':
   >         # 20 Bytes of crap
-  >         bundler.newpart('check:heads', data='01234567890123456789')
+  >         bundler.newpart(b'check:heads', data=b'01234567890123456789')
   > 
-  > @bundle2.parthandler("test:abort")
+  > @bundle2.parthandler(b"test:abort")
   > def handleabort(op, part):
-  >     raise error.Abort('Abandon ship!', hint="don't panic")
+  >     raise error.Abort(b'Abandon ship!', hint=b"don't panic")
   > 
   > def uisetup(ui):
-  >     exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
-  >     exchange.b2partsgenorder.insert(0, 'failpart')
+  >     exchange.b2partsgenmapping[b'failpart'] = _pushbundle2failpart
+  >     exchange.b2partsgenorder.insert(0, b'failpart')
   > 
   > EOF
 
@@ -782,16 +782,16 @@
   > from mercurial import pushkey
   > from mercurial import node
   > from mercurial import error
-  > @exchange.b2partsgenerator('failingpuskey')
+  > @exchange.b2partsgenerator(b'failingpuskey')
   > def addfailingpushey(pushop, bundler):
   >     enc = pushkey.encode
-  >     part = bundler.newpart('pushkey')
-  >     part.addparam('namespace', enc('phases'))
-  >     part.addparam('key', enc('cd010b8cd998f3981a5a8115f94f8da4ab506089'))
-  >     part.addparam('old', enc(str(0))) # successful update
-  >     part.addparam('new', enc(str(0)))
+  >     part = bundler.newpart(b'pushkey')
+  >     part.addparam(b'namespace', enc(b'phases'))
+  >     part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089'))
+  >     part.addparam(b'old', enc(b'0')) # successful update
+  >     part.addparam(b'new', enc(b'0'))
   >     def fail(pushop, exc):
-  >         raise error.Abort('Correct phase push failed (because hooks)')
+  >         raise error.Abort(b'Correct phase push failed (because hooks)')
   >     pushop.pkfailcb[part.id] = fail
   > EOF
   $ cat >> $HGRCPATH << EOF
@@ -858,16 +858,16 @@
   > from mercurial import pushkey
   > from mercurial import node
   > from mercurial import error
-  > @exchange.b2partsgenerator('failingpuskey')
+  > @exchange.b2partsgenerator(b'failingpuskey')
   > def addfailingpushey(pushop, bundler):
   >     enc = pushkey.encode
-  >     part = bundler.newpart('pushkey')
-  >     part.addparam('namespace', enc('phases'))
-  >     part.addparam('key', enc('cd010b8cd998f3981a5a8115f94f8da4ab506089'))
-  >     part.addparam('old', enc(str(4))) # will fail
-  >     part.addparam('new', enc(str(3)))
+  >     part = bundler.newpart(b'pushkey')
+  >     part.addparam(b'namespace', enc(b'phases'))
+  >     part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089'))
+  >     part.addparam(b'old', enc(b'4')) # will fail
+  >     part.addparam(b'new', enc(b'3'))
   >     def fail(pushop, exc):
-  >         raise error.Abort('Clown phase push failed')
+  >         raise error.Abort(b'Clown phase push failed')
   >     pushop.pkfailcb[part.id] = fail
   > EOF
   $ cat >> $HGRCPATH << EOF



To: durin42, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to