mercurial/localrepo.py
changeset 10876 24ed7a541f23
parent 10864 8bc4ad7e34c8
parent 10875 a9702c47a19f
child 10877 dc097666de01
equal deleted inserted replaced
10871:3f30190781a3 10876:24ed7a541f23
  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: