facebook/arcanist — pull request #28 by phleet (2012-05-17 17:15:25+00:00)
Title: Make arc diff work with multiple heads in hg

When you have a commit history that looks like this:

```
@ 11805 foo (bookmark: foo, not pushed)
|
| o 11804 bar (bookmark: bar, not pushed)
|/
o 11803 baz (already pushed)
```

If you're on `foo` (i.e. `hg update 11805`), and run arc diff, the diff that shows up on differential is correct, but the list of commits will contain both `foo` and `bar`.

This is because `11805:0` contains `11804`. We actually only want things that are ancestors of the current revision, which we can get with `ancestor(11805)` instead.

These heads are the same hg branch, but are identified by different hg bookmarks (which are like lightweight git branches).