changeset 24059:8d295ce6e488

graphlog: remove too early return from getgraphlogrevs() for empty repo Even if repository is empty, null revision should exist.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 05 Feb 2015 23:14:44 +0900
parents d1fcff9400c9
children eb1c9700d19d
files mercurial/cmdutil.py tests/test-glog.t
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Jan 22 22:22:09 2015 -0800
+++ b/mercurial/cmdutil.py	Thu Feb 05 23:14:44 2015 +0900
@@ -1830,8 +1830,6 @@
     callable taking a revision number and returning a match objects
     filtering the files to be detailed when displaying the revision.
     """
-    if not len(repo):
-        return [], None, None
     limit = loglimit(opts)
     # Default --rev value depends on --follow but --follow behaviour
     # depends on revisions resolved from --rev...
--- a/tests/test-glog.t	Thu Jan 22 22:22:09 2015 -0800
+++ b/tests/test-glog.t	Thu Feb 05 23:14:44 2015 +0900
@@ -1541,6 +1541,9 @@
   $ testlog --follow
   []
   []
+  $ testlog -rnull
+  ['null']
+  []
   $ echo a > a
   $ echo aa > aa
   $ echo f > f