Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 10771:01f097c4ae66 stable
push: fix bug in prepush logic and its tests
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Fri, 26 Mar 2010 17:02:36 +0100 |
parents | fe39f0160c74 |
children | 1e819576e926 |
comparison
equal
deleted
inserted
replaced
10770:fe39f0160c74 | 10771:01f097c4ae66 |
---|---|
1573 | 1573 |
1574 if not revs: | 1574 if not revs: |
1575 localbrheads = self.branchmap() | 1575 localbrheads = self.branchmap() |
1576 else: | 1576 else: |
1577 localbrheads = {} | 1577 localbrheads = {} |
1578 for n in heads: | 1578 ctxgen = (self[n] for n in msng_cl) |
1579 branch = self[n].branch() | 1579 self._updatebranchcache(localbrheads, ctxgen) |
1580 localbrheads.setdefault(branch, []).append(n) | |
1581 | 1580 |
1582 newbranches = list(set(localbrheads) - set(remotebrheads)) | 1581 newbranches = list(set(localbrheads) - set(remotebrheads)) |
1583 if newbranches: # new branch requires --force | 1582 if newbranches: # new branch requires --force |
1584 branchnames = ', '.join("%s" % b for b in newbranches) | 1583 branchnames = ', '.join("%s" % b for b in newbranches) |
1585 self.ui.warn(_("abort: push creates " | 1584 self.ui.warn(_("abort: push creates " |