# HG changeset patch # User Patrick Mezard # Date 2008-09-02 07:47:40 # Node ID f7f0388f7bce9b426dae1937b45c467007c43515 # Parent 91f6370c433c589ad9cc9ec91433c509bd6cb95a # Parent d76f64cd4cb24c80ace17a06f0ff8f1e64ebef98 Merge with crew-stable diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -216,8 +216,9 @@ def graphlog(ui, repo, path=None, **opts return cs_printer = show_changeset(ui, repo, opts) if path: - cpath = canonpath(repo.root, os.getcwd(), path) - grapher = filelog_grapher(repo, cpath, start_rev, stop_rev) + path = canonpath(repo.root, os.getcwd(), path) + if path: + grapher = filelog_grapher(repo, path, start_rev, stop_rev) else: grapher = revision_grapher(repo, start_rev, stop_rev) repo_parents = repo.dirstate.parents() diff --git a/tests/test-glog b/tests/test-glog --- a/tests/test-glog +++ b/tests/test-glog @@ -144,3 +144,10 @@ hg glog 5 echo % unused arguments hg glog -q foo bar || echo failed + +echo % from outer space +cd .. +hg glog -l1 repo +hg glog -l1 repo/0 +hg glog -l1 repo/missing + diff --git a/tests/test-glog.out b/tests/test-glog.out --- a/tests/test-glog.out +++ b/tests/test-glog.out @@ -356,3 +356,16 @@ hg glog [OPTION]... [FILE] show revision history alongside an ASCII revision graph failed +% from outer space +@ changeset: 34:0eed7cd895e0 +| tag: tip +| parent: 32:77f7d8438a3c +| user: test +| date: Thu Jan 01 00:00:34 1970 +0000 +| summary: (34) head +| +o changeset: 0:7aa22e58e8c1 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: (0) root +