From patchwork Sat Nov 4 09:27:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1319: py3: handle keyword arguments in hgext/journal.py From: phabricator X-Patchwork-Id: 25400 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sat, 4 Nov 2017 09:27:20 +0000 pulkit created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1319 AFFECTED FILES hgext/journal.py CHANGE DETAILS To: pulkit, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -30,6 +30,7 @@ localrepo, lock, node, + pycompat, registrar, util, ) @@ -133,7 +134,7 @@ Note that by default entries go from most recent to oldest. """ - order = kwargs.pop('order', max) + order = kwargs.pop(r'order', max) iterables = [iter(it) for it in iterables] # this tracks still active iterables; iterables are deleted as they are # exhausted, which is why this is a dictionary and why each entry also @@ -458,6 +459,7 @@ `hg journal -T json` can be used to produce machine readable output. """ + opts = pycompat.byteskwargs(opts) name = '.' if opts.get('all'): if args: