Skip to content
Snippets Groups Projects
  1. Feb 22, 2025
  2. Nov 18, 2024
  3. Oct 04, 2024
    • Matt Harbison's avatar
      tests: fix a test hang on Windows when setting a debuglock · a8e1ff9ac257
      Matt Harbison authored
      I have no idea why, but running the `hg -R auto-upgrade debuglock --set-lock`
      command near the end of `test-upgrade-repo.t` hangs the test.  It does
      background the process and `killdaemons.py` runs without error, but control
      doesn't return to `run-tests.py` until the process is manually killed.  I did
      notice that `$!` in MSYS is *not* the PID of the process that got backgrounded,
      even when a simple `sleep 60 &` is run in MSYS without the *.t file.  When
      `killdaemons.py` is run manually with the PID in ProcessExplorer, the
      backgrounded process terminates immediately, and returns control to
      `run-tests.py`.
      
      This looks like it would be a race, but the test waits 10s for the lock file to
      appear before attempting to kill the process, so there's time.  `hg serve` has a
      `--pid-file` option to write the pid to the file, but this is only a debug
      command, so I'm not bothering with cluttering the command line.
      a8e1ff9ac257
  4. Oct 03, 2024
  5. Dec 11, 2023
    • Pierre-Yves David's avatar
      changelog: never inline changelog · dcaa2df1f688
      Pierre-Yves David authored
      The test suite mostly use small repositories, that implies that most changelog in the
      tests are inlined. As a result, non-inlined changelog are quite poorly tested.
      Since non-inline changelog are most common case for serious repositories, this
      lack of testing is a significant problem that results in high profile issue like
      the one recently fixed by 66417f55ea33 and 849745d7da89.
      
      Inlining the changelog does not bring much to the table, the number of total
      file saved is negligible, and the changelog will be read by most operation
      anyway.
      
      So this changeset is make it so we never inline the changelog, and de-inline the
      one that are still inlined whenever we touch them.
      
      By doing that, we remove the "dual code path" situation for writing new entry to
      the changelog and move to a "single code path" situation. Having a single
      code path simplify the code and make sure it is covered by test (if test cover
      that situation obviously)
      
      
      This impact all tests that care about the number of file and the exchange size,
      but there is nothing too complicated in them just a lot of churn.
      
      The churn is made "worse" by the fact rust will use the persistent nodemap on
      any changelog now. Which is overall a win as it means testing the persistent
      nodemap more and having less special cases.
      
      In short, having inline changelog is mostly useless and an endless source of
      pain. We get rid of it.
      dcaa2df1f688
  6. Sep 19, 2023
  7. Jun 26, 2023
  8. Jun 17, 2023
  9. Jun 08, 2023
    • Pierre-Yves David's avatar
      revlog: avoid possible collision between directory and temporary index · 12f13b13f414
      Pierre-Yves David authored
      Since 6.4, we create a temporary index file to write the split data without
      overwriting the inline version too early. However, the store encoding does not
      prevent these new `.i.s` file to collide with a directory with the same name.
      While the odds for such a collision to happens are fairly low, the collision
      would prevent Mercurial from working.
      
      The store encoding have a mitigation solution in place to prevent such
      collisions from happening for `.i` and `.d` files, but not for other extensions.
      We cannot update this encoding scheme to solve the issue since it would diverge
      from older version of Mercurial.
      
      Instead, we create an alternative directory tree dedicated to such files.
      The use of the `.i` extension combined with store encoding will prevent
      collisions there.
      12f13b13f414
  10. Feb 22, 2023
  11. Jan 04, 2023
    • Matt Harbison's avatar
      tests: drop `(py3 !)` output matching predicates · 950c39918bd2
      Matt Harbison authored
      Presumably these were paired with `(no-py3 !)` at one point, but now they were
      unconditionally true.
      
      test-check-code.t required a couple of `(glob)` markers on the changed lines in
      test-lfs-serve-access.t, because of the `$LOCALIP` usage on those lines.  Not
      sure how those lines slipped through the checks previously.
      950c39918bd2
  12. May 02, 2022
  13. Jul 05, 2022
  14. Jun 14, 2022
  15. May 18, 2022
  16. Apr 05, 2022
  17. Mar 22, 2022
  18. Feb 20, 2022
  19. Feb 17, 2022
    • Pierre-Yves David's avatar
      tracked-key: remove the dual write and rename to tracked-hint · 6e559391f96e
      Pierre-Yves David authored
      The dual-write approach was mostly useless. As explained in the previous version
      of the help, the key had to be read twice before we could cache a value.
      
      However this "read twice" limitation actually also apply to any usage of the
      key. If some operation wants to rely of the "same value == same tracked set"
      property it would need to read the value before, and after running that
      operation (or at least, after, in all cases). So it cannot be sure the operation
      it did is "valid" until checking the key after the operation. As a resultat such
      operation can only be read-only or rollbackable.
      
      This reduce the utility of the "same value == same tracked set" a lot.
      
      So it seems simpler to drop the double write and to update the documentation to
      highlight that this file does not garantee race-free operation. As a result the
      "key" is demoted to a "hint".
      
      Documentation is updated accordingly.
      
      Differential Revision: https://phab.mercurial-scm.org/D12201
      6e559391f96e
    • Pierre-Yves David's avatar
      tracked-key: make it possible to upgrade to and downgrade from the feature · 5ba24e886cec
      Pierre-Yves David authored
      This seems rather important if we want people to start using it.
      
      Differential Revision: https://phab.mercurial-scm.org/D12198
      5ba24e886cec
  20. Feb 15, 2022
  21. Feb 02, 2022
  22. Feb 01, 2022
  23. Jan 11, 2022
  24. Jan 07, 2022
  25. Jan 11, 2022
  26. Dec 08, 2021
  27. Dec 06, 2021
Loading