Skip to content
Snippets Groups Projects
  1. Oct 25, 2024
  2. Oct 24, 2024
    • Raphaël Gomès's avatar
      py-3-13: stabilize the docstring output across all supported Python versions · 31076a2301f1
      Raphaël Gomès authored
      Python 3.13 now trims indents from docstrings at compilation time
      (to save space in .pyc), so all of our helptext is affected.
      The indentation has never served a user-facing purpose and was more here
      because nobody cared enough to remove it: we gain some screen space this way.
      Rather than undo the transformation (which isn't really possible since the
      transform also deletes leading/trailing whitespace), we align the behavior
      of older Python versions with that of 3.13.
      
      Unfortunately, this means breaking some of the translations. I've only
      touched the ones that need to work for some tooling tests to pass, but
      I do not have the time to fix the rest of them across all languages, since
      they cannot be done in an automated way. i18n updates have been basically
      abandonned for a good while now, hopefully someone cares enough to bring them
      back.
      31076a2301f1
  3. Oct 16, 2024
    • Matt Harbison's avatar
      tests: stabilize `test-clonebundles-autogen.t` on Windows · ff1872e8c0bf
      Matt Harbison authored
      The problem was that the commands are spun up with `shell=True`, which uses
      `cmd.exe`, which doesn't understand `$foo` style variables.  The HGCB variable
      expansion has to be delayed, because it's figured out right before launching
      the command.  We could probably add a conditional for Windows, and rewrite the
      config to use `%foo%` style variables, but it's more maintainable to just wrap
      the command in a bash shell invocation.
      
      The forward style slashes in the path are needed to avoid accruing double
      backslashes (when switching between shells- the url template seems fine).  Also
      need to strong quote the command so that the double quotes don't get stripped
      off of `$HGCB_BUNDLE_PATH`, which results in:
      
          sh: 1: Syntax error: Unterminated quoted string
          abort: command returned status 2: sh -c "cp $HGCB_BUNDLE_PATH $TESTTMP/final-upload/"
      ff1872e8c0bf
    • Matt Harbison's avatar
      clonebundles: stop shell quoting `HGCB_BUNDLE_BASENAME` environment variable · 93484d43be22
      Matt Harbison authored
      This causes problems in `test-clonebundles-autogen.t` on Windows, because the
      quoted path ends up being passed to the `cp` command, which fails, because quote
      characters are not a legal part of a file name.  I don't see any quoting in
      environment variables on either MSYS or WSL, even with weird ones that appear to
      have escape sequences like `PS1=\[\033]0;$MSYSTEM:\w\007` (in MSYS).  The
      quoting was added back in 5ae30ff79c76, and as shown here, was causing problems
      even on posix when a quote was slipped into the path.
      
      (The other obvious problem is that the command is spun up shell style, which
      invokes `cmd.exe`, which doesn't know about `$foo` style variables.  That will
      be addressed next, but that change didn't work without this too.)
      93484d43be22
  4. Oct 21, 2024
    • Matt Harbison's avatar
      tests: add coverage to for `HGCB_BUNDLE_BASENAME` with special characters · 3e7b9357bbb8
      Matt Harbison authored
      Per request on IRC, to show the behavior of dropping the quoting of
      `HGCB_BUNDLE_BASENAME` in the next commit.  This current failure is basically
      the same error and output that currently happens on Windows with any path (even
      without the embedded quote).  The only difference is Windows doesn't print the
      `cp: cannot stat ...` line.
      3e7b9357bbb8
  5. Oct 15, 2024
    • Matt Harbison's avatar
      tests: stabilize `test-eol-update.t` on Windows · 87faafd6ea83
      Matt Harbison authored
      Perhaps it's better if this doesn't happen, but there are a bunch of tests that
      spew this, and we already have a conditional match for this in the block prior
      to the comment right above this section.  So accept it as a possibility, and
      reduce the noise in the Windows tests.
      87faafd6ea83
    • Matt Harbison's avatar
      tests: force `dummysmtpd.py` to write its log file with '\n' on Windows · dbd2d56224d1
      Matt Harbison authored
      The log files were being `cat'd` in `test-patchbomb-tls.t`, and causing
      gratuitous failures.  Since `sys.stdout` is being written to with `str` instead
      of `bytes`, use a `io.TextIOWrapper` to change the EOL, like 2924676d4728.
      dbd2d56224d1
    • Matt Harbison's avatar
      tests: raise the default value for the various `devel.sync.*-timeout` configs · e2311951b63a
      Matt Harbison authored
      These are used in `mercurial.testing.wait_file()` to stall for a file to appear
      in the filesystem, and raise an error if the file doesn't show up before the
      timeout expires.
      
      The default of 2s was way too low on Windows, especially when running tests in
      parallel, and resulted in various timeouts in `test-dirstate-read-race.t`,
      `test-dirstate-status-write-race.t`, and `test-clone-stream-revlog-split.t`.
      The various `wait-on-file` invocations in the tests are inconsistent, and wait
      anywhere from 5s - 20s.  I'm using 20s here because if everything is working,
      the timeout won't matter.  Also with the default timeout being raised on Windows
      in f4c038081561, both `HGTEST_TIMEOUT_DEFAULT` and `HGTEST_TIMEOUT` are 1440 in
      the default case where the timeout is not specified on the command line of the
      test runner, so the timing factor that is multipled with the value is 1,
      resulting in no changes. (But if someone specified a lower value on the command
      line, that would *lower* the timeout period used.)
      e2311951b63a
  6. Oct 22, 2024
  7. Oct 24, 2024
    • Raphaël Gomès's avatar
      zope-interface: add compatibility with 3.13 compiler attributes · 7862a5ac35cf
      Raphaël Gomès authored
      We could follow-up with an actual vendoring update from the newest version
      of zope-interface in the new cycle since we're dropping 3.7 and down.
      
      However we are also in the process of replacing zope-interface with Protocol, so
      hopefully we can simply drop the zope-interface vendoring.
      7862a5ac35cf
    • Raphaël Gomès's avatar
      0b17a0578a48
    • Raphaël Gomès's avatar
      py-3-13: stabilize the docstring output across all supported Python versions · 51057ab0dffa
      Raphaël Gomès authored
      Python 3.13 now trims indents from docstrings at compilation time
      (to save space in .pyc), so all of our helptext is affected.
      The indentation has never served a user-facing purpose and was more here
      because nobody cared enough to remove it: we gain some screen space this way.
      Rather than undo the transformation (which isn't really possible since the
      transform also deletes leading/trailing whitespace), we align the behavior
      of older Python versions with that of 3.13.
      
      Unfortunately, this means breaking some of the translations. I've only
      touched the ones that need to work for some tooling tests to pass, but
      I do not have the time to fix the rest of them across all languages, since
      they cannot be done in an automated way. i18n updates have been basically
      abandonned for a good while now, hopefully someone cares enough to bring them
      back.
      51057ab0dffa
    • Raphaël Gomès's avatar
      test-lfs-serve-access: vastly simplify the error output check · 888e00b2c3ee
      Raphaël Gomès authored
      The traceback differences between all supported Python versions is about to
      become insane to handle, so let's check what we're actually looking to check.
      888e00b2c3ee
  8. Mar 31, 2024
    • Felipe Resende's avatar
      subrepo: propagate non-default path on outgoing · fb15ba66c702
      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.
      fb15ba66c702
  9. Oct 24, 2024
  10. Jun 11, 2024
  11. Oct 24, 2024
    • Arseniy Alekseyev's avatar
      merge: add a config to allow conflict-free merge of changes on adjacent lines · a021da4ec509
      Arseniy Alekseyev authored
      This change adds a config to make it no longer a conflict to merge changes
      made on adjacent lines.
      
      The reason these changes are considered a conflict is that there's no
      region of text at the relevant position (sync region) that's kept unchanged
      by both sides of the merge.
      
      The problem can be solved by making the sync regions being a bit more
      powerful: we can keep a 0-length sync region if we find that
      a block unchanged by one side is ajacent to a block unchanged by the
      other side.
      
      Since these 0-length sync regions are emitted using the ~same algorithm
      as the normal non-empty sync regions, this change involves no arbitrary
      decisions and I expect it to work pretty well.
      
      0-length sync regions do create an ambiguity in a special case where two
      pairs of adjacent regions "meet" at the same point. This corresponds to
      an insertion made at the same place by the two sides of the merge, and
      this still results in a conflict.
      a021da4ec509
  12. Oct 23, 2024
  13. Oct 22, 2024
  14. Oct 16, 2024
Loading