Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 25367:d0f1d8b4de57
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 28 May 2015 13:55:03 -0700 |
parents | 62da2d7745f9 |
children | ae38370fe282 |
comparison
equal
deleted
inserted
replaced
25365:4cc3fb23881d | 25367:d0f1d8b4de57 |
---|---|
5117 other = hg.peer(repo, opts, source) | 5117 other = hg.peer(repo, opts, source) |
5118 try: | 5118 try: |
5119 revs, checkout = hg.addbranchrevs(repo, other, branches, | 5119 revs, checkout = hg.addbranchrevs(repo, other, branches, |
5120 opts.get('rev')) | 5120 opts.get('rev')) |
5121 | 5121 |
5122 remotebookmarks = other.listkeys('bookmarks') | |
5123 | 5122 |
5124 if opts.get('bookmark'): | 5123 if opts.get('bookmark'): |
5125 if not revs: | 5124 if not revs: |
5126 revs = [] | 5125 revs = [] |
5126 remotebookmarks = other.listkeys('bookmarks') | |
5127 for b in opts['bookmark']: | 5127 for b in opts['bookmark']: |
5128 if b not in remotebookmarks: | 5128 if b not in remotebookmarks: |
5129 raise util.Abort(_('remote bookmark %s not found!') % b) | 5129 raise util.Abort(_('remote bookmark %s not found!') % b) |
5130 revs.append(remotebookmarks[b]) | 5130 revs.append(remotebookmarks[b]) |
5131 | 5131 |