# HG changeset patch # User Pierre-Yves David # Date 1432846503 25200 # Node ID d0f1d8b4de57a4a8c7be90fa5c5bb7d3afc88c44 # Parent 4cc3fb23881d9abc7745501ef0d777e5976ddb52 pull: only list remote bookmarks if -B is used to populate pulled heads Listing remote bookmarks results in network traffic and latency. This should be avoided when possible. diff -r 4cc3fb23881d -r d0f1d8b4de57 mercurial/commands.py --- a/mercurial/commands.py Sat May 30 12:46:30 2015 +0900 +++ b/mercurial/commands.py Thu May 28 13:55:03 2015 -0700 @@ -5119,11 +5119,11 @@ revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) - remotebookmarks = other.listkeys('bookmarks') if opts.get('bookmark'): if not revs: revs = [] + remotebookmarks = other.listkeys('bookmarks') for b in opts['bookmark']: if b not in remotebookmarks: raise util.Abort(_('remote bookmark %s not found!') % b) diff -r 4cc3fb23881d -r d0f1d8b4de57 tests/test-ssh.t --- a/tests/test-ssh.t Sat May 30 12:46:30 2015 +0900 +++ b/tests/test-ssh.t Thu May 28 13:55:03 2015 -0700 @@ -458,9 +458,6 @@ preparing listkeys for "bookmarks" sending listkeys command received listkey for "bookmarks": 45 bytes - preparing listkeys for "bookmarks" - sending listkeys command - received listkey for "bookmarks": 45 bytes query 1; heads sending batch command searching for changes diff -r 4cc3fb23881d -r d0f1d8b4de57 tests/test-treediscovery.t --- a/tests/test-treediscovery.t Sat May 30 12:46:30 2015 +0900 +++ b/tests/test-treediscovery.t Thu May 28 13:55:03 2015 -0700 @@ -516,7 +516,6 @@ "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 "GET /?cmd=capabilities HTTP/1.1" 200 - "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks - "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks "GET /?cmd=heads HTTP/1.1" 200 - "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785