HG(RENAME)
π HG(RENAME) β the rename glow-up page π
okay bestie, welcome to the hg rename manual page, she's iconic, she's basically copy + remove wearing a cute little outfit β¨
πΈ NAME πΈ
hg rename β rename files; equivalent of copy + remove. that's it, that's the whole vibe π
π SYNOPSIS π
hg rename [OPTION]... SOURCE... DEST
π¦ DESCRIPTION π¦
So what she does: she marks dest as copies of the sources, and marks the sources for deletion. Two-for-one deal, no cap π«Ά
- If dest is a directory, the copies get put in that directory. cute, they all move in together.
- If dest is a file, there can only be one source. one file, one destination, that's the rule bestie π
By default, this command actually copies the contents of the files as they exist in the working directory. Like, it really does the thing. But if you invoke it with -A/--after, the operation is just recorded and no copying happens β because the rename already happened and you're just telling hg about it after the fact π
Now, to undo marking a destination file as renamed, you use --forget. With that option, all the given (positional) arguments get unmarked as renames. Important details, do not skip:
- The destination file(s) will be left in place (still tracked). she stays. she's not leaving.
- The source file(s) will not be restored. yeah. gone. sorry bestie π
- Also lowkey:
hg rename --forgetbehaves the same way ashg copy --forget. iykyk.
This command takes effect with the next commit by default. so it's giving "pending" energy until you commit β
Returns 0 on success, 1 if errors are encountered. standard.
β¨ OPTIONS β¨
--forgetβ unmark a destination file as renamed. the "jk, undo the label" button π«Ά-A,--afterβ record a rename that has already occurred. for when you did it first and asked questions later π--at-rev <REV>β (un)mark renames in the given revision (EXPERIMENTAL). β οΈ experimental means experimental, bestie, tread carefully.-f,--forceβ forcibly move over an existing managed file. she will simply bulldoze it. dramatic but true π-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. window shopping, no purchasing β¨
[+] marked option can be specified multiple times. so go off, stack 'em π
π ALIASES π
movemv
and that's the page, bestie!! this was the HG(RENAME) manual page β that's the header energy at the top and the footer energy at the bottom, both just the name HG(RENAME), no version or date drama attached to it. she's short, she's sweet, she's copy + remove in a trench coat. go rename something ππ¦π
π¦ 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