I am working on a project and I have to find the number of files added, deleted and modified since the last commit in mercurial hg.

hg status gives us the list of files which are modified, deleted and unknown. So using hg status is there any way i can get a count of all files added, deleted and modified?

有帮助吗?

解决方案

Each file added, modified or deleted is listed on a line by itself, so you can count the lines for each. For instance, on Unix-like systems with the wc command:

hg status --modified | wc -l

其他提示

Since the last commit it's always 0.

Describe your business-task in business-words

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top