mercurial/localrepo.py
changeset 9955 7bcbdefcd93a
parent 9949 bc3f762af82e
parent 9954 d6a307719ccb
child 10010 2fce96916d97
--- a/mercurial/localrepo.py	Sat Nov 28 23:58:03 2009 +0100
+++ b/mercurial/localrepo.py	Mon Nov 30 16:53:05 2009 +0100
@@ -1526,7 +1526,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"))
 
@@ -1569,11 +1569,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):