basectx: preserve loading the cached manifest in _prestatus
This is just a copy from localrepo.status and is a small step to removing that
method entirely. The prestatus hook is only called for changectx's, thereby
ensuring that the same behavior is guaranteed.
localrepo: use new subrev method of context.py
With the machinery in place, we use context.subrev instead of testing for a
workingctx directly. This allows more flexibility for later patches that will
add memctx to the mix.
committablectx: add subrev method to return None
This allows a future patch to use object oriented style to remove an if
statement in the status method.
basectx: add subrev method to return the rev of a subrepo given a subpath
This will be used in an upcoming patch to simplify the status method by
eliminating an if block.
bundle2: fix bundle2 pulling all revs on empty pulls
When bundle2 was enabled, if hg pull had no commits to pull, it would print
'no changes found' and then download the entire repository from the server. This
was caused by heads and common being set to None, which gets treated as
heads=cl.heads() and common=[nullid], which means download the entire repo.
Pulling bundles without a changegroup is a valid use case (like if we're just
updating bookmarks), so this modifes the bundle code to allow not adding
changegroups.
This is backport of
ab5040cd5749.