I find the output of hg status
too verbose for untracked directories. Suppose I have an empty repository that's managed by both git
and hg
. So there would be two directories, .git
and .hg
.
The output of git status
is:
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .hg/
The output of hg status
is:
? .git/HEAD
? .git/config
? .git/description
? .git/hooks/applypatch-msg.sample
? .git/hooks/commit-msg.sample
? .git/hooks/post-commit.sample
? .git/hooks/post-receive.sample
? .git/hooks/post-update.sample
? .git/hooks/pre-applypatch.sample
? .git/hooks/pre-commit.sample
? .git/hooks/pre-rebase.sample
? .git/hooks/prepare-commit-msg.sample
? .git/hooks/update.sample
? .git/info/exclude
Is there a way to reduce its output to something like the following line?
? .git/
Add the Mercurial Extension called purge. It is distributed by Mercurial. It is not enabled by default, maybe to avoid accidentally removing files that you forgot to add.
Git also doesn't see any untracked files, or they would be listed here. Finally, the command tells you which branch you're on and informs you that it has not diverged from the same branch on the server. For now, that branch is always master , which is the default; you won't worry about it here.
This extension purges all files and directories not being tracked by Mercurial in the current repository. It'll remove unknown files and empty directories by default. With the --all option, it will also remove ignored files. It keeps added files and (unmodified or modified) tracked files.
This works for me :
hg status -q
Option
-q
/--quiet
hides untracked (unknown and ignored) files unless explicitly requested with-u
/--unknown
or-i
/--ignored
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With