##// END OF EJS Templates
graphlog: log -G --follow file does not work, forbid it...
Patrick Mezard -
r14086:2d7cb340 default
parent child Browse files
Show More
@@ -214,11 +214,14 b' def get_revs(repo, rev_opt):'
214 else:
214 else:
215 return (len(repo) - 1, 0)
215 return (len(repo) - 1, 0)
216
216
217 def check_unsupported_flags(opts):
217 def check_unsupported_flags(pats, opts):
218 for op in ["follow_first", "copies", "newest_first"]:
218 for op in ["follow_first", "copies", "newest_first"]:
219 if op in opts and opts[op]:
219 if op in opts and opts[op]:
220 raise util.Abort(_("-G/--graph option is incompatible with --%s")
220 raise util.Abort(_("-G/--graph option is incompatible with --%s")
221 % op.replace("_", "-"))
221 % op.replace("_", "-"))
222 if pats and opts.get('follow'):
223 raise util.Abort(_("-G/--graph option is incompatible with --follow "
224 "with file argument"))
222
225
223 def revset(pats, opts):
226 def revset(pats, opts):
224 """Return revset str built of revisions, log options and file patterns.
227 """Return revset str built of revisions, log options and file patterns.
@@ -286,7 +289,7 b' def graphlog(ui, repo, *pats, **opts):'
286 directory.
289 directory.
287 """
290 """
288
291
289 check_unsupported_flags(opts)
292 check_unsupported_flags(pats, opts)
290
293
291 revs = revrange(repo, [revset(pats, opts)])
294 revs = revrange(repo, [revset(pats, opts)])
292 revdag = graphmod.dagwalker(repo, revs)
295 revdag = graphmod.dagwalker(repo, revs)
@@ -312,7 +315,7 b' def goutgoing(ui, repo, dest=None, **opt'
312 directory.
315 directory.
313 """
316 """
314
317
315 check_unsupported_flags(opts)
318 check_unsupported_flags([], opts)
316 o = hg._outgoing(ui, repo, dest, opts)
319 o = hg._outgoing(ui, repo, dest, opts)
317 if o is None:
320 if o is None:
318 return
321 return
@@ -334,7 +337,7 b' def gincoming(ui, repo, source="default"'
334 def subreporecurse():
337 def subreporecurse():
335 return 1
338 return 1
336
339
337 check_unsupported_flags(opts)
340 check_unsupported_flags([], opts)
338 def display(other, chlist, displayer):
341 def display(other, chlist, displayer):
339 revdag = graphrevs(other, chlist, opts)
342 revdag = graphrevs(other, chlist, opts)
340 showparents = [ctx.node() for ctx in repo[None].parents()]
343 showparents = [ctx.node() for ctx in repo[None].parents()]
@@ -1425,3 +1425,6 b' Test log -G options'
1425 |
1425 |
1426 | o 33
1426 | o 33
1427 | |
1427 | |
1428 $ hg log -G --follow a
1429 abort: -G/--graph option is incompatible with --follow with file argument
1430 [255]
General Comments 0
You need to be logged in to leave comments. Login now