Roberto Aloi
Roberto Aloi

Reputation: 30985

Diffing only modified files in Mercurial

In Mercurial it's possible to hg status only the modified/added/removed files by doing:

hg st -m
hg st -a
hg st -r

Is it possible to obtain the same behaviour for the diff command? From the man page, it seems not.

Upvotes: 7

Views: 1433

Answers (1)

Tim Henigan
Tim Henigan

Reputation: 62168

One option would be to use something like this:

hg status -mar --no-status | xargs hg diff

The --no-status flag insures that just the file name is sent to STDOUT.

Upvotes: 7

Related Questions