Skip to content
Snippets Groups Projects
  1. Apr 14, 2021
  2. Apr 11, 2021
  3. Apr 12, 2021
  4. Apr 10, 2021
  5. Apr 09, 2021
  6. Mar 26, 2021
  7. Mar 19, 2021
  8. Apr 06, 2021
  9. Mar 31, 2021
  10. Apr 09, 2021
  11. Jan 14, 2021
  12. Apr 09, 2021
  13. Apr 06, 2021
  14. Apr 05, 2021
    • Matt Harbison's avatar
      tests: restore the ability to run `black` on Windows · 41d43d12
      Matt Harbison authored
      The hghave test for black silently stopped working with the change in
      08fd76a553c9.  This was the output of what it was hitting when run in the test
      environment:
      
          Traceback (most recent call last):\r (esc)
             File "c:\\users\\matt\\appdata\\local\\programs\\python\\python39\\lib\\runpy.py", line 197, in _run_module_as_main\r (esc)
               return _run_code(code, main_globals, None,\r (esc)
             File "c:\\users\\matt\\appdata\\local\\programs\\python\\python39\\lib\\runpy.py", line 87, in _run_code\r (esc)
               exec(code, run_globals)\r (esc)
             File "c:\\Users\\Matt\\AppData\\Roaming\\Python\\Python39\\Scripts\\black.exe\\__main__.py", line 4, in <module>\r (esc)
             File "C:\\Users\\Matt\\AppData\\Roaming\\Python\\Python39\\site-packages\\black\\__init__.py", line 70, in <module>\r (esc)
               CACHE_DIR = Path(user_cache_dir("black", version=__version__))\r (esc)
             File "C:\\Users\\Matt\\AppData\\Roaming\\Python\\Python39\\site-packages\\appdirs.py", line 293, in user_cache_dir\r (esc)
               path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA"))\r (esc)
             File "C:\\Users\\Matt\\AppData\\Roaming\\Python\\Python39\\site-packages\\appdirs.py", line 481, in _get_win_folder_with_pywin32\r (esc)
               dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0)\r (esc)
           pywintypes.com_error: (-2147024893, '$ENOTDIR$.', None, None)\r (esc)
           [1]
      
      Differential Revision: https://phab.mercurial-scm.org/D10310
      41d43d12
  15. Apr 04, 2021
  16. Apr 03, 2021
  17. Mar 25, 2021
  18. Apr 06, 2021
    • Pierre-Yves David's avatar
      test: explicitly use zlib compression in tests/test-share-safe.t · 9dfcadc2
      Pierre-Yves David authored
      We need the implicit value to be explicit until we can change the default in
      some case.
      
      Differential Revision: https://phab.mercurial-scm.org/D10323
      9dfcadc2
    • Pierre-Yves David's avatar
      test: explicitly use zlib compression in tests/test-upgrade-repo.t · 1a17c35f
      Pierre-Yves David authored
      We need the implicit value to be explicit until we can change the default in
      some case.
      
      Differential Revision: https://phab.mercurial-scm.org/D10322
      1a17c35f
    • Pierre-Yves David's avatar
      test: explicitly use zlib compression in tests/test-repo-compengines.t · 19747c07
      Pierre-Yves David authored
      We need the implicit value to be explicit until we can change the default in
      some case.
      
      Differential Revision: https://phab.mercurial-scm.org/D10321
      19747c07
    • Kyle Lippincott's avatar
      remotefilelog: include file contents in bundles produced during strip · 47a95277
      Kyle Lippincott authored
      `hg strip` and other things that use repair.strip (such as the narrow
      extension's `hg tracked --removeinclude`) will "save" some commits that have a
      higher revision number than the oldest commit we're stripping, but aren't
      actually descended from any of the commits that we're stripping. It saves them
      in a bundle, and then reapplies them to the repo.
      
      Remotefilelog doesn't generally participate in strip, it doesn't contribute
      files to either the backup bundle or the "saved" bundle, and doesn't adjust
      linknodes when commits are stripped. This can break things like push, which
      rely on the linknodes.
      
      This change makes it so that remotefilelog includes files in these bundles
      during strip operations. During reapplication, the files are reapplied from the
      bundle, and the linknode is properly updated.
      
      Differential Revision: https://phab.mercurial-scm.org/D10320
      47a95277
    • Kyle Lippincott's avatar
      tests: add test-remotefilelog-strip.t to demonstrate an issue with linknodes · 2819df46
      Kyle Lippincott authored
      ### Background
      
      Every time a commit is modified, remotefilelog updates the metadata for the file
      object to point to the new commit (I believe that this is different from
      non-remotefilelog hg, which leaves the linkrevs pointing to the obsolete
      commits; doing otherwise would involve changing data in the middle of revlogs).
      
      With `hg strip` (or other things that use repair.strip()), when you strip a
      commit that's not the tip of the revlog, there may be commits after it in revnum
      order that aren't descended from it and don't need to be (and shouldn't be)
      stripped. These are "saved" by strip in a bundle, and that bundle is reapplied
      after truncating the relevant revlogs.
      
      ### The problem
      
      Remotefilelog generally avoids being involved at all in strip. Currently, that
      includes even providing file contents to this backup bundle. This can cause the
      linknode to point to a changeset that is no longer in the repository.
      
      Example:
      
      ```
      @  3 df91f74b871e
      |
      | x  2 70494d7ec5ef
      |/
      | x  1 1e423846dde0
      |/
      o  0 b292c1e3311f
      ```
      
      Commits 1, 2, and 3 are related via obsolescence, and are description-only
      changes. The linknode for the file in these commits changed each time we updated
      the description, so it's currently df91f7. If I strip commits 1 and 3, however,
      the linknode *remains* df91f7, which no longer exists in the repository. Commit
      70494d was "saved", stripped, and then reapplied, so it is in the repository (as
      revision 1 instead of 2 now), and was unobsoleted since the obsmarker was
      stripped as well. The linknode for the file should point to 70494d, the most
      recent commit that is in the repository that modified the file.
      
      Remotefilelog has some logic to handle broken linknodes, but it can be slow. We
      have actually disabled it internally because it's too slow for our purposes.
      
      Differential Revision: https://phab.mercurial-scm.org/D10319
      2819df46
  19. Mar 28, 2021
  20. Feb 12, 2021
  21. Mar 23, 2021
    • Martin von Zweigbergk's avatar
      reabase: call rewriteutil.precheck() a bit later · 80cac993
      Martin von Zweigbergk authored
      We now filter out descendants of divergence-causing commits in
      `_handleskippingobsolete()`. The filtered-out commits are removed from
      the rebase set (`destmap` and `state`). We should therefore call
      `rewriteutil.precheck()` after `_handleskippingobsolete()`. This patch
      does that. It hasn't mattered so far because `rewriteutil.precheck()`
      doesn't yet check for divergence, but it will soon.
      
      This affects one test where we now fail because the user is trying to
      rebase an ancestor instead of failing because they tried to rebase a
      public commit. We have several similar tests just after, where we
      still fail because of the phase, so that seems fine. The difference in
      behavior also seems fine to me.
      
      Differential Revision: https://phab.mercurial-scm.org/D10258
      80cac993
  22. Mar 20, 2021
    • Martin von Zweigbergk's avatar
      rebase: filter out descendants of divergence-causing commits earlier · 535de0e3
      Martin von Zweigbergk authored
      `hg rebase` treats obsolete commits differently depending what has
      happened to the commit:
      
       1) Obsolete commit without non-obsolete successors: Skipped, and a
       note is printed ("it has no successor").
      
       2) Obsolete commit with a successor in the destination (ancestor of
       it): Skipped, and a note is printed ("already in destination").
      
       3) Obsolete commit with a successor in the rebase set: The commit and
       its descendants are skipped, and a note is printed ("not rebasing
       <commit> and its descendants as this would cause divergence"), unless
       `allowdivergence` config set.
      
       4) Obsolete commit with a successor elsewhere: Error ("this rebase
       will cause divergences"), unless `allowdivergence` config set.
      
      Before this patch, we did all those checks up front, except for (3),
      which was checked later. The later check consisted of two parts: 1)
      filtering out of descendants, and 2) conditionally printing message if
      the `allowdivergence` config was not set. This patch makes it so we do
      the filtering early.
      
      A consequence of filtering out divergence-causing commits earlier is
      that we rebase commits in slightly different order, which has some
      impact on tests.
      
      Differential Revision: https://phab.mercurial-scm.org/D10249
      535de0e3
Loading