cleanups in revlog.lookup
- add comments
- do a clean separation of the different cases
- don't use a list of each possible node when
doing the lookup, just keep the previous entry
abort: Failed to parse .../t/.hg/hgrcFile contains no section headers.file: .../t/.hg/hgrc, line: 1'invalid\n'