mercurial/localrepo.py
changeset 9982 ddc899096b7b
parent 9949 bc3f762af82e
parent 9954 d6a307719ccb
child 10010 2fce96916d97
equal deleted inserted replaced
9980:2ba40cdaacb2 9982:ddc899096b7b
  1524 
  1524 
  1525             if warn:
  1525             if warn:
  1526                 if not rheads: # new branch requires --force
  1526                 if not rheads: # new branch requires --force
  1527                     self.ui.warn(_("abort: push creates new"
  1527                     self.ui.warn(_("abort: push creates new"
  1528                                    " remote branch '%s'!\n") %
  1528                                    " remote branch '%s'!\n") %
  1529                                    self[updatelb[0]].branch())
  1529                                    self[lheads[0]].branch())
  1530                 else:
  1530                 else:
  1531                     self.ui.warn(_("abort: push creates new remote heads!\n"))
  1531                     self.ui.warn(_("abort: push creates new remote heads!\n"))
  1532 
  1532 
  1533                 self.ui.status(_("(did you forget to merge?"
  1533                 self.ui.status(_("(did you forget to merge?"
  1534                                  " use push -f to force)\n"))
  1534                                  " use push -f to force)\n"))
  1567                         if lh in remotehds:
  1567                         if lh in remotehds:
  1568                             rheads = remotehds[lh]
  1568                             rheads = remotehds[lh]
  1569                         else:
  1569                         else:
  1570                             rheads = []
  1570                             rheads = []
  1571                         lheads = localhds[lh]
  1571                         lheads = localhds[lh]
  1572                         updatelb = [upd for upd in update
  1572                         if not checkbranch(lheads, rheads, update):
  1573                                     if self[upd].branch() == lh]
       
  1574                         if not updatelb:
       
  1575                             continue
       
  1576                         if not checkbranch(lheads, rheads, updatelb):
       
  1577                             return None, 0
  1573                             return None, 0
  1578                 else:
  1574                 else:
  1579                     if not checkbranch(heads, remote_heads, update):
  1575                     if not checkbranch(heads, remote_heads, update):
  1580                         return None, 0
  1576                         return None, 0
  1581 
  1577