comparison hgext/mq.py @ 3578:3b4e00cba57a

Define and use nullrev (revision of nullid) instead of -1.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 29 Oct 2006 10:53:51 +0100
parents 23f7d9621783
children 437489d8dfbf
comparison
equal deleted inserted replaced
3577:7f7425306925 3578:3b4e00cba57a
1308 lastparent = None 1308 lastparent = None
1309 1309
1310 for r in rev: 1310 for r in rev:
1311 p1, p2 = repo.changelog.parentrevs(r) 1311 p1, p2 = repo.changelog.parentrevs(r)
1312 n = repo.changelog.node(r) 1312 n = repo.changelog.node(r)
1313 if p2 != -1: 1313 if p2 != revlog.nullrev:
1314 raise util.Abort(_('cannot import merge revision %d') % r) 1314 raise util.Abort(_('cannot import merge revision %d') % r)
1315 if lastparent and lastparent != r: 1315 if lastparent and lastparent != r:
1316 raise util.Abort(_('revision %d is not the parent of %d') 1316 raise util.Abort(_('revision %d is not the parent of %d')
1317 % (r, lastparent)) 1317 % (r, lastparent))
1318 lastparent = p1 1318 lastparent = p1