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()] |
General Comments 0
You need to be logged in to leave comments.
Login now