Find the revision of a node given its full hash.
- Group Reviewers
- rHG4f11a67a12fb: hg-core: add `Revlog.get_node_rev`
I know Clippy will complain about the lack of is_empty method when you have a len method, if you want to add it quickly.
Wouldn't it make more sense to start from the end as we're more likely to be looking for recent nodes?
Also, it's not clear by looking at this that this bruteforce method is not the one we'll use in the future, using @gracinet's nodemap. I think a small comment would be enough.
I've seen the clippy warning, but did not added it because it wasn't needed and since it's not enforced by an interface, I was not sure about what to do about it. Maybe having 0 warning on easy things should be a goal.
Like you said we're more likely to be looking for recent nodes thus searching from the start when the revolg is huge is probably not the way to go.