Skip to content
Snippets Groups Projects
  1. Jan 14, 2021
  2. Apr 09, 2021
  3. Apr 08, 2021
  4. Apr 06, 2021
  5. Apr 07, 2021
  6. Mar 31, 2021
    • Kyle Lippincott's avatar
      match: convert O(n) to O(log n) in exactmatcher.visitchildrenset · 8bca353b1ebc
      Kyle Lippincott authored
      When using narrow, during rebase this is called (at least) once per directory in
      the set of files in the commit being rebased. Every time it's called, we did the
      set arithmetic (now extracted and cached), which was probably pretty cheap but
      not necessary to repeat each time, looped over every item in the matcher and
      kept things that started with the directory we were querying.
      
      With very large narrowspecs, and a commit that touched a file in a large number
      of directories, this was slow. In a pathological repo, the rebase of a single
      commit (that touched over 17k files, I believe in approximately as many
      directories) with a narrowspec that had >32k entries took 8,246s of profiled
      time, with 5,007s of that spent in visitchildrenset (transitively). With this
      change, the time spent in visitchildrenset is less than 34s (which is where my
      profile cut off). Most of the remaining time was network access due to our
      custom remotefilelog-based setup not properly prefetching.
      
      Differential Revision: https://phab.mercurial-scm.org/D10294
      8bca353b1ebc
  7. Mar 30, 2021
  8. Apr 05, 2021
    • Matt Harbison's avatar
      tests: restore the ability to run `black` on Windows · 41d43d12c2c4
      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
      41d43d12c2c4
  9. Apr 04, 2021
  10. Apr 03, 2021
  11. Mar 25, 2021
  12. Apr 05, 2021
  13. Apr 06, 2021
  14. Apr 07, 2021
  15. Apr 06, 2021
    • Pierre-Yves David's avatar
      test: explicitly use zlib compression in tests/test-share-safe.t · 9dfcadc2cabb
      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
      9dfcadc2cabb
    • Pierre-Yves David's avatar
      test: explicitly use zlib compression in tests/test-upgrade-repo.t · 1a17c35fb9fd
      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
      1a17c35fb9fd
    • Pierre-Yves David's avatar
      test: explicitly use zlib compression in tests/test-repo-compengines.t · 19747c07ed3f
      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
      19747c07ed3f
    • Kyle Lippincott's avatar
      remotefilelog: include file contents in bundles produced during strip · 47a9527731c3
      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
      47a9527731c3
    • Kyle Lippincott's avatar
      tests: add test-remotefilelog-strip.t to demonstrate an issue with linknodes · 2819df466cae
      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
      2819df466cae
  16. Mar 30, 2021
Loading