diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -772,6 +772,7 @@ def debugstate(ui, repo, **opts): ('', 'nonheads', None, _('use old-style discovery with non-heads included')), ('', 'rev', [], 'restrict discovery to this set of revs'), + ('', 'seed', '12323', 'specify the random seed use for discovery'), ] + cmdutil.remoteopts, _('[--rev REV] [OTHER]')) def debugdiscovery(ui, repo, remoteurl="default", **opts): @@ -782,7 +783,7 @@ def debugdiscovery(ui, repo, remoteurl=" ui.status(_('comparing with %s\n') % util.hidepassword(remoteurl)) # make sure tests are repeatable - random.seed(12323) + random.seed(int(opts['seed'])) def doit(pushedrevs, remoteheads, remote=remote): if opts.get('old'): diff --git a/tests/test-completion.t b/tests/test-completion.t --- a/tests/test-completion.t +++ b/tests/test-completion.t @@ -263,7 +263,7 @@ Show all commands + options debugdate: extended debugdeltachain: changelog, manifest, dir, template debugdirstate: nodates, dates, datesort - debugdiscovery: old, nonheads, rev, ssh, remotecmd, insecure + debugdiscovery: old, nonheads, rev, seed, ssh, remotecmd, insecure debugdownload: output debugextensions: template debugfileset: rev, all-files, show-matcher, show-stage