[PATCH] graphlog: do not bypass commands.log so that -fr works

Yuya Nishihara yuya at tcha.org
Wed Mar 4 09:23:21 CST 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1425473227 -32400
#      Wed Mar 04 21:47:07 2015 +0900
# Node ID 6bd01a0f2eb263a08480057040caaaaecfa2187c
# Parent  390410a6545d9088dc84392009f51500e3935a1c
graphlog: do not bypass commands.log so that -fr works

Since 8b4b9ee6001a, opts dict can be modified in commands.log() before calling
cmdutil.graphlog().

diff --git a/hgext/graphlog.py b/hgext/graphlog.py
--- a/hgext/graphlog.py
+++ b/hgext/graphlog.py
@@ -54,4 +54,5 @@ def graphlog(ui, repo, *pats, **opts):
     Nodes printed as an @ character are parents of the working
     directory.
     """
-    return cmdutil.graphlog(ui, repo, *pats, **opts)
+    opts['graph'] = True
+    return commands.log(ui, repo, *pats, **opts)
diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -2243,6 +2243,14 @@ Test --follow-first and backward --rev
         ('symbol', 'rev')
         ('symbol', '6'))))
 
+Test --follow with --rev of graphlog extension
+
+  $ hg --config extensions.graphlog= glog -qfr1
+  o  1:216d4c92cf98
+  |
+  o  0:f8035bb17114
+  
+
 Test subdir
 
   $ hg up -q 3


More information about the Mercurial-devel mailing list