Skip to content
Snippets Groups Projects
  1. Jan 24, 2024
  2. Jan 14, 2024
    • Anton Shestakov's avatar
      tests: don't use "status" operand of dd in test-censor.t (issue6858) · c7edfccfc11f
      Anton Shestakov authored
      Some implementations don't have this operand, let's just direct stderr into
      /dev/null, that's pretty cross-platform.
      
      Also specify bs=512 (the default for me), because the default might be
      different on different systems. Other uses of dd in the tests do specify it, so
      this is more consistent.
      c7edfccfc11f
  3. Jan 11, 2024
  4. Jan 03, 2024
    • Georges Racinet's avatar
      pycompat: fix bytestr(bytes) in Python 3.11 · f0e7d51bb454
      Georges Racinet authored
      In Python 3.10, the `bytes` type itself does not have a `__bytes__`
      attribute, but it does in 3.11. Yet `bytes(bytes)` does not give
      the wished output, so we have to add an exceptional case.
      
      The added case in the doctest reproduces the problem with Python 3.11.
      
      Impact: error treatment in expressions such as `repo[b'invalid']` gets
      broken.
      f0e7d51bb454
  5. Jan 04, 2024
  6. Dec 27, 2023
  7. Nov 17, 2023
  8. Dec 21, 2023
  9. Dec 07, 2023
  10. Dec 12, 2023
  11. Dec 07, 2023
  12. Dec 02, 2023
    • Anton Shestakov's avatar
      procutil: move stdin assignment outside of try-finally block · a9e00554b3e4
      Anton Shestakov authored
      There is an stdin variable in the global scope of this module. And in the
      `finally` block of this try-finally statement we're checking `if stdin is not
      None`.  Let's make sure we don't confuse code check tools into thinking we want
      to use global stdin by moving this line of code outside of `try`.
      
      This was caught by pytype 2023.11.21 on Python 3.11.2.
      a9e00554b3e4
    • Anton Shestakov's avatar
      zeroconf: give inet_aton() str instead of bytes · b79f13d6ef25
      Anton Shestakov authored
      All other uses of this function in this extension are already fixed (i.e. use
      strings instead of bytes).
      
      This was caught by pytype 2023.11.21 on Python 3.11.2.
      b79f13d6ef25
  13. Dec 06, 2023
    • Pierre-Yves David's avatar
      revlog: avoid wrongly updating the data file location on "divert" · 849745d7da89
      Pierre-Yves David authored
      If we are in the inline case, we need to align the location of the "data" file
      with the temporary location of the file (i.e. "00changelog.i.a"). However we
      should not do that for non-inline case… and before this changeset we had been
      doing it. In addition `index_file` is already a property taking care of updating
      the "segment file" filename when needed. So we can simply remove all that code.
      
      As a result, code trying to read the diverted data before they were committed
      ended deeply confused as the "00changelog.i.a" file is nothing like the
      "00changelog.d" file.
      
      However nothing corrupted data as all writing where properly handled outside of
      the "segment file".
      
      In "best" cases this small in-memory corruption of the filename when unnoticed
      until the transaction was committed or rolled back and in the worse case, some
      data reading was failing during the transaction and resulted in the transaction
      to be rolled back. However wrong data never reached the disk, so this bug should
      be have corrupted any repository.
      
      This is not catch by tests because most test use a small repository and
      therefor an inline revlog. In addition the bug only triggers when a
      changelog read is done in the following "rare" situation:
      - after some delayed write
      - after that data have been written in a "divert" file (i.e. `00.changelog.i.a`)
      - before transaction commit
      - outside of a "writing" context
      
      The issue was introduced in d83d788590a8
      849745d7da89
    • Pierre-Yves David's avatar
      revlog: avoid exposing delayed index entry too widely in non-inline revlog · 66417f55ea33
      Pierre-Yves David authored
      Before this change, the index entry would be seen as "appended" to the data
      file. It did not hurt too much as there are never accessed for reading, but this
      was odd. So lets stop doing so.
      66417f55ea33
    • Pierre-Yves David's avatar
      revlog: add one more assert about state of thing when splitting · 962974a5d068
      Pierre-Yves David authored
      This assert is currently happy, but it does not hurt to adds it to clarify
      expected state and catch potential error in the future.
      962974a5d068
  14. Dec 02, 2023
  15. Dec 03, 2023
  16. Dec 04, 2023
  17. Dec 02, 2023
    • Matt Harbison's avatar
      tests: fill in the Windows pattern for `$EADDRNOTAVAIL$` matching · e2632d9d1b6e
      Matt Harbison authored
      This fixes test-https.t on Windows.
      
      It looks like the real error translation is "Cannot assign requested address.",
      and the message here is the start of a longer description, so I'm not sure why
      this part is emitted.  But it's not worth digging into, as it's evidently the
      same failure.
      e2632d9d1b6e
    • Matt Harbison's avatar
      tests: avoid a cascading failure on Windows · 1dd01023649d
      Matt Harbison authored
      The `identify --debug` command here on Windows emits
      
          skip updating dirstate: identity mismatch
      
      because of the debug switch, which got captured and added to `.hgtags`, and then
      hijinx ensued.  The point of `--debug` seemed to be to get the long hash, so
      just do that with templating.  I have not idea if the message is indicating a
      problem- there seems to be many more of them in other tests that are not present
      on Linux.
      1dd01023649d
    • Matt Harbison's avatar
      phabricator: stringify the argument to `getattr()` · 4ed9efb25bc7
      Matt Harbison authored
      This fixes a "TypeError: getattr(): attribute name must be string" crash and
      subsequent test spew.  This likely broke in 18c8c18993f0 and was missed in CI
      because `pytest-vcr` is missing.
      4ed9efb25bc7
  18. Nov 13, 2023
  19. Nov 21, 2023
  20. Nov 07, 2023
Loading