Show More
@@ -62,9 +62,9 b' def getlimit(opts):' | |||||
62 | try: |
|
62 | try: | |
63 | limit = int(limit) |
|
63 | limit = int(limit) | |
64 | except ValueError: |
|
64 | except ValueError: | |
65 |
raise error. |
|
65 | raise error.InputError(_(b'limit must be a positive integer')) | |
66 | if limit <= 0: |
|
66 | if limit <= 0: | |
67 |
raise error. |
|
67 | raise error.InputError(_(b'limit must be positive')) | |
68 | else: |
|
68 | else: | |
69 | limit = None |
|
69 | limit = None | |
70 | return limit |
|
70 | return limit | |
@@ -1108,11 +1108,13 b' def _parselinerangeopt(repo, opts):' | |||||
1108 | try: |
|
1108 | try: | |
1109 | pat, linerange = pat.rsplit(b',', 1) |
|
1109 | pat, linerange = pat.rsplit(b',', 1) | |
1110 | except ValueError: |
|
1110 | except ValueError: | |
1111 | raise error.Abort(_(b'malformatted line-range pattern %s') % pat) |
|
1111 | raise error.InputError( | |
|
1112 | _(b'malformatted line-range pattern %s') % pat | |||
|
1113 | ) | |||
1112 | try: |
|
1114 | try: | |
1113 | fromline, toline = map(int, linerange.split(b':')) |
|
1115 | fromline, toline = map(int, linerange.split(b':')) | |
1114 | except ValueError: |
|
1116 | except ValueError: | |
1115 |
raise error. |
|
1117 | raise error.InputError(_(b"invalid line range for %s") % pat) | |
1116 | msg = _(b"line range pattern '%s' must match exactly one file") % pat |
|
1118 | msg = _(b"line range pattern '%s' must match exactly one file") % pat | |
1117 | fname = scmutil.parsefollowlinespattern(repo, None, pat, msg) |
|
1119 | fname = scmutil.parsefollowlinespattern(repo, None, pat, msg) | |
1118 | linerangebyfname.append( |
|
1120 | linerangebyfname.append( | |
@@ -1271,7 +1273,7 b' def displayrevs(ui, repo, revs, displaye' | |||||
1271 | def checkunsupportedgraphflags(pats, opts): |
|
1273 | def checkunsupportedgraphflags(pats, opts): | |
1272 | for op in [b"newest_first"]: |
|
1274 | for op in [b"newest_first"]: | |
1273 | if op in opts and opts[op]: |
|
1275 | if op in opts and opts[op]: | |
1274 |
raise error. |
|
1276 | raise error.InputError( | |
1275 | _(b"-G/--graph option is incompatible with --%s") |
|
1277 | _(b"-G/--graph option is incompatible with --%s") | |
1276 | % op.replace(b"_", b"-") |
|
1278 | % op.replace(b"_", b"-") | |
1277 | ) |
|
1279 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now