Show More
@@ -1622,7 +1622,6 b' class localrepository(repo.repository):' | |||
|
1622 | 1622 | self.ui.status(_(msg) % len(outgoing.excluded)) |
|
1623 | 1623 | else: |
|
1624 | 1624 | self.ui.status(_("no changes found\n")) |
|
1625 | fut = outgoing.common | |
|
1626 | 1625 | ret = 1 |
|
1627 | 1626 | else: |
|
1628 | 1627 | # something to push |
@@ -1653,33 +1652,32 b' class localrepository(repo.repository):' | |||
|
1653 | 1652 | # we return an integer indicating remote head count change |
|
1654 | 1653 | ret = remote.addchangegroup(cg, 'push', self.url()) |
|
1655 | 1654 | |
|
1656 | # compute what should be the now common | |
|
1657 |
|
|
|
1658 | # XXX If push failed we should use strict common and not | |
|
1659 | # future to avoid pushing phase data on unknown changeset. | |
|
1660 | # This is to done later. | |
|
1661 | fut = outgoing.commonheads + outgoing.missingheads | |
|
1655 | cheads = outgoing.commonheads[:] | |
|
1656 | if ret: | |
|
1657 | # push succeed, synchonize common + pushed | |
|
1658 | # this is a no-op if there was nothing to push | |
|
1659 | cheads += outgoing.missingheads | |
|
1662 | 1660 | # even when we don't push, exchanging phase data is useful |
|
1663 | 1661 | remotephases = remote.listkeys('phases') |
|
1664 | 1662 | if not remotephases: # old server or public only repo |
|
1665 |
phases.advanceboundary(self, phases.public, |
|
|
1663 | phases.advanceboundary(self, phases.public, cheads) | |
|
1666 | 1664 | # don't push any phase data as there is nothing to push |
|
1667 | 1665 | else: |
|
1668 |
ana = phases.analyzeremotephases(self, |
|
|
1666 | ana = phases.analyzeremotephases(self, cheads, remotephases) | |
|
1669 | 1667 | pheads, droots = ana |
|
1670 | 1668 | ### Apply remote phase on local |
|
1671 | 1669 | if remotephases.get('publishing', False): |
|
1672 |
phases.advanceboundary(self, phases.public, |
|
|
1670 | phases.advanceboundary(self, phases.public, cheads) | |
|
1673 | 1671 | else: # publish = False |
|
1674 | 1672 | phases.advanceboundary(self, phases.public, pheads) |
|
1675 |
phases.advanceboundary(self, phases.draft, |
|
|
1673 | phases.advanceboundary(self, phases.draft, cheads) | |
|
1676 | 1674 | ### Apply local phase on remote |
|
1677 | 1675 | |
|
1678 | 1676 | # Get the list of all revs draft on remote by public here. |
|
1679 | 1677 | # XXX Beware that revset break if droots is not strictly |
|
1680 | 1678 | # XXX root we may want to ensure it is but it is costly |
|
1681 | 1679 | outdated = self.set('heads((%ln::%ln) and public())', |
|
1682 |
droots, |
|
|
1680 | droots, cheads) | |
|
1683 | 1681 | for newremotehead in outdated: |
|
1684 | 1682 | r = remote.pushkey('phases', |
|
1685 | 1683 | newremotehead.hex(), |
General Comments 0
You need to be logged in to leave comments.
Login now