Assuming I have a named branch foo with two commits a, b:
a b c
------o-------o-------o------- # default
\\ d e
You can do it using revsets.
In your specific example I think you could get a list of of just d
and e
using:
hg log -r "branch('foo') - branch('default')"
where that -
is defined as:
"x - y"
Changesets in x but not in y.
Getting the diff from a to e could be done as:
hg diff -r "ancestor(default, foo)" -r foo
though there's possibly a shorthand for that I'm not seeing.