equal
deleted
inserted
replaced
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: |