HG(ANNOTATE)
π hg annotate π
okay bestie, welcome to the hg annotate page β yes it's from the HG(ANNOTATE) manual, and yes it's about to become your new obsession. it's literally the "who wrote this line and when" command. no cap. π¦
β¨ NAME β¨
hg annotate β show changeset information by line for each file π
β¨ SYNOPSIS β¨
hg annotate [-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...
β¨ DESCRIPTION β¨
okay so here's the vibe: this command lists the changes in files, and it shows you the revision id responsible for each line. every single line gets a lil receipt of who's accountable for it. π
it's useful for discovering when a change was made and by whom. detective mode: activated. π
if you include--file,--user, or--date, the revision number is suppressed unless you also include--number. so like, don't be shocked when the rev number ghosts you β you did that. π
without the -a/--text option, annotate will avoid processing files it detects as binary. with -a, annotate will annotate the file anyway β although the results will probably be neither useful nor desirable. so like... you can, but should you? π«£
use -L/--line-range FILE,M:N options to filter the output to the lines from M to N in FILE. this option is incompatible with --no-follow and cannot be combined with file pattern arguments. when combined with --rev, the line ranges refer to the state of the file at the requested revision. noted, bestie. π
πΈ Template πΈ
the following keywords are supported in addition to the common template keywords and functions. see also hg help templates.
linesβ list of lines with annotation data. πpathβ String. Repository-absolute path of the specified file.
and each entry of {lines} provides the following sub-keywords in addition to {date}, {node}, {rev}, {user}, etc.
lineβ String. Line content.linenoβ Integer. Line number at that revision.pathβ String. Repository-absolute path of the file at that revision.
see hg help templates.operators for the list expansion syntax. π§
returns 0 on success. slay. β¨
β¨ OPTIONS β¨
-r,--rev <REV>β annotate the specified revision π―--followβ follow copies/renames and list the filename (DEPRECATED) π--no-followβ don't follow copies and renames π-a,--textβ treat all files as text π-u,--userβ list the author (long with-v) π§-f,--fileβ list the filename π-d,--dateβ list the date (short with-q) π-n,--numberβ list the revision number (default) π’-c,--changesetβ list the changeset π¦-l,--line-numberβ show line number at the first appearance π--skip <REV[+]>β revset to not display (EXPERIMENTAL) π§ͺ-L,--line-range <FILE,RANGE[+]>β follow line range of specified file (EXPERIMENTAL) π§ͺ-w,--ignore-all-spaceβ ignore white space when comparing lines π«₯-b,--ignore-space-changeβ ignore changes in the amount of white space π«₯-B,--ignore-blank-linesβ ignore changes whose lines are all blank π«₯-Z,--ignore-space-at-eolβ ignore changes in whitespace at EOL π«₯-I,--include <PATTERN[+]>β include names matching the given patterns β-X,--exclude <PATTERN[+]>β exclude names matching the given patterns β-T,--template <TEMPLATE>β display with template π¨
[+] marked option can be specified multiple times. yes queen, stack 'em. π
β¨ ALIASES β¨
blame β because sometimes you just gotta point fingers, and this command lets you do it with data. ππ
and that's the whole page, bestie!! π thanks for reading the HG(ANNOTATE) manual with me β this was the hg annotate page, sourced from the HG(ANNOTATE) manual. go forth and annotate responsibly. mwah. ππ¦β¨
π¦ where this page comes from
- arch rolling: mercurial 7.2.4-1 Β· GPL
- fedora 43: mercurial 7.1.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: mercurial 7.1.1-2.fc43 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2-1.fc44 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mercurial 7.1.2
- nixos 26.05: mercurial-full 7.1.2
- nixpkgs unstable: mercurial 7.2.2
- nixpkgs unstable: mercurial-full 7.2.2
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms