Skip to content
Snippets Groups Projects
  1. May 27, 2022
  2. May 21, 2022
    • Manuel Jacob's avatar
      worker: implement _blockingreader.readinto() (issue6444) · 52072252
      Manuel Jacob authored
      The core logic for readinto() was already implemented in read(), so this is
      mostly extracting that code into its own method.
      
      Another fix for issue6444 was committed to the stable branch: 2fe4efaa59af.
      That is a minimal fix that implements readinto() only on Python versions that
      require readinto() (3.8.0 and 3.8.1), which is the right approach for the
      stable branch. However, I think that this changeset has its value. It improves
      performance in cases when pickle can use readinto(), it reduces code
      duplication compared to the other patch, and by defining readinto() on all
      Python versions, it makes behavior more consistent across all Python versions.
      This changesets reverts the other change.
      52072252
    • Manuel Jacob's avatar
      worker: stop relying on garbage collection to release memoryview · 4c57ce49
      Manuel Jacob authored
      On CPython, before resizing the bytearray, all memoryviews referencing it must
      be released. Before this change, we ensured that all references to them were
      deleted. On CPython, this was enough to set the reference count to zero, which
      results in garbage collecting and releasing them.
      
      On PyPy, releasing the memoryviews is not necessary because they are implemented
      differently. If it would be necessary however, ensuring that all references are
      deleted would not be suffient because PyPy doesn’t use reference counting.
      
      By using with statements that take care of releasing the memoryviews, we ensure
      that the bytearray is resizable without relying on implementation details. So
      while this doesn’t fix any observable bug, it increases compatiblity with other
      and future Python implementations.
      4c57ce49
    • Manuel Jacob's avatar
      worker: add docstring to _blockingreader · 4d42a5fb
      Manuel Jacob authored
      4d42a5fb
    • Manuel Jacob's avatar
  3. May 17, 2022
    • Pierre-Yves David's avatar
      bundle: quick fix to ludicrous performance penalty · ed9170ff
      Pierre-Yves David authored
      We tried a `hg bundle --base ':(tip^)' --rev 'all()'` on a large repository and
      it spent 3 minutes on this 2 list comprehensions. This change remove this cost.
      
      There are still a lot of low hanging fruits as the command still take 30
      seconds. However this is a trivial patch with a massive speedup so I'll just
      sent it.
      ed9170ff
  4. May 20, 2022
  5. May 19, 2022
  6. Apr 21, 2022
  7. May 25, 2022
  8. May 18, 2022
  9. May 25, 2022
  10. May 24, 2022
  11. May 17, 2022
  12. May 22, 2022
  13. May 17, 2022
    • Matt Harbison's avatar
      worker: adapt _blockingreader to work around a python3.8.[0-1] bug (issue6444) · 2fe4efaa
      Matt Harbison authored
      Python 3.8.0 is the latest I can load on Ubuntu 18.04, and I regularly hit the
      TypeError because this function is missing.  While it can be avoided by
      disabling worker usage via config option, that's a bit obscure.
      
      I'm limiting the function definition to the narrow range of affected pythons
      because there were other bugs in this area that were worked around, that I don't
      fully understand.  See the bug report for discussions on why the narrow range,
      and related commits working around other bugs.
      
      Differential Revision: https://phab.mercurial-scm.org/D12627
      2fe4efaa
  14. Apr 06, 2021
  15. May 04, 2022
  16. May 13, 2022
  17. Apr 05, 2022
  18. Mar 22, 2022
  19. Apr 05, 2022
  20. Apr 04, 2022
    • Pierre-Yves David's avatar
      upgrade: split some logic from UpgradeOperation · 56606682
      Pierre-Yves David authored
      The logic for automatic-upgrade and the upgrade-repo should be able to use the
      same code. However that code often need an UpgradeOperation object to function.
      So we start spliting the Operation into a minimal component that we will be
      able to reuse outside of the "classic" upgrade path.
      
      We will put the base-class to use in the next changeset.
      
      Differential Revision: https://phab.mercurial-scm.org/D12612
      56606682
Loading