Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/main.rs @ 52767:6183949219b2
rhg: implement rhg annotate
This initial implementation produces the same output as Python for all the files
I've tried, and is usually 1.5-9x faster. The algorithm is mostly the same, but
one key difference is that the Rust implementation only converts filelog
revisions to changelog revisions if they will actually appear in the output.
This does not support all the command line flags yet. In particular, --template,
--include, --exclude, --skip, and whitespace-related flags will cause fallback
to Python. Also, --rev 'wdir()' (often used by editor plugins) is not supported.
There is also no pager.
author | Mitchell Kember <mkember@janestreet.com> |
---|---|
date | Fri, 24 Jan 2025 12:01:12 -0500 |
parents | 94e2547e6f3d |
children |
line wrap: on
line diff
--- a/rust/rhg/src/main.rs Fri Jan 24 13:07:15 2025 -0500 +++ b/rust/rhg/src/main.rs Fri Jan 24 12:01:12 2025 -0500 @@ -526,6 +526,7 @@ } mod commands { + pub mod annotate; pub mod cat; pub mod config; pub mod debugdata; @@ -609,6 +610,7 @@ fn subcommands() -> Subcommands { let subcommands = vec![ + subcommand!(annotate), subcommand!(cat), subcommand!(debugdata), subcommand!(debugrequirements),