Fix TypeError caused by the `ngtip` revset returning a node instead of a rev
MR moved to !266 (merged)
How to trigger the error
The error was triggered by running
hg log -r 'ngtip("default")'
in a repository with more than one changeset. When the flow of control reached
reachableroots2, it raised
TypeError: an integer is required (got type bytes)
See the Bugzilla link above for a full traceback.
Error cause investigation
That node hash (of type
bytes) got added to the revlog earlier, by the topic extension's
revset.py:ngtipset function (in evolve source
/hgext3rd/topic/revset.py). The call stack from there proceeds thus:
Mercurial calls (in an example repo with two commits)
hgext_topic.revset.ngtipset( repo, subset=<fullreposet+ 0:2>, x=('symbol', 'default') )
which returns a node hash.
Open questions for this Merge Request
Question is: At what point in the call stack above should the node hash be turned into a rev number? The current patch chooses
- I'm certain
revset.ngtipsetshould add a rev number to the changeset, not a node hash
- I'm not certain what callers of
destination.ngtipexpect it to return.