D3617: py3: use pycompat.bytestr() to convert str into bytes
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sat May 19 16:19:00 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
the keys of opts are str here, so we have to convert it to bytes before passing
into error.Abort()
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3617
AFFECTED FILES
hgext/rebase.py
CHANGE DETAILS
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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)'
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list