comparison mercurial/exchange.py @ 25443:443d3decbdde

pull: skip pulling remote bookmarks with bundle1 if a value already exist For efficiency and consistency purpose, remote bookmarks, retrieved at the time the pull command code is doing lookup, will be reused during the core pull operation. A first step toward this is to setup the logic avoiding pulling the data again during the discovery phase if some have already been provided.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 01 Jun 2015 22:28:03 -0700
parents 525fbf24b51b
children 1d1fd5d44f57
comparison
equal deleted inserted replaced
25442:9ee395dffac9 25443:443d3decbdde
947 def _pullbookmarkbundle1(pullop): 947 def _pullbookmarkbundle1(pullop):
948 """fetch bookmark data in bundle1 case 948 """fetch bookmark data in bundle1 case
949 949
950 If not using bundle2, we have to fetch bookmarks before changeset 950 If not using bundle2, we have to fetch bookmarks before changeset
951 discovery to reduce the chance and impact of race conditions.""" 951 discovery to reduce the chance and impact of race conditions."""
952 if pullop.remotebookmarks is not None:
953 return
952 if not _canusebundle2(pullop): # all bundle2 server now support listkeys 954 if not _canusebundle2(pullop): # all bundle2 server now support listkeys
953 pullop.remotebookmarks = pullop.remote.listkeys('bookmarks') 955 pullop.remotebookmarks = pullop.remote.listkeys('bookmarks')
954 956
955 957
956 @pulldiscovery('changegroup') 958 @pulldiscovery('changegroup')