changeset 49664:f56873a7284c

branching: merge stable into default
author Raphaël Gomès <rgomes@octobus.net>
date Fri, 25 Nov 2022 15:14:40 +0100
parents 45d7b8c380d7 (current diff) c6f0bcb7bc57 (diff)
children 4bd12c0f531e
files mercurial/help.py
diffstat 4 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help.py	Tue Nov 22 12:44:22 2022 +0100
+++ b/mercurial/help.py	Fri Nov 25 15:14:40 2022 +0100
@@ -907,7 +907,7 @@
             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 @@
             if missing_order:
                 ui.develwarn(
                     b'help categories missing from TOPIC_CATEGORY_ORDER: %s'
-                    % missing_order
+                    % stringutil.forcebytestr(missing_order)
                 )
 
             # Output topics per category.
--- a/mercurial/match.py	Tue Nov 22 12:44:22 2022 +0100
+++ b/mercurial/match.py	Fri Nov 25 15:14:40 2022 +0100
@@ -1323,7 +1323,7 @@
     return res
 
 
-FLAG_RE = util.re.compile(b'^\(\?([aiLmsux]+)\)(.*)')
+FLAG_RE = util.re.compile(br'^\(\?([aiLmsux]+)\)(.*)')
 
 
 def _regex(kind, pat, globsuffix):
--- a/mercurial/setdiscovery.py	Tue Nov 22 12:44:22 2022 +0100
+++ b/mercurial/setdiscovery.py	Fri Nov 25 15:14:40 2022 +0100
@@ -99,9 +99,9 @@
     """
     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])
 
--- a/tests/test-push-race.t	Tue Nov 22 12:44:22 2022 +0100
+++ b/tests/test-push-race.t	Fri Nov 25 15:14:40 2022 +0100
@@ -48,6 +48,14 @@
   >     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)