HG(REVERT)
π hg revert π aka HG(REVERT) bestie!!
okay so welcome to the manual page for hg revert, the command that restores files to their checkout state. This whole page is HG(REVERT), and we're gonna go through it like a group chat. no cap. β¨
πΈ NAME πΈ
hg revert β restore files to their checkout state π
π¦ SYNOPSIS π¦
hg revert [OPTION]... [-r REV] [NAME]...
β¨ DESCRIPTION β¨
β οΈ Note: To check out earlier revisions, you should usehg update REV. To cancel an uncommitted merge (and lose your changes), usehg merge --abort.
With no revision specified, revert the specified files or directories to the contents they had in the parent of the working directory. This restores the contents of files to an unmodified state and unschedules adds, removes, copies, and renames. If the working directory has two parents, you must explicitly specify a revision. like, you have to pick one, bestie.
Using the -r/--rev or -d/--date options, revert the given files or directories to their states as of a specific revision. Because revert does not change the working directory parents, this will cause these files to appear modified. This can be helpful to "back out" some or all of an earlier change. See hg backout for a related method. it's giving modified on purpose, and that's the point.
Modified files are saved with a .orig suffix before reverting. To disable these backups, use --no-backup. It is possible to store the backup files in a custom directory relative to the root of the repository by setting the ui.origbackuppath configuration option. so you get a lil .orig souvenir unless you say --no-backup, periodt.
See hg help dates for a list of formats valid for -d/--date. the date formats live over there, go check.
See hg help backout for a way to reverse the effect of an earlier changeset. if you wanna reverse an earlier changeset, hg help backout has the tea.
Returns 0 on success. slay.
π OPTIONS π
-a,--allβ revert all changes when no arguments given β¨-d,--date <DATE>β tipmost revision matching date π-r,--rev <REV>β revert to the specified revision π₯-C,--no-backupβ do not save backup copies of files π-i,--interactiveβ interactively select the changes π-I,--include <PATTERN[+]>β include names matching the given patterns π¦-X,--exclude <PATTERN[+]>β exclude names matching the given patterns πΈ-n,--dry-runβ do not perform actions, just print output π
[+] marked option can be specified multiple times β¨
okay bye bestie, this was HG(REVERT) β the footer just says HG(REVERT), no version or date, so that's the whole sign-off. 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