##// END OF EJS Templates
errors: restructure formatparse() to clarify conditions a bit...
Martin von Zweigbergk -
r46492:7a273336 default
parent child Browse files
Show More
@@ -159,10 +159,6 b' def reportsimilar(write, similar):'
159
159
160
160
161 def formatparse(write, inst):
161 def formatparse(write, inst):
162 similar = []
163 if isinstance(inst, error.UnknownIdentifier):
164 # make sure to check fileset first, as revset can invoke fileset
165 similar = getsimilar(inst.symbols, inst.function)
166 if inst.location is not None:
162 if inst.location is not None:
167 write(
163 write(
168 _(b"hg: parse error at %s: %s\n")
164 _(b"hg: parse error at %s: %s\n")
@@ -170,8 +166,11 b' def formatparse(write, inst):'
170 )
166 )
171 else:
167 else:
172 write(_(b"hg: parse error: %s\n") % inst.message)
168 write(_(b"hg: parse error: %s\n") % inst.message)
169 if isinstance(inst, error.UnknownIdentifier):
170 # make sure to check fileset first, as revset can invoke fileset
171 similar = getsimilar(inst.symbols, inst.function)
173 reportsimilar(write, similar)
172 reportsimilar(write, similar)
174 if inst.hint:
173 elif inst.hint:
175 write(_(b"(%s)\n") % inst.hint)
174 write(_(b"(%s)\n") % inst.hint)
176
175
177
176
General Comments 0
You need to be logged in to leave comments. Login now