Mercurial > hg
changeset 20900:cb37fb91bc5a
pull: put discovery step in its own function
The discovery is a full step that will grow to contain more than changesets. We
set it in its own function like all other steps.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 01 Apr 2014 17:35:25 -0700 |
parents | d62319f91cb7 |
children | a26dfa7f534c |
files | mercurial/exchange.py |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exchange.py Tue Apr 01 17:28:21 2014 -0700 +++ b/mercurial/exchange.py Tue Apr 01 17:35:25 2014 -0700 @@ -450,11 +450,7 @@ lock = pullop.repo.lock() try: - tmp = discovery.findcommonincoming(pullop.repo.unfiltered(), - pullop.remote, - heads=pullop.heads, - force=force) - pullop.common, pullop.fetch, pullop.rheads = tmp + _pulldiscovery(pullop) _pullchangeset(pullop) _pullphase(pullop) _pullobsolete(pullop) @@ -465,6 +461,17 @@ return pullop.cgresult +def _pulldiscovery(pullop): + """discovery phase for the pull + + Current handle changeset discovery only, will change handle all discovery + at some point.""" + tmp = discovery.findcommonincoming(pullop.repo.unfiltered(), + pullop.remote, + heads=pullop.heads, + force=pullop.force) + pullop.common, pullop.fetch, pullop.rheads = tmp + def _pullchangeset(pullop): """pull changeset from unbundle into the local repo""" # We delay the open of the transaction as late as possible so we