Skip to content
Snippets Groups Projects
  1. Jul 29, 2024
    • Raphaël Gomès's avatar
      hg-core: add FnCacheVFS · 067ec857
      Raphaël Gomès authored
      This will allow us to only call back into Python to add items to the fncache,
      which should save us a lot of FFI overhead.
      
      This is also of course a stepping stone for more pure Rust work.
      067ec857
    • Raphaël Gomès's avatar
      hg-core: add a complete VFS · 7be39c51
      Raphaël Gomès authored
      This will be used from Python in a later change.
      
      More changes are needed in hg-core and rhg to properly clean up the APIs
      of the old VFS implementation but it can be done when the dust settles
      and we start adding more functionality to the pure Rust VFS.
      7be39c51
    • Raphaël Gomès's avatar
      hg-core: add fncache module · 1a8466fd
      Raphaël Gomès authored
      For now it's only a super simple trait. It will be used for calling back into
      Python soon, and later will be fleshed out into a full fncache.
      1a8466fd
  2. Sep 26, 2024
  3. Jun 19, 2024
    • Raphaël Gomès's avatar
      rust-changelog: switch away from deprecated APIs for datetime use · 6b7ffa3f
      Raphaël Gomès authored
      This was caught by clippy, nothing was changed aside from some light API
      changes.
      6b7ffa3f
    • Raphaël Gomès's avatar
      revlog: add the glue to use the Rust `InnerRevlog` from Python · 7346f93b
      Raphaël Gomès authored
      The performance of this has been looked at for quite some time, and some
      workflows are actually quite a bit faster than with the Python + C code.
      
      However, we are still (up to 20%) slower in some crucial places like cloning
      certain repos, log, cat, which makes this an incomplete rewrite. This is
      mostly due to the high amount of overhead in Python <-> Rust FFI, especially
      around the VFS code. A future patch series will rewrite the VFS code in
      pure Rust, which should hopefully get us up to par with current perfomance,
      if not better in all important cases.
      
      This is a "save state" of sorts, as this is a ton of code, and I don't want
      to pile up even more things in a single review.
      
      Continuing to try to match the current performance will take an extremely
      long time, if it's not impossible, without the aforementioned VFS work.
      7346f93b
    • Raphaël Gomès's avatar
      changelog: also set the general delta config flag in the data config · 13815c9d
      Raphaël Gomès authored
      This duplication is dubious, but it's a decision to be made at a later date,
      this is the fix.
      13815c9d
  4. Jul 29, 2024
  5. Oct 10, 2024
    • Raphaël Gomès's avatar
      rust-revlog: add a Rust-only `InnerRevlog` · e01e84e5
      Raphaël Gomès authored
      This mirrors the Python `InnerRevlog` and will be used in a future patch
      to replace said Python implementation. This allows us to start doing more
      things in pure Rust, in particular reading and writing operations.
      
      A lot of changes have to be introduced all at once, it wouldn't be very
      useful to separate this patch IMO since all of them are either interlocked
      or only useful with the rest.
      e01e84e5
    • Raphaël Gomès's avatar
      rust-index: fix the computation of data start · 44823c50
      Raphaël Gomès authored
      This was falling into place instead of being correct, we clean up the logic
      by differenciating the on-disk offset and the actual start of the data
      more cleanly.
      44823c50
    • Raphaël Gomès's avatar
      rust-index: return an error on a bad index header · f2eab496
      Raphaël Gomès authored
      This is more idiomatic and allows us to better handle the problem later.
      f2eab496
  6. Oct 17, 2024
  7. Sep 25, 2024
  8. Oct 29, 2024
  9. Oct 27, 2024
  10. Oct 28, 2024
  11. Oct 25, 2024
    • Pierre-Yves David's avatar
      evolution: stop wrongly flagging unrelated part of a split as divergent · e68fe567
      Pierre-Yves David authored
      Before this change, divergence introduced by successors of a split would "spill"
      to other unrelated successors of the split that were not ambiguous.
      
      This small changes fixes it.
      
      Thanks goes to Manuel Jacobs for the discussion leading to this realization that
      a new simple and correct definition could be found.
      e68fe567
  12. Oct 27, 2024
    • Matt Harbison's avatar
      tests: skip doctests that use `time.tzset()` on Windows · cf8d029a
      Matt Harbison authored
      There's no way to conditionally skip the tests for a function (see the inline
      feature request).  That leaves us with the choice to either put the whole
      `mercurial.utils.dateutil` module in the skip list of this script (but then this
      script prints out the module as unexpectedly not tested, and misses a bunch of
      tests that can be run), blacklist the test entirely (but that makes it harder to
      work with on Windows), or use this hack to look for the statement that is
      broken, and skip the test currently attached to one function.
      
      (It appears that an example in the list of examples corresponds to a single
      `>>>` block, and the `test` itself corresponds to a single function.  So prescan
      the examples, and skip all of them when the statement is found in any, since the
      setup of setting the timezone has an effect on subsequent examples.)
      cf8d029a
  13. Oct 07, 2024
    • Arseniy Alekseyev's avatar
      tests: hopefully fix `test-doctest.py` on Windows and more · 479899e5
      Arseniy Alekseyev authored
      1. Shell syntax understood by `shell=True` depends on the platform.
      Instead, pass `shell=False` and call `sh` explicitly to interpret
      the command correctly.
      
      2. Stop setting `HGRCPATH=/dev/null`, so the setting
      `experimental.evolution=createmarkers` is set correctly.
      The reason I set HGRCPATH to /dev/null previously is because of
      misunderstanding where I thought the Python script had no HGRC to edit.
      As it turns out, there is in fact a valid temporary HGRC pointed to by
      HGRCPATH in this context so we don't seem to need this. /shrug
      479899e5
  14. Oct 26, 2024
    • Matt Harbison's avatar
      hghave: make the description for "clang-format" ascii · f1312d08
      Matt Harbison authored
      test-fix-clang-format.t suddenly started failing on Windows by wiping the whole
      file content, and replacing with an error:
      
            $TESTTMP.sh: $TESTTMP.sh: cannot execute binary file
      
      Odd, because I don't have `clang-format` installed, so the test should be
      skipped.  The problem started with 73cf8b56c2f5, and I noticed that running
      `hghave` manually resulted in a `SyntaxError` (so I can't see how this isn't
      broken everywhere, but maybe it's because I'm using py3.9 on Windows):
      
          $ py hghave --list
          Traceback (most recent call last):
            File "hghave", line 8, in <module>
              import hghave
            File "c:\Users\Matt\hg\tests\hghave.py", line 627
          SyntaxError: Non-ASCII character '\xe2' in file c:\Users\Matt\hg\tests\hghave.py on line 627, but no encoding declared;
              see http://python.org/dev/peps/pep-0263/ for details
      f1312d08
    • Pierre-Yves David's avatar
      branching: merge stable into default · e08c878b
      Pierre-Yves David authored
      Hopefully this will bring the last changes necessary to make the 3.13 tests
      green (on Linux).
      e08c878b
    • Matt Harbison's avatar
    • Matt Harbison's avatar
      typing: suppress bogus pytype errors in `mercurial/wireprotov1peer.py` · 8b791764
      Matt Harbison authored
      Fixes:
      
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 100, in result:
              No attribute '_peerexecutor' on unsentfuture [attribute-error]
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 278, in close:
              No attribute 'shutdown' on None [attribute-error]
          Called from (traceback):
            line 123, in __exit__
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 278, in close:
              No attribute 'shutdown' on None [attribute-error]
            In Optional[concurrent.futures.thread.ThreadPoolExecutor]
      
      We drop the zope decorator on `peerexecutor`, because otherwise it triggers this
      error:
      
          File "/tmp/mercurial-ci/mercurial/wireprotov1peer.py", line 111, in <module>:
              Invalid type annotation  [invalid-annotation]
            Must be constant
      
      Not sure why, because the decorated classes usually get typed as `Any`, which
      would also be fine here.
      8b791764
    • Matt Harbison's avatar
    • Matt Harbison's avatar
      typing: suppress bogus pytype errors in `mercurial/wireprotoframing.py` · 0c260e71
      Matt Harbison authored
      This fixes:
      
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 480, in createalternatelocationresponseframe:
              unsupported operand type(s) for item assignment: bytes [unsupported-operands]
            No attribute '__setitem__' on bytes
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 510, in createcommanderrorresponse:
              unsupported operand type(s) for item assignment: bytes [unsupported-operands]
            No attribute '__setitem__' on bytes
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 776, in __init__:
              Can't find module 'mercurial.zstd'. [import-error]
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 804, in __init__:
              Can't find module 'mercurial.zstd'. [import-error]
          File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 834, in populatestreamencoders:
              Can't find module 'mercurial.zstd'. [import-error]
      
      Using `TypedDict` is tempting here to fix the first two, but requires str keys.
      The code doing the importing doesn't call the code at the other three locations
      if the `mercurial.zstd` module fails to import in a place that handles the
      ImportError.
      0c260e71
Loading