Question

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?

Was it helpful?

Solution

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

OTHER TIPS

Since the last commit it's always 0.

Describe your business-task in business-words

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top