Skip to content
Snippets Groups Projects
  1. Feb 22, 2025
  2. Jun 19, 2024
    • Raphaël Gomès's avatar
      revlog: add the glue to use the Rust `InnerRevlog` from Python · 7346f93be7a4
      Raphaël Gomès authored
      The performance of this has been looked at for quite some time, and some
      workflows are actually quite a bit faster than with the Python + C code.
      
      However, we are still (up to 20%) slower in some crucial places like cloning
      certain repos, log, cat, which makes this an incomplete rewrite. This is
      mostly due to the high amount of overhead in Python <-> Rust FFI, especially
      around the VFS code. A future patch series will rewrite the VFS code in
      pure Rust, which should hopefully get us up to par with current perfomance,
      if not better in all important cases.
      
      This is a "save state" of sorts, as this is a ton of code, and I don't want
      to pile up even more things in a single review.
      
      Continuing to try to match the current performance will take an extremely
      long time, if it's not impossible, without the aforementioned VFS work.
      7346f93be7a4
  3. May 06, 2024
  4. Feb 23, 2024
  5. Oct 29, 2023
    • Georges Racinet's avatar
      rust-index: stop instantiating a C Index · 96e05f1a99bd
      Georges Racinet authored
      The only missing piece was the `cache` to be returned from
      `revlog.parse_index_v1_mixed`, and it really seems that it is
      essentially repetition of the input, if `inline` is `True`.
      Not worth a Rust implementation (C implementation is probably there
      for historical reasons).
      96e05f1a99bd
    • Georges Racinet's avatar
      rust-index: disabling flagprocessor tests · 49b00a04028f
      Georges Racinet authored
      The list of flags supported by the Rust index is not dynamic, hence
      flagprocessor has no chance to work.
      49b00a04028f
  6. Dec 21, 2022
  7. May 02, 2022
  8. Oct 19, 2022
    • Matt Harbison's avatar
      revlog: use the user facing filename as the display_id for filelogs · 92892dff03f3
      Matt Harbison authored
      I had trouble isolating some LFS blob corruption detected by `hg verify` because
      the traceback referenced a file, but with the `data/` prefix in the `.hg/store`
      path, so it couldn't be located with the `file()` revset:
      
      ```
          Traceback (most recent call last):
            File "/mnt/d/mercurial/mercurial/revlog.py", line 3209, in verifyintegrity
              _verify_revision(self, skipflags, state, node)
            File "/mnt/d/mercurial/hgext/lfs/wrapper.py", line 246, in _verify_revision
              orig(rl, skipflags, state, node)
            File "/mnt/d/mercurial/mercurial/revlog.py", line 158, in _verify_revision
              rl.revision(node)
            File "/mnt/d/mercurial/mercurial/revlog.py", line 1816, in revision
              return self._revisiondata(nodeorrev, _df)
            File "/mnt/d/mercurial/mercurial/revlog.py", line 1870, in _revisiondata
              self.checkhash(text, node, rev=rev)
            File "/mnt/d/mercurial/mercurial/revlog.py", line 1996, in checkhash
              % (self.display_id, pycompat.bytestr(revornode))
          mercurial.error.RevlogError: integrity check failed on data/EXE/PPC/shrinksrec.exe:0
      ```
      
      (I'm a little surprised it resulted in a stacktrace instead of just a message,
      but that's a different issue.  I'm also not sure how to trigger the simplestore
      case, since IIUC, it's also a revlog based store.)
      
      It's not clear how to handle the changelog and manifest (because the user
      doesn't interact with them as a file), so those cases are left alone.  The other
      thing that would be nice to improve somehow is to indicate that the ":0" is a
      revlog revision, not the changeset revision that users are used to.  I'm not
      sure how to handle the "or node" part though.
      92892dff03f3
  9. Feb 20, 2022
  10. May 03, 2021
  11. Sep 04, 2018
  12. Apr 04, 2018
  13. May 31, 2017
  14. May 14, 2017
    • Jun Wu's avatar
      verify: add a config option to skip certain flag processors · a2ab9ebcd85b
      Jun Wu authored
      Previously, "hg verify" verifies everything, which could be undesirable when
      there are expensive flag processor contents.
      
      This patch adds a "verify.skipflags" developer config. A flag processor will
      be skipped if (flag & verify.skipflags) == 0.
      
      In the LFS usecase, that means "hg verify --config verify.skipflags=8192"
      will not download all LFS blobs, which could be too large to be stored
      locally.
      
      Note: "renamed" is also skipped since its default implementation may call
      filelog.data() which will trigger the flag processor.
      a2ab9ebcd85b
  15. Nov 30, 2016
    • Jun Wu's avatar
      tests: replace "cp -r" with "cp -R" · c059286a0f9c
      Jun Wu authored
      The POSIX documentation about "cp" [1] says:
      
        ....
      
        RATIONALE
          ....
          Earlier versions of this standard included support for the -r option to
          copy file hierarchies. The -r option is historical practice on BSD and
          BSD-derived systems. This option is no longer specified by POSIX.1-2008
          but may be present in some implementations. The -R option was added as a
          close synonym to the -r option, selected for consistency with all other
          options in this volume of POSIX.1-2008 that do recursive directory
          descent.
      
          The difference between -R and the removed -r option is in the treatment
          by cp of file types other than regular and directory. It was
          implementation-defined how the - option treated special files to allow
          both historical implementations and those that chose to support -r with
          the same abilities as -R defined by this volume of POSIX.1-2008. The
          original -r flag, for historic reasons, did not handle special files any
          differently from regular files, but always read the file and copied its
          contents. This had obvious problems in the presence of special file
          types; for example, character devices, FIFOs, and sockets.
          ....
      
        ....
      
        Issue 6
          The -r option is marked obsolescent.
          ....
      
        Issue 7
          ....
          The obsolescent -r option is removed.
          ....
      
        (No "Issue 8" yet)
      
      Therefore it's clear that "cp -R" is strictly better than "cp -r".
      
      The issue was discovered when running tests on OS X after 0d87b1caed92.
      
      [1]: pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
      c059286a0f9c
  16. Feb 24, 2016
  17. Feb 08, 2016
    • Martin von Zweigbergk's avatar
      verify: use similar language for missing manifest and file revisions · 2a03a365f645
      Martin von Zweigbergk authored
      When a changeset refers to a manifest revision that's not found in the
      manifest log, we say "changeset refers to missing revision X", but
      when a manifest refers to file revision that's not found in the
      filelog, we say "X in manifests not found". The language used for
      missing manifest revisions seems clearer, so let's use that for
      missing filelog revisions too.
      2a03a365f645
  18. Feb 02, 2016
    • Martin von Zweigbergk's avatar
      verify: include "manifest" prefix in a few more places · d2e0d57824c2
      Martin von Zweigbergk authored
      We include the "manifest" prefix on most other errors, so it seems
      consistent to add them to the remaining messages too. Also, having the
      "manifest" prefix will be more consistent with having the directory
      prefix there when we add support for treemanifests. With the
      "manifest" at the beginning, let's remove the now-redundant
      "manifest" in the message itself.
      d2e0d57824c2
  19. Feb 01, 2016
    • Martin von Zweigbergk's avatar
      tests: add tests for missing revlogs and revlog entries · 2b41f8655bbc
      Martin von Zweigbergk authored
      The verify code is pretty poorly tested. It's easy to test missing
      revlogs and missing revlog entries, so let's add tests for that.
      
      Also add some more tests corrupting each type of revlog, so we test
      the messages presented when reading a revision fails. The pure and
      native implementations produce different error messages, so we have to
      use (glob) in the tests.
      2b41f8655bbc
  20. Jun 21, 2015
  21. Jun 19, 2015
  22. Jun 08, 2015
  23. Aug 21, 2012
    • Patrick Mézard's avatar
      verify: do not choke on valid changelog without manifest · b32a30da608d
      Patrick Mézard authored
      Before this change:
      
        $ hg init
        $ hg branch foo
        $ hg ci -m branchfoo
        $ hg verify
        checking changesets
        checking manifests
         0: empty or missing manifest
        crosschecking files in changesets and manifests
        checking files
        0 files, 1 changesets, 0 total revisions
        1 integrity errors encountered!
        (first damaged changeset appears to be 0)
        [1]
      b32a30da608d
  24. Jun 10, 2012
  25. Sep 17, 2010
  26. Sep 16, 2010
  27. Sep 06, 2010
  28. Sep 05, 2010
  29. Aug 12, 2010
  30. Nov 02, 2009
  31. Jun 04, 2009
  32. Apr 26, 2009
  33. Apr 06, 2009
  34. Aug 14, 2008
Loading