graphlog: log -G --follow file does not work, forbid it
We do not have revsets to follow file history.
--- a/hgext/graphlog.py Sat Apr 30 19:42:00 2011 +0200
+++ b/hgext/graphlog.py Sat Apr 30 19:42:00 2011 +0200
@@ -214,11 +214,14 @@
else:
return (len(repo) - 1, 0)
-def check_unsupported_flags(opts):
+def check_unsupported_flags(pats, opts):
for op in ["follow_first", "copies", "newest_first"]:
if op in opts and opts[op]:
raise util.Abort(_("-G/--graph option is incompatible with --%s")
% op.replace("_", "-"))
+ if pats and opts.get('follow'):
+ raise util.Abort(_("-G/--graph option is incompatible with --follow "
+ "with file argument"))
def revset(pats, opts):
"""Return revset str built of revisions, log options and file patterns.
@@ -286,7 +289,7 @@
directory.
"""
- check_unsupported_flags(opts)
+ check_unsupported_flags(pats, opts)
revs = revrange(repo, [revset(pats, opts)])
revdag = graphmod.dagwalker(repo, revs)
@@ -312,7 +315,7 @@
directory.
"""
- check_unsupported_flags(opts)
+ check_unsupported_flags([], opts)
o = hg._outgoing(ui, repo, dest, opts)
if o is None:
return
@@ -334,7 +337,7 @@
def subreporecurse():
return 1
- check_unsupported_flags(opts)
+ check_unsupported_flags([], opts)
def display(other, chlist, displayer):
revdag = graphrevs(other, chlist, opts)
showparents = [ctx.node() for ctx in repo[None].parents()]
--- a/tests/test-glog.t Sat Apr 30 19:42:00 2011 +0200
+++ b/tests/test-glog.t Sat Apr 30 19:42:00 2011 +0200
@@ -1425,3 +1425,6 @@
|
| o 33
| |
+ $ hg log -G --follow a
+ abort: -G/--graph option is incompatible with --follow with file argument
+ [255]