如何在Mercurial(hg)中列出存储库中的所有文件? [英] How to list all files in a repository in Mercurial (hg)?

查看:66
本文介绍了如何在Mercurial(hg)中列出存储库中的所有文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mercurial中是否有一条命令可以列出当前受源代码管理的所有文件?

Is there a command in mercurial that will list all files currently under source control?

我可以执行dir /s列出文件夹和子文件夹中的所有文件,但是我不知道已将哪些文件添加到我的存储库中.我有各种排除的文件类型和文件夹,我想在将它们设置到.hgignore文件中之前,确保没有添加任何文件和文件夹.

I can do a dir /s to list all files in my folder and subfolders, but I have no idea which have been added to my repository. I have a variety of excluded file types and folders and I want verify that none of them were added before I set them up in my .hgignore file.

推荐答案

hg status --all将列出树中的所有文件,并用字母表示其状态:M表示修改,C表示干净(由hg拥有),我不予理

hg status --all will list all the files in the tree, with a letter indicating its status: M for modified, C for clean (owned by hg), and I for ignored.

对于忽略的文件,请使用hg status -i.对于仅在下次提交时添加的文件,请使用hg status -a.这些仅显示您需要了解的内容,不需要扫描较长的文件列表.

For just ignored files, use hg status -i. For just files that will be added on the next commit, use hg status -a. These show only what you need to know and don't require scanning a long file list.

这篇关于如何在Mercurial(hg)中列出存储库中的所有文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆