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?

Était-ce utile?

La 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

Autres conseils

Since the last commit it's always 0.

Describe your business-task in business-words

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top