changeset 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 9ee395dffac9
children 1d1fd5d44f57
files mercurial/exchange.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Mon Jun 01 17:47:15 2015 -0700
+++ b/mercurial/exchange.py	Mon Jun 01 22:28:03 2015 -0700
@@ -949,6 +949,8 @@
 
     If not using bundle2, we have to fetch bookmarks before changeset
     discovery to reduce the chance and impact of race conditions."""
+    if pullop.remotebookmarks is not None:
+        return
     if not _canusebundle2(pullop): # all bundle2 server now support listkeys
         pullop.remotebookmarks = pullop.remote.listkeys('bookmarks')