Mercurial > public > mercurial-scm > hg
comparison mercurial/dagparser.py @ 12134:26d86a6cf2af stable
dagparser: translate and lowercase error messages
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Mon, 30 Aug 2010 17:17:20 +0200 |
parents | 08cd25ef8a38 |
children | 4f8067c94729 |
comparison
equal
deleted
inserted
replaced
12133:b046b90c4ae5 | 12134:26d86a6cf2af |
---|---|
266 i = 0 | 266 i = 0 |
267 while c != '\0' and i < 10: | 267 while c != '\0' and i < 10: |
268 s += c | 268 s += c |
269 i += 1 | 269 i += 1 |
270 c = nextch() | 270 c = nextch() |
271 raise util.Abort("invalid character in dag description: %s..." % s) | 271 raise util.Abort(_("invalid character in dag description: %s...") % s) |
272 | 272 |
273 def dagtextlines(events, | 273 def dagtextlines(events, |
274 addspaces=True, | 274 addspaces=True, |
275 wraplabels=False, | 275 wraplabels=False, |
276 wrapannotations=False, | 276 wrapannotations=False, |
294 if kind == 'n': | 294 if kind == 'n': |
295 r, ps = data | 295 r, ps = data |
296 | 296 |
297 # sanity check | 297 # sanity check |
298 if r != wantr: | 298 if r != wantr: |
299 raise util.Abort("Expected id %i, got %i" % (wantr, r)) | 299 raise util.Abort(_("expected id %i, got %i") % (wantr, r)) |
300 if not ps: | 300 if not ps: |
301 ps = [-1] | 301 ps = [-1] |
302 else: | 302 else: |
303 for p in ps: | 303 for p in ps: |
304 if p >= r: | 304 if p >= r: |
305 raise util.Abort("Parent id %i is larger than " | 305 raise util.Abort(_("parent id %i is larger than " |
306 "current id %i" % (p, r)) | 306 "current id %i") % (p, r)) |
307 wantr += 1 | 307 wantr += 1 |
308 | 308 |
309 # new root? | 309 # new root? |
310 p1 = r - 1 | 310 p1 = r - 1 |
311 if len(ps) == 1 and ps[0] == -1: | 311 if len(ps) == 1 and ps[0] == -1: |