py3: use pycompat.bytestr() to convert str into bytes
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 19 May 2018 21:47:59 +0530
changeset 38065 64280cd4b454
parent 38064 46e8abc4eb04
child 38066 543b7b349b2c
py3: use pycompat.bytestr() to convert str into bytes the keys of opts are str here, so we have to convert it to bytes before passing into error.Abort() Differential Revision: https://phab.mercurial-scm.org/D3617
hgext/rebase.py
--- a/hgext/rebase.py	Sat May 19 21:46:54 2018 +0530
+++ b/hgext/rebase.py	Sat May 19 21:47:59 2018 +0530
@@ -809,7 +809,7 @@
         for key in opts:
             if key != r'auto_orphans' and opts.get(key):
                 raise error.Abort(_('--auto-orphans is incompatible with %s') %
-                                  ('--' + key))
+                                  ('--' + pycompat.bytestr(key)))
         userrevs = list(repo.revs(opts.get(r'auto_orphans')))
         opts[r'rev'] = [revsetlang.formatspec('%ld and orphan()', userrevs)]
         opts[r'dest'] = '_destautoorphanrebase(SRC)'