diff -r 5b149c88d9e8 -r d6a307719ccb mercurial/localrepo.py --- 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):