equal
deleted
inserted
replaced
148 _(b"hg: parse error at %s: %s\n") |
148 _(b"hg: parse error at %s: %s\n") |
149 % (pycompat.bytestr(inst.location), inst.message) |
149 % (pycompat.bytestr(inst.location), inst.message) |
150 ) |
150 ) |
151 else: |
151 else: |
152 write(_(b"hg: parse error: %s\n") % inst.message) |
152 write(_(b"hg: parse error: %s\n") % inst.message) |
153 if isinstance(inst, error.UnknownIdentifier): |
153 if inst.hint: |
154 # make sure to check fileset first, as revset can invoke fileset |
|
155 similar = error.getsimilar(inst.symbols, inst.function) |
|
156 hint = error.similarity_hint(similar) |
|
157 if hint: |
|
158 write(b"(%s)\n" % hint) |
|
159 elif inst.hint: |
|
160 write(_(b"(%s)\n") % inst.hint) |
154 write(_(b"(%s)\n") % inst.hint) |
161 |
155 |
162 |
156 |
163 def callcatch(ui, func): |
157 def callcatch(ui, func): |
164 """call func() with global exception handling |
158 """call func() with global exception handling |