HG(IDENTIFY)
π hg identify β the manual page, but make it make sense π
okay bestie, welcome to HG(IDENTIFY) β the little command that tells you where you are and what you're standing on in your repo. it's giving "who am I, really?" but for version control. let's go π¦
β¨ NAME β¨
hg identify β identify the working directory or specified revision π
β¨ SYNOPSIS β¨
hg identify [-nibtB] [-r REV] [SOURCE]
β¨ DESCRIPTION β¨
so what it does is print a lil summary that identifies the repository state at REV β using one or two parent hash identifiers, then a + if your working directory has uncommitted changes, then the branch name (but only if it's not default, bc default is boring and doesn't get a shoutout), then a list of tags, and then a list of bookmarks. it's literally a whole vibe report for your repo π
when REV is not given, it prints a summary of the current state of the repository, working directory included. and if you want the info about the working directory parent without it scanning all your uncommitted changes, you specify -r . β periodt. π₯
if you hand it a path to a repository root or a Mercurial bundle, the lookup will operate on that repository/bundle instead. slay, it's flexible like that π
π§ Template π§
besides the common template keywords and functions, these keywords are supported. also see hg help templates (go look, it's good for you, iykyk).
dirtyβ String. it's the character+, which denotes whether the working directory has uncommitted changes πidβ String. one or two nodes, optionally followed by+.parentsβ List of strings. the parent nodes of the changeset. the way that it's a whole list of them π«Ά
πΈ Examples πΈ
- generate a build identifier for the working directory:
hg id --id > build-id.dat
- find the revision corresponding to a tag:
hg id -n -r 1.3
- check the most recent revision of a remote repository:
hg id -r tip https://www.mercurial-scm.org/repo/hg/
see hg log if you want to generate more information about specific revisions, full hash identifiers included. no cap, hg log is the main character there β
returns 0 if successful. yes bestie, a clean exit. we love to see it π
β¨ OPTIONS β¨
-r,--rev<REV> β identify the specified revision-n,--numβ show local revision number-i,--idβ show global revision id-b,--branchβ show branch-t,--tagsβ show tags-B,--bookmarksβ show bookmarks-e,--ssh<CMD> β specify ssh command to use--remotecmd<CMD> β specify hg command to run on the remote side--insecureβ do not verify server certificate (ignoringweb.cacertsconfig) β οΈ-T,--template<TEMPLATE> β display with template
β¨ ALIASES β¨
id β that's it, that's the alias. short, sweet, iconic π
okay and that's the whole page fr fr π«Ά this was HG(IDENTIFY), straight from the Mercurial manual β and if you scrolled all the way down to the bottom, that's literally where the page footer lives too: HG(IDENTIFY), no date, no source line, just the title keeping it mysterious π go identify something, bestie β¨
π¦ 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