# HG changeset patch # User Raphaël Gomès # Date 2022-11-25 14:14:40 # Node ID f56873a7284c7b7c2ad3dcdffcc449ee75df27ae # Parent 45d7b8c380d752739e4c3eb402bcae3840330e94 # Parent c6f0bcb7bc571f4e3629aa3b4202e5a60f14e99b branching: merge stable into default diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -907,7 +907,7 @@ def help_( if missing_order: ui.develwarn( b'help categories missing from CATEGORY_ORDER: %s' - % missing_order + % stringutil.forcebytestr(missing_order) ) # List per category. @@ -940,7 +940,7 @@ def help_( if missing_order: ui.develwarn( b'help categories missing from TOPIC_CATEGORY_ORDER: %s' - % missing_order + % stringutil.forcebytestr(missing_order) ) # Output topics per category. diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -1323,7 +1323,7 @@ def _globre(pat): return res -FLAG_RE = util.re.compile(b'^\(\?([aiLmsux]+)\)(.*)') +FLAG_RE = util.re.compile(br'^\(\?([aiLmsux]+)\)(.*)') def _regex(kind, pat, globsuffix): diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py +++ b/mercurial/setdiscovery.py @@ -99,9 +99,9 @@ def _limitsample(sample, desiredlen, ran """ if len(sample) <= desiredlen: return sample + sample = list(sample) if randomize: return set(random.sample(sample, desiredlen)) - sample = list(sample) sample.sort() return set(sample[:desiredlen]) diff --git a/tests/test-push-race.t b/tests/test-push-race.t --- a/tests/test-push-race.t +++ b/tests/test-push-race.t @@ -48,6 +48,14 @@ A set of extension and shell functions e > if watchpath is not None: > ui.status(b'waiting on: %s\n' % watchpath) > limit = 100 + > test_default_timeout = os.environ.get('HGTEST_TIMEOUT_DEFAULT') + > test_timeout = os.environ.get('HGTEST_TIMEOUT') + > if ( + > test_default_timeout is not None + > and test_timeout is not None + > and test_default_timeout < test_timeout + > ): + > limit = int(limit * (test_timeout / test_default_timeout)) > while 0 < limit and not os.path.exists(watchpath): > limit -= 1 > time.sleep(0.1)