Show More
@@ -244,18 +244,6 b' def ascii(ui, grapher):' | |||||
244 | prev_node_index = node_index |
|
244 | prev_node_index = node_index | |
245 | prev_n_columns_diff = n_columns_diff |
|
245 | prev_n_columns_diff = n_columns_diff | |
246 |
|
246 | |||
247 | def get_limit(limit_opt): |
|
|||
248 | if limit_opt: |
|
|||
249 | try: |
|
|||
250 | limit = int(limit_opt) |
|
|||
251 | except ValueError: |
|
|||
252 | raise util.Abort(_("limit must be a positive integer")) |
|
|||
253 | if limit <= 0: |
|
|||
254 | raise util.Abort(_("limit must be positive")) |
|
|||
255 | else: |
|
|||
256 | limit = sys.maxint |
|
|||
257 | return limit |
|
|||
258 |
|
||||
259 | def get_revs(repo, rev_opt): |
|
247 | def get_revs(repo, rev_opt): | |
260 | if rev_opt: |
|
248 | if rev_opt: | |
261 | revs = revrange(repo, rev_opt) |
|
249 | revs = revrange(repo, rev_opt) | |
@@ -270,7 +258,6 b' def check_unsupported_flags(opts):' | |||||
270 | if op in opts and opts[op]: |
|
258 | if op in opts and opts[op]: | |
271 | raise util.Abort(_("--graph option is incompatible with --%s") % op) |
|
259 | raise util.Abort(_("--graph option is incompatible with --%s") % op) | |
272 |
|
260 | |||
273 |
|
||||
274 | def graphlog(ui, repo, path=None, **opts): |
|
261 | def graphlog(ui, repo, path=None, **opts): | |
275 | """show revision history alongside an ASCII revision graph |
|
262 | """show revision history alongside an ASCII revision graph | |
276 |
|
263 | |||
@@ -282,7 +269,7 b' def graphlog(ui, repo, path=None, **opts' | |||||
282 | """ |
|
269 | """ | |
283 |
|
270 | |||
284 | check_unsupported_flags(opts) |
|
271 | check_unsupported_flags(opts) | |
285 |
limit = g |
|
272 | limit = cmdutil.loglimit(opts) | |
286 | start, stop = get_revs(repo, opts["rev"]) |
|
273 | start, stop = get_revs(repo, opts["rev"]) | |
287 | stop = max(stop, start - limit + 1) |
|
274 | stop = max(stop, start - limit + 1) | |
288 | if start == nullrev: |
|
275 | if start == nullrev: |
General Comments 0
You need to be logged in to leave comments.
Login now