Show More
@@ -785,8 +785,10 b' def debugdiscovery(ui, repo, remoteurl="' | |||
|
785 | 785 | # make sure tests are repeatable |
|
786 | 786 | random.seed(int(opts['seed'])) |
|
787 | 787 | |
|
788 | ||
|
789 | ||
|
790 | if opts.get('old'): | |
|
788 | 791 | def doit(pushedrevs, remoteheads, remote=remote): |
|
789 | if opts.get('old'): | |
|
790 | 792 | if not util.safehasattr(remote, 'branches'): |
|
791 | 793 | # enable in-client legacy support |
|
792 | 794 | remote = localrepo.locallegacypeer(remote.local()) |
@@ -800,13 +802,21 b' def debugdiscovery(ui, repo, remoteurl="' | |||
|
800 | 802 | clnode = repo.changelog.node |
|
801 | 803 | common = repo.revs('heads(::%ln)', common) |
|
802 | 804 | common = {clnode(r) for r in common} |
|
805 | return common, hds | |
|
803 | 806 |
|
|
807 | def doit(pushedrevs, remoteheads, remote=remote): | |
|
804 | 808 | nodes = None |
|
805 | 809 | if pushedrevs: |
|
806 | 810 | revs = scmutil.revrange(repo, pushedrevs) |
|
807 | 811 | nodes = [repo[r].node() for r in revs] |
|
808 | 812 | common, any, hds = setdiscovery.findcommonheads(ui, repo, remote, |
|
809 | 813 | ancestorsof=nodes) |
|
814 | return common, hds | |
|
815 | ||
|
816 | remoterevs, _checkout = hg.addbranchrevs(repo, remote, branches, revs=None) | |
|
817 | localrevs = opts['rev'] | |
|
818 | common, hds = doit(localrevs, remoterevs) | |
|
819 | ||
|
810 | 820 |
|
|
811 | 821 |
|
|
812 | 822 |
|
@@ -817,10 +827,6 b' def debugdiscovery(ui, repo, remoteurl="' | |||
|
817 | 827 |
|
|
818 | 828 |
|
|
819 | 829 | |
|
820 | remoterevs, _checkout = hg.addbranchrevs(repo, remote, branches, revs=None) | |
|
821 | localrevs = opts['rev'] | |
|
822 | doit(localrevs, remoterevs) | |
|
823 | ||
|
824 | 830 | _chunksize = 4 << 10 |
|
825 | 831 | |
|
826 | 832 | @command('debugdownload', |
General Comments 0
You need to be logged in to leave comments.
Login now