1664 if confirm or ( |
1663 if confirm or ( |
1665 repo.ui.configbool(b"pull", b"confirm") and not repo.ui.plain() |
1664 repo.ui.configbool(b"pull", b"confirm") and not repo.ui.plain() |
1666 ): |
1665 ): |
1667 add_confirm_callback(repo, pullop) |
1666 add_confirm_callback(repo, pullop) |
1668 |
1667 |
1669 # Use the modern wire protocol, if available. |
1668 # This should ideally be in _pullbundle2(). However, it needs to run |
1670 if remote.capable(b'command-changesetdata'): |
1669 # before discovery to avoid extra work. |
1671 exchangev2.pull(pullop) |
1670 _maybeapplyclonebundle(pullop) |
1672 else: |
1671 streamclone.maybeperformlegacystreamclone(pullop) |
1673 # This should ideally be in _pullbundle2(). However, it needs to run |
1672 _pulldiscovery(pullop) |
1674 # before discovery to avoid extra work. |
1673 if pullop.canusebundle2: |
1675 _maybeapplyclonebundle(pullop) |
1674 _fullpullbundle2(repo, pullop) |
1676 streamclone.maybeperformlegacystreamclone(pullop) |
1675 _pullchangeset(pullop) |
1677 _pulldiscovery(pullop) |
1676 _pullphase(pullop) |
1678 if pullop.canusebundle2: |
1677 _pullbookmarks(pullop) |
1679 _fullpullbundle2(repo, pullop) |
1678 _pullobsolete(pullop) |
1680 _pullchangeset(pullop) |
|
1681 _pullphase(pullop) |
|
1682 _pullbookmarks(pullop) |
|
1683 _pullobsolete(pullop) |
|
1684 |
1679 |
1685 # storing remotenames |
1680 # storing remotenames |
1686 if repo.ui.configbool(b'experimental', b'remotenames'): |
1681 if repo.ui.configbool(b'experimental', b'remotenames'): |
1687 logexchange.pullremotenames(repo, remote) |
1682 logexchange.pullremotenames(repo, remote) |
1688 |
1683 |