pull: skip pulling remote bookmarks with bundle1 if a value already exist
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 01 Jun 2015 22:28:03 -0700
changeset 25443 443d3decbdde
parent 25442 9ee395dffac9
child 25444 1d1fd5d44f57
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.
mercurial/exchange.py
--- 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')