Skip to content
Snippets Groups Projects
  1. May 06, 2024
  2. Apr 22, 2024
    • Georges Racinet's avatar
      rust: blanket implementation of Graph for Graph references · b08c5fbe0e70
      Georges Racinet authored
      The need comes from the fact that `AncestorsIterator` and many
      Graph-related algorithms take ownership of the `Graph` they work with.
      This, in turn is due to them needing to accept the `Index` instances
      that are provided by the Python layers (that neither rhg nor `RHGitaly`
      use, of course): the fact that nowadays the Python layer holds an object
      that is itself implemented in Rust does not change the core problem that
      they cannot be tracked by the borrow checker.
      
      Even though it looks like cloning `Changelog` would be cheap, it seems
      hard to guarantee that on the long run. The object is already too rich
      for us to be comfortable with it, when using references is the most
      natural and guaranteed way of proceeding.
      
      The added test seems a bit superfleous, but it will act as a reminder
      that this feature is really useful until something in the Mercurial code
      base actually uses it.
      b08c5fbe0e70
  3. May 06, 2024
  4. May 02, 2024
    • Pierre-Yves David's avatar
      re2: make errors quiet · 6c39edd1d348
      Pierre-Yves David authored
      By default, the re2 library will output error on its own instead of keeping the
      error in an exception. This make re2 printing spurious error before fallback to
      the stdlib remodule that may accept the pattern or also fails to parse it and
      raise a proper error that will be handled by Mercurial.
      
      So we also pass an Option object that changes this default.
      6c39edd1d348
    • Pierre-Yves David's avatar
      fold-or-prune-me: update proposal · fc317bd5b637
      Pierre-Yves David authored
      This does the same things but with a narrower wrapping.
      fc317bd5b637
  5. Mar 31, 2024
    • Felipe Resende's avatar
      subrepo: propagate non-default path on outgoing · 3e0f86f09f26
      Felipe Resende authored
      There was already a fix made in 5dbff89cf107 for pull and push commands. I did
      the same for the outgoing command.
      
      The problem I identified is that when the parent repository has multiple paths,
      the outgoing command was not respecting the parent path used and was always
      using the default path for subrepositories.
      3e0f86f09f26
  6. Apr 04, 2024
    • Arseniy Alekseyev's avatar
      wireprotoserver: ensure that output stream gets flushed on exception · 13c004b54cbe
      Arseniy Alekseyev authored
      Previously flush was happening due to Python finalizer being run on
      `BufferedWriter`. With upgrade to Python 3.11 this started randomly
      failing.
      
      My guess is that the finalizer on the raw `FileIO` object may
      be running before the finalizer of `BufferedWriter` has a chance to run.
      
      At any rate, since we're not relying on finalizers in the happy case
      we should also not rely on them in case of exception.
      13c004b54cbe
  7. Apr 15, 2024
    • Arseniy Alekseyev's avatar
      match: strengthen visit_children_set invariant, Recursive means "all files" · 74230abb2504
      Arseniy Alekseyev authored
      My previous interpretation of "Recursive" was too relaxed: I thought it
      instructed the caller to do something like this:
      
      > you can stop calling `visit_children_set` because you'll need to descend into
      > every directory recursively, but you should still check every file if it
      > matches or not
      
      Whereas the real instruction seems to be:
      
      > I guarantee that everything in this subtree matches, you can stop
      > querying the matcher for all files and dirs altogether.
      
      The evidence to support this:
      
      - the test actually passes with the stronger invariant, revealing no
      exceptions from this rule
      
      - the implementation of `visit_children_set` for `DifferenceMatcher`
      clearly relies on this requirement, so it must hold for that not to
      lead to bugs.
      74230abb2504
  8. Apr 12, 2024
  9. Apr 11, 2024
  10. Apr 04, 2024
  11. Apr 03, 2024
  12. Mar 29, 2024
  13. Mar 28, 2024
  14. Mar 25, 2024
    • Pierre-Yves David's avatar
      phases: update the phase set as we go during retract boundary · 4ee50d98d35c
      Pierre-Yves David authored
      Apparently iterating over the `changed_revs` dictionary is very expensive.
      
      On mozilla-try-2019-02-18, a perf::unbundle call with a 10 000 changesets
      bundle gives give use the following timing.
      
      e57d4b868a3e:     4.6 seconds
      ac1c75188440:   102.5 seconds
      prev-changeset:  30.0 seconds
      this-changeset:   4.6 seconds
      
      So, the performance regression is gone.
      
      Once again: thanks to marvelous Python!
      4ee50d98d35c
    • Pierre-Yves David's avatar
      phases: avoid a potentially costly dictionary interation in some case · e0f92bd98c24
      Pierre-Yves David authored
      If we retract for the draft phase, there is not non-public item to be retracted
      and we can skip this part. This part is was apparently super costly thanks to
      Python.
      
      On mozilla-try-2019-02-18, a perf::unbundle call with a 10 000 changesets
      bundle gives give use the following timing.
      
      e57d4b868a3e:     4.6 seconds
      ac1c75188440:   102.5 seconds
      this-changeset:  30.0 seconds
      
      So we recovered about ⅔ of the regression, the next changeset will give us the
      rest back.
      e0f92bd98c24
  15. Mar 21, 2024
  16. Mar 17, 2024
    • Felipe Resende's avatar
      subrepo: fix normalizing paths with scheme · 08913487ae80
      Felipe Resende authored
      After revision 0afe96e374a7, subrepo paths were normalized using
      posixpath.normpath and that resulted in ssh paths being wrongly converted
      from ssh://host/path to ssh:/host/path
      
      This fix applies the same logic used in urlutil.url to split the path scheme
      from the rest and only use posixpath.normpath to the string after scheme://
      08913487ae80
  17. Mar 16, 2024
  18. Mar 18, 2024
  19. Mar 15, 2024
Loading