738 [('', 'old', None, _('use old-style discovery')), |
738 [('', 'old', None, _('use old-style discovery')), |
739 ('', 'nonheads', None, |
739 ('', 'nonheads', None, |
740 _('use old-style discovery with non-heads included')), |
740 _('use old-style discovery with non-heads included')), |
741 ('', 'rev', [], 'restrict discovery to this set of revs'), |
741 ('', 'rev', [], 'restrict discovery to this set of revs'), |
742 ] + cmdutil.remoteopts, |
742 ] + cmdutil.remoteopts, |
743 _('[-l REV] [-r REV] [-b BRANCH]... [OTHER]')) |
743 _('[--rev REV] [OTHER]')) |
744 def debugdiscovery(ui, repo, remoteurl="default", **opts): |
744 def debugdiscovery(ui, repo, remoteurl="default", **opts): |
745 """runs the changeset discovery protocol in isolation""" |
745 """runs the changeset discovery protocol in isolation""" |
746 opts = pycompat.byteskwargs(opts) |
746 opts = pycompat.byteskwargs(opts) |
747 remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl)) |
747 remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl)) |
748 remote = hg.peer(repo, opts, remoteurl) |
748 remote = hg.peer(repo, opts, remoteurl) |