comparison 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
comparison
equal deleted inserted replaced
10874:4f11978ae45d 10875:a9702c47a19f
1515 warn = 0 1515 warn = 0
1516 1516
1517 if len(lheads) > len(rheads): 1517 if len(lheads) > len(rheads):
1518 warn = 1 1518 warn = 1
1519 else: 1519 else:
1520 # add local heads involved in the push
1521 updatelheads = [self.changelog.heads(x, lheads)
1522 for x in update]
1523 newheads = set(sum(updatelheads, [])) & set(lheads)
1524
1525 if not newheads:
1526 return True
1527
1520 # add heads we don't have or that are not involved in the push 1528 # add heads we don't have or that are not involved in the push
1521 newheads = set(lheads)
1522 for r in rheads: 1529 for r in rheads:
1523 if r in self.changelog.nodemap: 1530 if r in self.changelog.nodemap:
1524 desc = self.changelog.heads(r, heads) 1531 desc = self.changelog.heads(r, heads)
1525 l = [h for h in heads if h in desc] 1532 l = [h for h in heads if h in desc]
1526 if not l: 1533 if not l: