changeset 31494:a992caaf0e22

py3: convert log opts to bytes-key dict Now simple log command works.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 14 Mar 2017 18:23:59 +0900
parents 06d3c40fc3e7
children 766364caae14
files mercurial/commands.py tests/test-check-py3-commands.t
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Mar 14 18:16:13 2017 +0900
+++ b/mercurial/commands.py	Tue Mar 14 18:23:59 2017 +0900
@@ -3393,6 +3393,7 @@
     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']
--- a/tests/test-check-py3-commands.t	Tue Mar 14 18:16:13 2017 +0900
+++ b/tests/test-check-py3-commands.t	Tue Mar 14 18:23:59 2017 +0900
@@ -52,7 +52,7 @@
   $ $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 @@
   summary:     Fix linking of changeset revs when merging
   
 
+  $ $PYTHON3 $HGBIN log -r0
+  changeset:   0:9117c6561b0b
+  user:        mpm@selenic.com
+  date:        Tue May 03 13:16:10 2005 -0800
+  summary:     Add back links from file revisions to changeset revisions
+  
+
   $ cd ..
 #endif