I have a repo forked on BitBucket:
$ hg paths
default = https://bitbucket.org/mine/project
upstream = https://bitbucket.org/theirs/project
Now I want to compare the (local) state of my repo with its upstream. Using git I'd just write git diff --stat upstream/master origin/master
but hg doesn't appear to accept remote branch names as an argument:
$ hg diff --stat upstream/default default/default
default/default: No such file or directory
upstream/default: No such file or directory
I'm guessing I could probably specify it as a revset, but I'm having trouble getting the syntax right and can't find any examples.
The question Mercurial - compare local and remote repositories? appears related but that just shows the differences between local and remote state; I want to see the difference between remote state and the upstream remote it is forked from.
Found a way to do it using revsets, although it still feels excessively complicated:
$ hg diff -r "remote('.', 'upstream') - remote('.', 'default')"
And to generate patches:
$ hg export -v -g -r "remote('.', 'default') - remote('.', 'upstream')" -o %r-%m.patch