equal
deleted
inserted
replaced
545 (computed for both success and failure case for changesets push)""" |
545 (computed for both success and failure case for changesets push)""" |
546 outgoing = pushop.outgoing |
546 outgoing = pushop.outgoing |
547 unfi = pushop.repo.unfiltered() |
547 unfi = pushop.repo.unfiltered() |
548 remotephases = pushop.remote.listkeys('phases') |
548 remotephases = pushop.remote.listkeys('phases') |
549 publishing = remotephases.get('publishing', False) |
549 publishing = remotephases.get('publishing', False) |
550 if (pushop.ui.configbool('ui', '_usedassubrepo', False) |
550 if (pushop.ui.configbool('ui', '_usedassubrepo') |
551 and remotephases # server supports phases |
551 and remotephases # server supports phases |
552 and not pushop.outgoing.missing # no changesets to be pushed |
552 and not pushop.outgoing.missing # no changesets to be pushed |
553 and publishing): |
553 and publishing): |
554 # When: |
554 # When: |
555 # - this is a subrepo push |
555 # - this is a subrepo push |
991 def _pushsyncphase(pushop): |
991 def _pushsyncphase(pushop): |
992 """synchronise phase information locally and remotely""" |
992 """synchronise phase information locally and remotely""" |
993 cheads = pushop.commonheads |
993 cheads = pushop.commonheads |
994 # even when we don't push, exchanging phase data is useful |
994 # even when we don't push, exchanging phase data is useful |
995 remotephases = pushop.remote.listkeys('phases') |
995 remotephases = pushop.remote.listkeys('phases') |
996 if (pushop.ui.configbool('ui', '_usedassubrepo', False) |
996 if (pushop.ui.configbool('ui', '_usedassubrepo') |
997 and remotephases # server supports phases |
997 and remotephases # server supports phases |
998 and pushop.cgresult is None # nothing was pushed |
998 and pushop.cgresult is None # nothing was pushed |
999 and remotephases.get('publishing', False)): |
999 and remotephases.get('publishing', False)): |
1000 # When: |
1000 # When: |
1001 # - this is a subrepo push |
1001 # - this is a subrepo push |
1724 # need a transaction when processing a bundle2 stream |
1724 # need a transaction when processing a bundle2 stream |
1725 # [wlock, lock, tr] - needs to be an array so nested functions can modify it |
1725 # [wlock, lock, tr] - needs to be an array so nested functions can modify it |
1726 lockandtr = [None, None, None] |
1726 lockandtr = [None, None, None] |
1727 recordout = None |
1727 recordout = None |
1728 # quick fix for output mismatch with bundle2 in 3.4 |
1728 # quick fix for output mismatch with bundle2 in 3.4 |
1729 captureoutput = repo.ui.configbool('experimental', 'bundle2-output-capture', |
1729 captureoutput = repo.ui.configbool('experimental', 'bundle2-output-capture') |
1730 False) |
|
1731 if url.startswith('remote:http:') or url.startswith('remote:https:'): |
1730 if url.startswith('remote:http:') or url.startswith('remote:https:'): |
1732 captureoutput = True |
1731 captureoutput = True |
1733 try: |
1732 try: |
1734 # note: outside bundle1, 'heads' is expected to be empty and this |
1733 # note: outside bundle1, 'heads' is expected to be empty and this |
1735 # 'check_heads' call wil be a no-op |
1734 # 'check_heads' call wil be a no-op |
1790 """Apply a clone bundle from a remote, if possible.""" |
1789 """Apply a clone bundle from a remote, if possible.""" |
1791 |
1790 |
1792 repo = pullop.repo |
1791 repo = pullop.repo |
1793 remote = pullop.remote |
1792 remote = pullop.remote |
1794 |
1793 |
1795 if not repo.ui.configbool('ui', 'clonebundles', True): |
1794 if not repo.ui.configbool('ui', 'clonebundles'): |
1796 return |
1795 return |
1797 |
1796 |
1798 # Only run if local repo is empty. |
1797 # Only run if local repo is empty. |
1799 if len(repo): |
1798 if len(repo): |
1800 return |
1799 return |
1839 # Bundle failed. |
1838 # Bundle failed. |
1840 # |
1839 # |
1841 # We abort by default to avoid the thundering herd of |
1840 # We abort by default to avoid the thundering herd of |
1842 # clients flooding a server that was expecting expensive |
1841 # clients flooding a server that was expecting expensive |
1843 # clone load to be offloaded. |
1842 # clone load to be offloaded. |
1844 elif repo.ui.configbool('ui', 'clonebundlefallback', False): |
1843 elif repo.ui.configbool('ui', 'clonebundlefallback'): |
1845 repo.ui.warn(_('falling back to normal clone\n')) |
1844 repo.ui.warn(_('falling back to normal clone\n')) |
1846 else: |
1845 else: |
1847 raise error.Abort(_('error applying bundle'), |
1846 raise error.Abort(_('error applying bundle'), |
1848 hint=_('if this error persists, consider contacting ' |
1847 hint=_('if this error persists, consider contacting ' |
1849 'the server operator or disable clone ' |
1848 'the server operator or disable clone ' |