# HG changeset patch # User Martin von Zweigbergk # Date 1522951302 25200 # Node ID 953db9e00eeb7e776d68655b72739e12eefb6e2c # Parent 3dfd7f018c69f0db5f8578a2bb44afca7e28636d rebase: remove unnecessary and incorrect handling of nullid We used to write a nullid as hex to the rebase state file and interpret it as the "todo" state (value -1). However, when reading it, we compared the string value to (binary) nullid, which would of course not match. AFAICT, it still worked because when the read nodeid did not match nullid (which, again, it didn't), we'd use the normal path which did repo[].rev(), and that also happens to return -1. It seems to have been this way ever since 9972758ab4c5 (rebase: handle revtodo as a special value when storing/restoring state, 2014-12-02). Differential Revision: https://phab.mercurial-scm.org/D3140 diff -r 3dfd7f018c69 -r 953db9e00eeb hgext/rebase.py --- a/hgext/rebase.py Thu Apr 05 10:13:45 2018 -0700 +++ b/hgext/rebase.py Thu Apr 05 11:01:42 2018 -0700 @@ -21,7 +21,6 @@ from mercurial.i18n import _ from mercurial.node import ( - nullid, nullrev, short, ) @@ -252,7 +251,7 @@ else: destrev = legacydest destmap[oldrev] = destrev - if newrev in (nullid, revtodostr): + if newrev == revtodostr: state[oldrev] = revtodo # Legacy compat special case else: