1837 # will enable the server to treat clients that support clone bundles |
1836 # will enable the server to treat clients that support clone bundles |
1838 # differently from those that don't. |
1837 # differently from those that don't. |
1839 if ( |
1838 if ( |
1840 pullop.remote.capable(b'clonebundles') |
1839 pullop.remote.capable(b'clonebundles') |
1841 and pullop.heads is None |
1840 and pullop.heads is None |
1842 and list(pullop.common) == [nullid] |
1841 and list(pullop.common) == [pullop.repo.nullid] |
1843 ): |
1842 ): |
1844 kwargs[b'cbattempted'] = pullop.clonebundleattempted |
1843 kwargs[b'cbattempted'] = pullop.clonebundleattempted |
1845 |
1844 |
1846 if streaming: |
1845 if streaming: |
1847 pullop.repo.ui.status(_(b'streaming all changes\n')) |
1846 pullop.repo.ui.status(_(b'streaming all changes\n')) |
1848 elif not pullop.fetch: |
1847 elif not pullop.fetch: |
1849 pullop.repo.ui.status(_(b"no changes found\n")) |
1848 pullop.repo.ui.status(_(b"no changes found\n")) |
1850 pullop.cgresult = 0 |
1849 pullop.cgresult = 0 |
1851 else: |
1850 else: |
1852 if pullop.heads is None and list(pullop.common) == [nullid]: |
1851 if pullop.heads is None and list(pullop.common) == [pullop.repo.nullid]: |
1853 pullop.repo.ui.status(_(b"requesting all changes\n")) |
1852 pullop.repo.ui.status(_(b"requesting all changes\n")) |
1854 if obsolete.isenabled(pullop.repo, obsolete.exchangeopt): |
1853 if obsolete.isenabled(pullop.repo, obsolete.exchangeopt): |
1855 remoteversions = bundle2.obsmarkersversion(pullop.remotebundle2caps) |
1854 remoteversions = bundle2.obsmarkersversion(pullop.remotebundle2caps) |
1856 if obsolete.commonversion(remoteversions) is not None: |
1855 if obsolete.commonversion(remoteversions) is not None: |
1857 kwargs[b'obsmarkers'] = True |
1856 kwargs[b'obsmarkers'] = True |
1918 if not pullop.fetch: |
1917 if not pullop.fetch: |
1919 pullop.repo.ui.status(_(b"no changes found\n")) |
1918 pullop.repo.ui.status(_(b"no changes found\n")) |
1920 pullop.cgresult = 0 |
1919 pullop.cgresult = 0 |
1921 return |
1920 return |
1922 tr = pullop.gettransaction() |
1921 tr = pullop.gettransaction() |
1923 if pullop.heads is None and list(pullop.common) == [nullid]: |
1922 if pullop.heads is None and list(pullop.common) == [pullop.repo.nullid]: |
1924 pullop.repo.ui.status(_(b"requesting all changes\n")) |
1923 pullop.repo.ui.status(_(b"requesting all changes\n")) |
1925 elif pullop.heads is None and pullop.remote.capable(b'changegroupsubset'): |
1924 elif pullop.heads is None and pullop.remote.capable(b'changegroupsubset'): |
1926 # issue1320, avoid a race if remote changed after discovery |
1925 # issue1320, avoid a race if remote changed after discovery |
1927 pullop.heads = pullop.rheads |
1926 pullop.heads = pullop.rheads |
1928 |
1927 |