Skip to content
Snippets Groups Projects
  1. May 02, 2022
  2. Oct 19, 2022
    • Matt Harbison's avatar
      revlog: use the user facing filename as the display_id for filelogs · 92892dff
      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.
      92892dff
  3. Feb 20, 2022
  4. May 03, 2021
  5. Sep 04, 2018
  6. Apr 04, 2018
  7. May 31, 2017
  8. May 14, 2017
    • Jun Wu's avatar
      verify: add a config option to skip certain flag processors · a2ab9ebc
      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.
      a2ab9ebc
  9. Nov 30, 2016
    • Jun Wu's avatar
      tests: replace "cp -r" with "cp -R" · c059286a
      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
      c059286a
  10. Feb 24, 2016
  11. Feb 08, 2016
    • Martin von Zweigbergk's avatar
      verify: use similar language for missing manifest and file revisions · 2a03a365
      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.
      2a03a365
  12. Feb 02, 2016
    • Martin von Zweigbergk's avatar
      verify: include "manifest" prefix in a few more places · d2e0d578
      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.
      d2e0d578
  13. Feb 01, 2016
    • Martin von Zweigbergk's avatar
      tests: add tests for missing revlogs and revlog entries · 2b41f865
      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.
      2b41f865
  14. Jun 21, 2015
  15. Jun 19, 2015
  16. Jun 08, 2015
  17. Aug 21, 2012
    • Patrick Mézard's avatar
      verify: do not choke on valid changelog without manifest · b32a30da
      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]
      b32a30da
  18. Jun 10, 2012
  19. Sep 17, 2010
  20. Sep 16, 2010
  21. Sep 06, 2010
  22. Sep 05, 2010
  23. Aug 12, 2010
  24. Nov 02, 2009
  25. Jun 04, 2009
  26. Apr 26, 2009
  27. Apr 06, 2009
  28. Aug 14, 2008
Loading