Skip to content
Snippets Groups Projects
  1. Feb 22, 2025
  2. May 02, 2022
  3. 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
  4. May 03, 2021
  5. Feb 10, 2021
  6. Nov 23, 2020
  7. Sep 08, 2019
    • Pierre-Yves David's avatar
      changegroup: move message about added changes to transaction summary · d7304434390f
      Pierre-Yves David authored
      Before that, applying multiple changegroups in the same transaction issued the
      message multiple time. This result in a confusing output:
      
          adding changesets
          adding manifests
          adding file changes
          added 32768 changesets with 60829 changes to 2668 files
          adding changesets
          adding manifests
          adding file changes
          added 8192 changesets with 16885 changes to 1553 files
          adding changesets
          adding manifests
          adding file changes
          added 1020 changesets with 1799 changes to 536 files
          adding changesets
          adding manifests
          ...
      
      Instead, we now only issue the message once at the end of the transaction,
      summing up all added changesets, changes and files. The line is identical, but
      happens sightly later in the output.
      
      There are other suboptimal behavior around issue multiple changegroup (eg:
      progress bar). We'll cover them later.
      
      This impact of lot of test as one would expect, but a two pass check show they
      are just the order change we expected.
      
      To deal with "under the hood" bundle application by internal code, we had to
      take a slightly hacky move. We could clean that up with a more official way to
      enter "under the hood" section, however I want to keep this series simple to get
      it landed. This kind of change have a very high bit rot rate since it impact a
      lot of test output.
      d7304434390f
  8. Nov 14, 2018
    • Matt Harbison's avatar
      tests: document a known failing interaction between narrow and lfs · 7c5a922be068
      Matt Harbison authored
      This is one of the two remaining aborts I found looking into issue5794.  I've
      got no idea what's wrong with the hook, since the changes there fixed the other
      two problems noted in that bug report.  It seems like it might go away when the
      narrow issue is fixed, but let's make sure this doesn't get lost.
      
      The stacktrace for the hook seems to indicate that the missing file *is* in ctx:
      
        remote: Traceback (most recent call last):
        remote:   File "c:\Users\Matt\projects\hg\hgext\lfs\__init__.py", line 253, in checkrequireslfs
        remote:     if any(f in ctx and match(f) and ctx[f].islfs() for f in ctx.files()):
        remote:   File "c:\Users\Matt\projects\hg\hgext\lfs\__init__.py", line 253, in <genexpr>
        remote:     if any(f in ctx and match(f) and ctx[f].islfs() for f in ctx.files()):
        remote:   File "c:\Users\Matt\projects\hg\hgext\lfs\wrapper.py", line 191, in filectxislfs
        remote:     return _islfs(self.filelog(), self.filenode())
        remote:   File "c:\Users\Matt\projects\hg\mercurial\context.py", line 631, in filenode
        remote:     return self._filenode
        remote:   File "c:\Users\Matt\projects\hg\mercurial\util.py", line 1528, in __get__
        remote:     result = self.func(obj)
        remote:   File "c:\Users\Matt\projects\hg\mercurial\context.py", line 579, in _filenode
        remote:     return self._filelog.lookup(self._fileid)
        remote:   File "c:\Users\Matt\projects\hg\mercurial\filelog.py", line 68, in lookup
        remote:     self._revlog.indexfile)
        remote:   File "c:\Users\Matt\projects\hg\mercurial\utils\storageutil.py", line 218, in fileidlookup
        remote:     raise error.LookupError(fileid, identifier, _('no match found'))
        remote: LookupError: data/inside2/f.i@f59b4e021835: no match found
      7c5a922be068
  9. Sep 04, 2018
  10. Apr 04, 2018
  11. Feb 28, 2018
    • Martin von Zweigbergk's avatar
      narrow: consider both local and remote matchers in narrowchangegroup · 2d82a24d0c78
      Martin von Zweigbergk authored
      The existing code that picked one or the other seemed very
      suspicious. This patch makes us intersect the local matcher with the
      matcher from the remote, which seems better. It fixes one test case
      and makes another one that used to crash no longer crash, but instead
      silently succeed with a push that's lossy, so that remains to be
      fixed.
      
      The real reason for doing this now is that I'm going to move
      narrowrepo.narrowmatch() onto localrepo and then it will always be
      defined, which would otherwise break this code.
      
      Differential Revision: https://phab.mercurial-scm.org/D2490
      2d82a24d0c78
  12. Jan 29, 2018
    • Augie Fackler's avatar
      narrow: import experimental extension from narrowhg revision cb51d673e9c5 · a2a6e724d61a
      Augie Fackler authored
      Adjustments:
       * renamed src to hgext/narrow
       * marked extension experimental
       * added correct copyright header where it was missing
       * updated hgrc extension enable line in library.sh
       * renamed library.sh to narrow-library.sh
       * dropped all files from repo root as they're not interesting
       * dropped test-pyflakes.t, test-check-code.t and test-check-py3-compat.t
       * renamed remaining tests to all be test-narrow-* when they didn't already
       * fixed test-narrow-expanddirstate.t to refer to narrow and not narrowhg
       * fixed tests that wanted `update -C .` instead of `merge --abort`
       * corrected a two-space indent in narrowspec.py
       * added a missing _() in narrowcommands.py
       * fixed imports to pass the import checker
       * narrow only adds its --include and --exclude to clone if sparse isn't
         enabled to avoid breaking test-duplicateoptions.py. This is a kludge,
         and we'll need to come up with a better solution in the future.
      
      These were more or less the minimum to import something that would
      pass tests and not create a bunch of files we'll never use.
      
      Changes I intend to make as followups:
       * rework the test-narrow-*-tree.t tests to use the new testcases
         functionality in run-tests.py
       * remove lots of monkeypatches of core things
      
      Differential Revision: https://phab.mercurial-scm.org/D1974
      a2a6e724d61a
Loading