Find the revision of a node given its full hash.
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG4f11a67a12fb: hg-core: add `Revlog.get_node_rev`
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
rust/hg-core/src/revlog/revlog.rs | ||
---|---|---|
83 | 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. | |
92 | 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. |
rust/hg-core/src/revlog/revlog.rs | ||
---|---|---|
83 | 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. | |
92 | 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. |
rust/hg-core/src/revlog/revlog.rs | ||
---|---|---|
83 | It has been added in another commit. I moved the code here |
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.