English 中文(简体)
防止“hg status”在未经跟踪的名录下展示一切物品
原标题:Prevent "hg status" from showing everything under untracked directories
  • 时间:2010-03-26 04:49:18
  •  标签:
  • mercurial

我发现<代码>hg status的输出量太高,无法追踪的名录。 附录 我有一个空洞的存放处,由<代码>git 和hg管理。 因此,将有两个名录:.git.hg

<代码>git 状况 :

# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   .hg/

<代码>hg 状况 :

? .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

是否有办法将其产出削减到如下一行?

? .git/
最佳回答
问题回答

这为我工作:

hg status -q

备选案文<代码>-q/---quiet藏匿未经跟踪(无人知晓和忽视)档案,除非有<代码>-u--un known或-i/--ignored的明确要求。

我理解的问题是如何减少产出: 我有同样的需要,但不想 un或忽略档案。 如果你使用*NIX,那么你就使用灰尘,你只是想把产出作为你的问题国家加以削减,例如删除:

hg status | grep -v "^?s.git" 

或例如没有显示已删除的档案

hg status | grep -v "^R"

Windows Power 壳牌相同:

hg status | Select-String -Pattern ("^[^R]")




相关问题
Can I clone part of a Mercurial repository?

Is it possible to clone part of a Mercurial repository? Let s say the repository is quite large, or contains multiple projects, or multiple branches. Can I clone only part of the repository? E.g. in ...

Sync files in Two Different Repos using HG

I ve got a problem when I try to sync files in two different repos. What I want to do is: I ve got 2 repos A and B, and they share some common files, suppose they lie in A/docs/common/ and B/docs/...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

git for mercurial like git-svn

Hello is there a tool for git that allow to work with mercurial repositories F.e. for svn there is a git-svn package, that allows to clone/commit/update from svn and work in a git way.. So is there ...

Useful Mercurial Hooks [closed]

What are some useful Mercurial hooks that you have come across? A few example hooks are located in the Mercurial book: acl bugzilla notify check for whitespace I personally don t find these very ...

热门标签