jhourback
jhourback

Reputation: 4571

hg reverse diff of a single revision

If doing hg diff --rev 1 --rev 2, one can get the reverse diff by swapping the order of the --rev arguments. Is there a way to do this more generally, including when using the -c argument, or when taking the diff of the working directory?

Upvotes: 2

Views: 359

Answers (1)

planetmaker
planetmaker

Reputation: 6044

Excerpt from the man page of hg diff:

--reverse             produce a diff that undoes the changes

So simply employ that flag in addition to whatever flags you need to create the diff you are interested in

Upvotes: 1

Related Questions