exchangev2: fetch and apply phases data
Now that the server supports emitting phases data, we can request it
and apply it on the client.
Because we may receive phases-only updates from the server, we no
longer conditionally perform the "changesetdata" command depending
on whether there are revisions to fetch. In the previous wire
protocol, this case would result in us falling back to performing
"listkeys" commands to look up phases, bookmarks, etc data. But
since "changesetdata" is smart enough to handle metadata only
fetches, we can keep things consistent.
It's worth noting that because of the unified approach to changeset
data retrieval, phase handling code in wire proto v2 exchange is
drastically simpler. Contrast with all the code in exchange.py
dealing with all the variations for obtaining phases data.
Differential Revision: https://phab.mercurial-scm.org/D4484
$ hg init
$ echo a > a
$ hg ci -Ama
adding a
$ hg an a
0: a
$ hg --config ui.strict=False an a
0: a
$ echo "[ui]" >> $HGRCPATH
$ echo "strict=True" >> $HGRCPATH
$ hg an a
hg: unknown command 'an'
(use 'hg help' for a list of commands)
[255]
$ hg annotate a
0: a
should succeed - up is an alias, not an abbreviation
$ hg up
0 files updated, 0 files merged, 0 files removed, 0 files unresolved