Skip to content
Snippets Groups Projects
  1. Jan 04, 2023
  2. Dec 16, 2022
    • Jörg Sonnenberger's avatar
      hgweb: skip body creation of HEAD for most requests · fda5a4b853ab
      Jörg Sonnenberger authored
      The body is thrown away anyway, so this just wastes a lot of CPU time.
      In the case of /archive/, this skips manifest processing and the actual
      file archiving, resulting in a huge difference.
      
      The most tricky part here is skipping the Content-Length creation as it
      would indicate the output size for the corresponding GET request.
      fda5a4b853ab
  3. Jan 04, 2023
  4. Jan 03, 2023
  5. Dec 06, 2022
    • Matt Harbison's avatar
      packaging: add dependencies to the PyOxidizer build on macOS · 3d7bf111f01e
      Matt Harbison authored
      Otherwise, we get a bunch of test failures for missing things like pygments, or
      tests skipped entirely.  The input file is a copy/paste from the equivalent
      Windows file, but with dulwich, pygit2, and pytest-vcr commented out because
      the build process errors out with them, flagging them as incompatible with
      loading from memory.  I have no idea if that's actually true or not, because
      I've noticed that if I don't `make clean` after every build, the next build
      flags the watchman stuff as incompatible with loading from memory.
      
      The remaining failures are:
      
          Failed test-alias.t: output changed
          Failed test-basic.t: output changed
          Failed test-check-help.t: output changed
          Failed test-commit-interactive.t: output changed
          Failed test-extension.t: output changed
          Failed test-help.t: output changed
          Failed test-i18n.t: output changed
          Failed test-log.t: output changed
          Failed test-qrecord.t: output changed
          Failed test-share-safe.t: output changed
      
      Most of the issues seem related to loading help for disabled extensions from
      `hgext.__index__`, namely the full extension help being unavailable, not being
      able to resolve what commands are provided by what extension, and not having the
      command level help available.
      
      test-log.t, test-commit-interactive.t, and test-i18n.t look like i18n (or lack
      thereof) issues.
      
      test-basic.t is just odd:
          @@ -55,7 +55,7 @@
           On Python 3, stdio may be None:
      
             $ hg debuguiprompt --config ui.interactive=true 0<&-
          -   abort: Bad file descriptor (no-rhg !)
          +   abort: response expected
              abort: response expected (rhg !)
             [255]
             $ hg version -q 0<&-
      3d7bf111f01e
    • Matt Harbison's avatar
    • Matt Harbison's avatar
      tests: conditionalize test output for in-filesystem pyoxidizer resources · 6a3549a01c02
      Matt Harbison authored
      The in-memory pyoxidizer builds apparently behave as expected.
      6a3549a01c02
    • Matt Harbison's avatar
      hghave: add predicates for embedded and filesystem pyoxidizer resources · a2356e15200a
      Matt Harbison authored
      There are a handful of tests with different output between the two flavors of
      pyoxidizer builds (like the location of the modules and templates), and a few
      others that avoid `known-bad-output` cases with the embedded resources that
      shouldn't cause the tests to fail.
      a2356e15200a
  6. Dec 05, 2022
  7. Jan 02, 2023
  8. Dec 22, 2022
  9. Dec 21, 2022
  10. May 02, 2022
  11. Dec 21, 2022
  12. May 02, 2022
  13. Dec 19, 2022
    • Franck Bret's avatar
      debug: add debug-revlog-stats command · b1e4c74beb6f
      Franck Bret authored
      Display statistics about revlogs in the store. Useful to get an approximate
      size of a repository, etc. More statistics will be added in the future.
      b1e4c74beb6f
  14. Dec 17, 2022
    • Matt Harbison's avatar
      typing: attempt to remove @overloads in the platform module for stdlib methods · 3fd5824f1177
      Matt Harbison authored
      This is mostly successful, as examining util.pyi, posix.pyi, and windows.pyi
      after a pytype run shows that the type overloads for `oslink`, `readlink`,
      `removedirs`, `rename`, `split`, and `unlink` have been removed.  (Some of these
      still have an @overload, but the differences are the variable names, not the
      types.)  However, @overloads remain for `abspath` and `normpath` for some
      reason.
      
      It's useful to redefine these methods for the type checking phase because in
      addition to excluding str and PathLike variants, some of these functions have
      optional args in stdlib that aren't implemented in the custom implementation on
      Windows, and we want the type checking to flag that instead of assuming it's an
      allowable overload everywhere.
      
      One last quirk I noticed that I can't explain- `pycompat.TYPE_CHECKING` is
      always False, so the conditionals need to check `typing.TYPE_CHECKING` directly.
      I tried dropping the custom code for assigning `pycompat.TYPE_CHECKING` and
      simply did `from typing import TYPE_CHECKING` directly in pycompat.py, and used
      `pycompat.TYPE_CHECKING` for the conditional here... and pytype complained that
      `pycompat` doesn't have the `TYPE_CHECKING` variable.
      3fd5824f1177
    • Matt Harbison's avatar
      typing: add trivial type hints to rest of the windows platform module · 2b1476714849
      Matt Harbison authored
      Skipping the file wrappers for now because there's interplay with C code, and
      making them subclass `typing.BinaryIO_Proxy` confuses PyCharm a bit.
      2b1476714849
  15. Dec 16, 2022
  16. Dec 15, 2022
    • Matt Harbison's avatar
      typing: add type hints to mercurial/win32.py · a9faacdc5943
      Matt Harbison authored
      These are the low level functions that are imported by the mercurial.windows
      module, which is in turn imported by mercurial.utils as the platform module.
      Pretty straightforward, but pytype inferred very little of it, likely because of
      the heavy ctypes usage.  It also seems to trigger a pytype bug in procutil, now
      that it has an idea of the underlying function type, so disable that warning to
      maintain a working test.
      a9faacdc5943
    • Matt Harbison's avatar
      windows: drop some py2 registry module importing · 7a80a614c9e5
      Matt Harbison authored
      The comment was actually backwards- `winreg` is importable on py3, and is
      already imported by mercurial/windows.py.
      7a80a614c9e5
    • Matt Harbison's avatar
      typing: add type hints to the platform specific scm modules · 7a4143428db7
      Matt Harbison authored
      Surprisingly, pytype struggled to figure out the return types in the posix
      functions.
      7a4143428db7
Loading