开发者

Mercurial: Check which files will be adding before adding

I want to make sure my regexp in .htignore are work开发者_运维百科ing correctly. Before adding files to the repository, I would like to see which files hg add command would add. How can I do this?


"hg status" will as the name implies show you the status of the files.

From "hg help status"

The codes used to show the status of files are:
M = modified
A = added
R = removed
C = clean
! = missing (deleted by non-hg command, but still tracked)
? = not tracked
I = ignored
  = origin of the previous file listed as A (added)

You can also run "hg add -n" which is dry run and will only print the output but not do any thing to the repository.


I agree with NA's answer, but it should also be noted that you can hg add anything, even files that are already being ignored by the .hgignore filter. In other words, if your .hgignore contains this:

glob:*.abc

you can still explicitly add files of type *.abc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜