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 (ignoring web.cacerts config) ⚠️
  • -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 ✨