Skip to content
Snippets Groups Projects
  1. Jun 27, 2023
    • kiilerix's avatar
      demandimport: don't delay _distutils_hack import · 80c8dcfb73c6
      kiilerix authored
      test-demandimport.py would fail on 'import distutils.msvc9compiler' because
      warnings:
        /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
          warnings.warn(
        /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
          warnings.warn("Setuptools is replacing distutils.")
      
      Telling demandimport to ignore this module will allow the hack to work as
      intended.
      
      Note:
      
      The test for distutils.msvc9compiler comes from 2205d00b6d2b. But since then,
      distutils is going away, and setuptools has moved forward and is replacing it.
      It is unclear exactly what is being tested here and how setuptools should
      depended on msvc9compiler. The test might no longer be relevant.
      80c8dcfb73c6
  2. Mar 22, 2023
    • kiilerix's avatar
      tests: update test-remotefilelog-gc.t for Python 3.11 · 8037ddacad47
      kiilerix authored
      The test output changed because test coverage changed because normpath changed:
      
        $ python3.10 -c 'import os; print(repr(os.path.normpath("asdas\0das")))'
        'asdas\x00das'
      
        $ python3.11 -c 'import os; print(repr(os.path.normpath("asdas\0das")))'
        'asdas'
      8037ddacad47
  3. Jun 26, 2023
  4. Jun 22, 2023
  5. Jun 21, 2023
  6. Jun 19, 2023
  7. May 23, 2023
  8. Jun 01, 2023
  9. Jun 20, 2023
  10. Jun 19, 2023
  11. Jun 17, 2023
  12. Apr 20, 2023
  13. Apr 17, 2023
  14. Jun 12, 2023
    • Raphaël Gomès's avatar
      match: add `filepath:` pattern to match an exact filepath relative to the root · 1c31b343e514
      Raphaël Gomès authored
      It's useful in certain automated workflows to make sure we recurse in
      directories whose name conflicts with files in other revisions.
      
      In addition it makes it possible to avoid building a potentially costly regex,
      improving performance when the set of files to match explicitly is large.
      
      The benchmark below are run in the following configuration :
       # data-env-vars.name             = mozilla-central-2018-08-01-zstd-sparse-revlog
       # benchmark.name                 = files
       # benchmark.variants.rev         = tip
       # benchmark.variants.files       = all-list-filepath-sorted
       # bin-env-vars.hg.flavor         = no-rust
      
      It also includes timings using the re2 engine (through the `google-re2` module)
      to show how much can be saved by just using a better regexp engine.
      
      
      Pattern                time (seconds)        time using re2
      -----------------------------------------------------------
      just "."                0.4                    0.4
      list of "filepath:…"    1.3                    1.3
      list of "path:…"       25.7                    3.9
      list of patterns       29.7                   10.4
      
      As you can see, Without re2, using "filepath:" instead of "path:" is a huge
      win. With re2, it is still about three times faster to not have to build the
      regex.
      1c31b343e514
  15. Jun 17, 2023
  16. Jun 15, 2023
  17. Jun 09, 2023
  18. Jun 17, 2023
Loading