Skip to content
Snippets Groups Projects
  1. Feb 07, 2023
    • Pierre-Yves David's avatar
      test: explicitly "add" file before some commit in test-keyword.t · 93d72a7dd486
      Pierre-Yves David authored
      `hg commit -A` will revert the `hg addremove` step if the commit fails. However
      `hg rollback` currently does not.
      
      We are about to improve internal consistency around transaction and dirstate
      and the behavior of `hg rollback` will align on the other behavior in the
      process.
      
      Before doing so, we make sure the test is using a separate call to `hg add` to
      avoid the test scenario to be affected by that future change.
      
      note: the behavior change for `hg rollback` seems fine as it affect a niche
      usecase and `hg rollback` usage have been strongly discouraged for a while.
      93d72a7dd486
  2. Feb 13, 2023
    • Pierre-Yves David's avatar
      test: explicitly "add" file before some commit in test-filecache.py · 09367b3d23d8
      Pierre-Yves David authored
      `hg commit -A` will revert the `hg addremove` step if the commit fails. However
      `hg rollback` currently does not.
      
      We are about to improve internal consistency around transaction and dirstate and the behavior of `hg rollback` will align on the other behavior in the process.
      
      Before doing so, we make sure the test is using a separate call to `hg add` to
      avoid the test scenario to be affected by that future change.
      
      note: the behavior change for `hg rollback` seems fine as it affect a niche
      usecase and `hg rollback` usage have been strongly discouraged for a while.
      09367b3d23d8
    • Pierre-Yves David's avatar
      test: explicitly "add" file before some commit in test-bookmark.t · 1e6015ddf698
      Pierre-Yves David authored
      `hg commit -A` will revert the `hg addremove` step if the commit fails. However
      `hg rollback` currently does not.
      
      We are about to improve internal consistency around transaction and dirstate and the behavior of `hg rollback` will align on the other behavior in the process.
      
      Before doing so, we make sure the test is using a separate call to `hg add` to
      avoid the test scenario to be affected by that future change.
      
      note: the behavior change for `hg rollback` seems fine as it affect a niche
      usecase and `hg rollback` usage have been strongly discouraged for a while.
      1e6015ddf698
    • Pierre-Yves David's avatar
      test: explicitly "add" file before some commit in test-rollback.t · dbcc45221c1f
      Pierre-Yves David authored
      `hg commit -A` will revert the `hg addremove` step if the commit fails. However
      `hg rollback` currently does not.
      
      We are about to improve internal consistency around transaction and dirstate and the behavior of `hg rollback` will align on the other behavior in the process.
      
      Before doing so, we make sure the test is using a separate call to `hg add` to
      avoid the test scenario to be affected by that future change.
      
      note: the behavior change for `hg rollback` seems fine as it affect a niche
      usecase and `hg rollback` usage have been strongly discouraged for a while.
      dbcc45221c1f
  3. Jan 11, 2023
  4. Jan 12, 2023
  5. Jan 11, 2023
  6. Feb 03, 2023
    • Matt Harbison's avatar
      run-tests: stop ignoring venv-installed packages · afa9d73780e1
      Matt Harbison authored
      This will allow test dependencies to be installed within a venv, instead of
      tampering with sys/user sites.  One thing to note here is that the `VIRTUAL_ENV`
      path takes precedence over system-site, unlike when run directly with an
      activated `venv`.  For example, `sys.path` as viewed from a feature test in
      `hghave.py`, when running `hghave vcr` directly with an activated `venv`:
      
          sys.path: [
              '/home/jenkins/hg-committed/tests',
              '/usr/lib/python38.zip',
              '/usr/lib/python3.8',
              '/usr/lib/python3.8/lib-dynload',
              '/home/jenkins/test_venv/lib/python3.8/site-packages'
          ]
      
      vs `sys.path` from the same feature test, when run by `run-tests.py` with this
      change:
      
          sys.path: [
              '/home/jenkins/hg-committed/tests',
              '/home/jenkins/hg-committed',
              '/home/jenkins/hg-committed/tests',
              '/home/jenkins/test_venv/lib/python3.8/site-packages',
              '/usr/lib/python38.zip',
              '/usr/lib/python3.8',
              '/usr/lib/python3.8/lib-dynload',
              '/home/jenkins/.local/lib/python3.8/site-packages',
              '/usr/local/lib/python3.8/dist-packages',
              '/usr/lib/python3/dist-packages'
          ]
      afa9d73780e1
  7. Jan 30, 2023
  8. Jan 31, 2023
  9. Jan 30, 2023
    • Pierre-Yves David's avatar
      setup: treat error output and non-zero return code differently · ac93876ea2df
      Pierre-Yves David authored
      Choking on Mercurial's stderr mean armless warning can derails the whole install
      process. We do like to be able to issue warning to people so we stop considering
      any stderr is a fatal mistake.
      
      This allow us to actually boostrap a version of Mercurial without loosing to
      many sanity point. For example in case where evolve is not loaded, something
      that happens when the recorded version is malformatted. Creating a wonderful
      ouroboros.
      ac93876ea2df
    • Pierre-Yves David's avatar
      setup: make the version computation process more resistant · 8d390a13474d
      Pierre-Yves David authored
      The tag fetching might return and empty string¹, from there everything derails
      quickly. As setup tools becomes more picky about version format we make the
      whole seems a bit more robust.
      
      The resulting version will be obviously weird, but at least it will actually
      install itself.
      
      [1] This is a problem we will address in the next changesets.
      8d390a13474d
    • Matt Harbison's avatar
      bundlerepo: enforce the requirements declared by the underlying repository · 84680c003d44
      Matt Harbison authored
      Previously, `hg log -r 'bundle()' -R bundle.hg` was failing for me when run from
      source, complaining about an unknown parent, when the system installed `hg`
      didn't.  Some debugging showed the index was 0 length.  It turned out that I
      didn't have the C extensions compiled, which a simple `hg log -r .` was able to
      indicate.  The problem being that the RequirementError got handled by RepoError,
      which uses an empty directory as a fallback to process the bundle.
      84680c003d44
  10. Jan 28, 2023
  11. Apr 29, 2021
  12. Dec 13, 2022
  13. Jan 26, 2023
  14. Dec 13, 2022
  15. Jan 25, 2023
    • Pierre-Yves David's avatar
      dirstate: rename parentchange to changing_parents · 7a8bfc05b691
      Pierre-Yves David authored
      Since the new argument breaks the API anyway, we can rename it to a better name.
      
      The previous name `parentchange` might be seen as something active, a function
      that would directly change the parents, however this is just a context manager
      to frame the operation that will change the parents and adjust the
      dirstate content accordingly.
      
      In addition, the future sister method that will be about changes to tracking and
      files would have a hard time fitting in the same naming scheme in a clear way.
      
      The new naming uses a clear prefix will make it more distinct from other
      dirstate methods and easier to extend with other similar contexts.
      7a8bfc05b691
    • Pierre-Yves David's avatar
      dirstate: pass the repo to the `changeparent` method · c166b212bdee
      Pierre-Yves David authored
      If we want the context to be responsible for writing (and we want it), we need
      to have access to a localrepository object.
      
      So we now requires a localrepository object as an argument to this context
      manager.
      c166b212bdee
  16. Dec 13, 2022
    • Pierre-Yves David's avatar
      dirstate: warn about non-explicitly rolledback parent-change · 376395868b7b
      Pierre-Yves David authored
      Now that the invalidation is dealt with by the context manager itself, we
      should no longer need this in the unlocking code. We start with issuing a
      warning if this is the case before actually dropping this code later.
      376395868b7b
    • Pierre-Yves David's avatar
      dirstate: invalidate changes when parent-change fails · 96e526fe5fb0
      Pierre-Yves David authored
      When an error occurs during changing parents, we should invalidate all dirstate
      modifications and reload the dirstate. This is currently done by a `unlock`
      callback on the `wlock`.
      
      To fix this anomaly, we start dealing with the error directly in the context
      manager and its potential nesting.
      
      The "hard" part is to make sure that, when the parent-change context are nested,
      we and higher level nesting do not continue to use the invalidated dirstate.
      We introduce dedicated code to enforce that.
      96e526fe5fb0
  17. Jan 28, 2023
  18. Jan 25, 2023
  19. Jan 09, 2023
  20. Jan 12, 2023
  21. Jan 25, 2023
Loading