[PATCH 4 of 4] py3: convert log opts to bytes-key dict
Yuya Nishihara
yuya at tcha.org
Fri Mar 17 11:25:50 EDT 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1489483439 -32400
# Tue Mar 14 18:23:59 2017 +0900
# Node ID d32b1cfe597ebe2093c42b67e85143190eda0e8b
# Parent 9a758c848fe08e97386fca95d2428aa003939b4d
py3: convert log opts to bytes-key dict
Now simple log command works.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3393,6 +3393,7 @@ def log(ui, repo, *pats, **opts):
Returns 0 on success.
"""
+ opts = pycompat.byteskwargs(opts)
if opts.get('follow') and opts.get('rev'):
opts['rev'] = [revsetlang.formatspec('reverse(::%lr)', opts.get('rev'))]
del opts['follow']
diff --git a/tests/test-check-py3-commands.t b/tests/test-check-py3-commands.t
--- a/tests/test-check-py3-commands.t
+++ b/tests/test-check-py3-commands.t
@@ -52,7 +52,7 @@ out some potential warnings that come fr
$ $PYTHON3 $HGBIN files | wc -l
\s*15 (re)
-Test if `hg tip` works:
+Test if log-like commands work:
$ $PYTHON3 $HGBIN tip
changeset: 10:e76ed1e480ef
@@ -62,6 +62,13 @@ Test if `hg tip` works:
summary: Fix linking of changeset revs when merging
+ $ $PYTHON3 $HGBIN log -r0
+ changeset: 0:9117c6561b0b
+ user: mpm at selenic.com
+ date: Tue May 03 13:16:10 2005 -0800
+ summary: Add back links from file revisions to changeset revisions
+
+
$ cd ..
#endif
More information about the Mercurial-devel
mailing list