Mercurial > public > mercurial-scm > hg
diff mercurial/exchange.py @ 25446:b5311068077e
pull: prevent race condition in bookmark update when using -B (issue4689)
We are already fetching remote bookmarks to honor the -B option, we
now pass that data to the pull process so it can reuse it. This
prevents a race condition between the initial looking and the actual
pulling of changesets and bookmarks. Tests are updated to handle this
fact.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 01 Jun 2015 22:34:01 -0700 |
parents | 1457c1f28c92 |
children | f00a63a43c4b |
line wrap: on
line diff
--- a/mercurial/exchange.py Tue Jun 02 00:43:11 2015 -0700 +++ b/mercurial/exchange.py Mon Jun 01 22:34:01 2015 -0700 @@ -808,7 +808,8 @@ afterward. """ - def __init__(self, repo, remote, heads=None, force=False, bookmarks=()): + def __init__(self, repo, remote, heads=None, force=False, bookmarks=(), + remotebookmarks=None): # repo we pull into self.repo = repo # repo we pull from @@ -828,7 +829,7 @@ # list of missing changeset to fetch remotely self.fetch = None # remote bookmarks data - self.remotebookmarks = None + self.remotebookmarks = remotebookmarks # result of changegroup pulling (used as return code by pull) self.cgresult = None # list of step already done