Skip to content
Snippets Groups Projects
  1. May 06, 2024
  2. May 02, 2024
    • Pierre-Yves David's avatar
      re2: make errors quiet · 6c39edd1
      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.
      6c39edd1
    • Pierre-Yves David's avatar
      fold-or-prune-me: update proposal · fc317bd5
      Pierre-Yves David authored
      This does the same things but with a narrower wrapping.
      fc317bd5
  3. Mar 31, 2024
    • Felipe Resende's avatar
      subrepo: propagate non-default path on outgoing · 3e0f86f0
      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.
      3e0f86f0
  4. Apr 04, 2024
    • Arseniy Alekseyev's avatar
      wireprotoserver: ensure that output stream gets flushed on exception · 13c004b5
      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.
      13c004b5
  5. Apr 15, 2024
    • Arseniy Alekseyev's avatar
      match: strengthen visit_children_set invariant, Recursive means "all files" · 74230abb
      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.
      74230abb
  6. Apr 12, 2024
  7. Apr 11, 2024
  8. Apr 04, 2024
  9. Apr 03, 2024
  10. Mar 29, 2024
  11. Mar 28, 2024
  12. Mar 25, 2024
    • Pierre-Yves David's avatar
      phases: update the phase set as we go during retract boundary · 4ee50d98
      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!
      4ee50d98
    • Pierre-Yves David's avatar
      phases: avoid a potentially costly dictionary interation in some case · e0f92bd9
      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.
      e0f92bd9
  13. Mar 21, 2024
  14. Mar 17, 2024
    • Felipe Resende's avatar
      subrepo: fix normalizing paths with scheme · 08913487
      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://
      08913487
  15. Mar 16, 2024
  16. Mar 18, 2024
  17. Mar 15, 2024
  18. Mar 14, 2024
Loading