# HG changeset patch # User Yuya Nishihara # Date 2015-02-05 14:14:44 # Node ID 8d295ce6e488a8f2db43648e2156da3961f45603 # Parent d1fcff9400c984c521a0af89bdf8eb192824ddd8 graphlog: remove too early return from getgraphlogrevs() for empty repo Even if repository is empty, null revision should exist. diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1830,8 +1830,6 @@ def getgraphlogrevs(repo, pats, opts): 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... diff --git a/tests/test-glog.t b/tests/test-glog.t --- a/tests/test-glog.t +++ b/tests/test-glog.t @@ -1541,6 +1541,9 @@ have 2 filelog topological heads in a li $ testlog --follow [] [] + $ testlog -rnull + ['null'] + [] $ echo a > a $ echo aa > aa $ echo f > f