mercurial/localrepo.py
branchstable
changeset 9954 d6a307719ccb
parent 9820 0b999aec64e8
child 9955 7bcbdefcd93a
child 10263 25e572394f5c
--- a/mercurial/localrepo.py	Sat Nov 28 23:44:18 2009 +0100
+++ b/mercurial/localrepo.py	Mon Nov 30 14:58:52 2009 +0100
@@ -1505,7 +1505,7 @@
                 if not rheads: # new branch requires --force
                     self.ui.warn(_("abort: push creates new"
                                    " remote branch '%s'!\n") %
-                                   self[updatelb[0]].branch())
+                                   self[lheads[0]].branch())
                 else:
                     self.ui.warn(_("abort: push creates new remote heads!\n"))
 
@@ -1548,11 +1548,7 @@
                         else:
                             rheads = []
                         lheads = localhds[lh]
-                        updatelb = [upd for upd in update
-                                    if self[upd].branch() == lh]
-                        if not updatelb:
-                            continue
-                        if not checkbranch(lheads, rheads, updatelb):
+                        if not checkbranch(lheads, rheads, update):
                             return None, 0
                 else:
                     if not checkbranch(heads, remote_heads, update):