Mercurial > public > mercurial-scm > hg-stable
diff mercurial/debugcommands.py @ 42030:6ae1a776dd1a
debugdiscovery: allow to select random seed during debugdiscovery run
The randomness can lead to large timing difference, controling it is important.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 26 Mar 2019 14:02:40 +0100 |
parents | d121823072b8 |
children | d31d8c5279c6 |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Sun Mar 17 18:45:53 2019 +0300 +++ b/mercurial/debugcommands.py Tue Mar 26 14:02:40 2019 +0100 @@ -772,6 +772,7 @@ ('', '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 @@ 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'):