Skip to content
Snippets Groups Projects
  1. May 31, 2022
  2. May 30, 2022
    • Pierre-Yves David's avatar
      debugindex: move the logic into its own module · 61cf3d39fd9e
      Pierre-Yves David authored
      Adding more information will significantly increase the amount of code. So we
      move the code into its own module before making it more complex.
      61cf3d39fd9e
    • Pierre-Yves David's avatar
      debugindex: rename to debugindex debug-revlog-index · db19f6be0442
      Pierre-Yves David authored
      The command dump some content of the revlog index and omit a lot of
      information. I am going to make it display the missing information.
      
      For clarity, we rename the command to explicitly mention revlog.
      db19f6be0442
    • Manuel Jacob's avatar
      node: stop converting binascii.Error to TypeError in bin() · 63fd0282ad40
      Manuel Jacob authored
      Changeset f574cc00831a introduced the wrapper, to make bin() behave like on
      Python 2, where it raised TypeError in many cases. Another previous approach,
      changing callers to catch binascii.Error in addition to TypeError, was backed
      out after negative review feedback [1].
      
      However, I think it’s worth reconsidering the approach. Now that we’re on
      Python 3 only, callers have to catch only binascii.Error instead of both.
      Catching binascii.Error instead of TypeError has the advantage that it’s less
      likely to cover a programming error (e.g. passing an int to bin() raises
      TypeError). Also, raising TypeError never made sense semantically when bin()
      got an argument of valid type.
      
      As a side-effect, this fixed an exception in test-http-bad-server.t. The TODO
      was outdated: it was not an uncaught ValueError in batch.results() but uncaught
      TypeError from the now removed wrapper. Now that bin() raises binascii.Error
      instead of TypeError, it gets converted to a proper error in
      wirepeer.heads.<locals>.decode() that catches ValueError (superclass of
      binascii.Error). This is a good example of why this changeset is a good idea.
      Catching TypeError instead of ValueError there would not make much sense.
      
      [1] https://phab.mercurial-scm.org/D2244
      63fd0282ad40
  3. May 29, 2022
  4. Jun 02, 2022
  5. May 04, 2022
    • idlsoft's avatar
      narrow_widen_acl: enforce narrowacl in narrow_widen (SEC) · 6b10151b9621
      idlsoft authored
      Reviewer note: this was sent by the author as a simple bugfix, but can be
      considered a security patch, since it allows users to access things outside
      of the ACL, hence the (SEC) prefix.
      
      However, this affects the `narrow` extention which is still marked as
      experimental and has relatively few users aside from large companies with
      their own security layers on top from what we can gather.
      We feel (Alphare: or at least, I feel) like pinging the packaging list is
      enough in this case.
      6.1.3
      6b10151b9621
  6. May 30, 2022
    • Raphaël Gomès's avatar
      chg: ignore already closed fds when cleaning up · 201222849987
      Raphaël Gomès authored
      This should fix this error we see in the CI from time to time:
      
      ```
      --- /tmp/mercurial-ci/tests/test-chg.t
      +++ /tmp/mercurial-ci/tests/test-chg.t.err
      @@ -187,6 +187,26 @@
         $ chg bulkwrite --pager=on --color no --config ui.formatted=True
         paged! 'going to write massive data\n'
         killed! (?)
      +  Traceback (most recent call last):
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/commandserver.py", line 509, in _serverequest
      +      sv.cleanup()
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/chgserver.py", line 382, in cleanup
      +      self._restoreio()
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/chgserver.py", line 461, in _restoreio
      +      os.close(fd)
      +  OSError: [Errno 9] Bad file descriptor
      +  Traceback (most recent call last):
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/commandserver.py", line 693, in _acceptnewconnection
      +      self._runworker(conn)
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/commandserver.py", line 744, in _runworker
      +      prereposetups=[self._reposetup],
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/commandserver.py", line 509, in _serverequest
      +      sv.cleanup()
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/chgserver.py", line 382, in cleanup
      +      self._restoreio()
      +    File "/tmp/hgtests._uvojvqb/install/lib/python/mercurial/chgserver.py", line 461, in _restoreio
      +      os.close(fd)
      +  OSError: [Errno 9] Bad file descriptor
         [255]
      ```
      201222849987
  7. May 27, 2022
  8. May 29, 2022
  9. May 21, 2022
    • Manuel Jacob's avatar
      worker: implement _blockingreader.readinto() (issue6444) · 520722523955
      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.
      520722523955
    • Manuel Jacob's avatar
      worker: stop relying on garbage collection to release memoryview · 4c57ce494a4e
      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.
      4c57ce494a4e
    • Manuel Jacob's avatar
      worker: add docstring to _blockingreader · 4d42a5fb70bf
      Manuel Jacob authored
      4d42a5fb70bf
    • Manuel Jacob's avatar
      5d28246b9acc
  10. May 17, 2022
    • Pierre-Yves David's avatar
      bundle: quick fix to ludicrous performance penalty · ed9170ff791a
      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.
      ed9170ff791a
  11. May 20, 2022
  12. May 19, 2022
  13. Apr 21, 2022
  14. May 25, 2022
  15. May 18, 2022
  16. May 25, 2022
  17. May 24, 2022
Loading