Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 10875:a9702c47a19f stable
partial backout of 1e819576e926 and add tests (issue2131)
The tests are due to Peter Arrenbrecht
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Thu, 08 Apr 2010 19:46:47 +0200 |
parents | 60b42f318a6d |
children | 24ed7a541f23 816bac2f9452 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Apr 07 21:31:47 2010 +0200 +++ b/mercurial/localrepo.py Thu Apr 08 19:46:47 2010 +0200 @@ -1517,8 +1517,15 @@ if len(lheads) > len(rheads): warn = 1 else: + # add local heads involved in the push + updatelheads = [self.changelog.heads(x, lheads) + for x in update] + newheads = set(sum(updatelheads, [])) & set(lheads) + + if not newheads: + return True + # add heads we don't have or that are not involved in the push - newheads = set(lheads) for r in rheads: if r in self.changelog.nodemap: desc = self.changelog.heads(r, heads)