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. Apr 17, 2020
  7. Apr 09, 2020
    • Pulkit Goyal's avatar
      mergestate: store about files resolved in favour of other · 1b8fd4af3318
      Pulkit Goyal authored
      Committing a merge sometimes wrongly creates a new filenode where it can re-use
      an existing one. This happens because the commit code does it's own calculation
      and does not know what happened on merge.
      
      This starts storing information in mergestate about files which were
      automatically merged and the other/remote version of file was used.
      We need this information at commit to pick the filenode parent for the new
      commit.
      
      This issue was found by Pierre-Yves David and idea to store the relevant parts
      in mergestate is also suggested by him.
      
      Somethings which can be further investigated are:
      
      1) refactoring of commit logic more to depend on this information
      2) maybe a more generic solution?
      
      Differential Revision: https://phab.mercurial-scm.org/D8392
      1b8fd4af3318
  8. Apr 05, 2019
  9. Sep 19, 2018
  10. Sep 04, 2018
  11. Apr 04, 2018
  12. Feb 11, 2018
  13. Jun 20, 2017
  14. Jun 29, 2015
    • Durham Goode's avatar
      convert: fix bug with converting the same commit twice · 1538e72209fd
      Durham Goode authored
      Convert had a bug where it relied on repo.tip() to be the newly committed
      commit. This was not the case if the commit already existed in the repository
      (since repo.commitctx() did nothing, the tip() referenced some random other
      commit and the revmap got corrupted).
      
      This fixes it by using the node returned by repo.commitctx().
      1538e72209fd
  15. May 27, 2015
  16. Nov 03, 2014
    • Matt Harbison's avatar
      templater: don't overwrite the keyword mapping in runsymbol() (issue4362) · a3c2d9211294
      Matt Harbison authored
      This keyword remapping was introduced in e06e9fd2d99f as part of converting
      generator based iterators into list based iterators, mentioning "undesired
      behavior in template" when a generator is exhausted, but doesn't say what and
      introduces no tests.
      
      The problem with the remapping was that it corrupted the output for keywords
      like 'extras', 'file_copies' and 'file_copies_switch' in templates such as:
      
          $ hg log -r 142b5d5ec9cc --template "{file_copies % ' File: {file_copy}\n'}"
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
      
      What was happening was that in the first call to runtemplate() inside runmap(),
      'lm' mapped the keyword (e.g. file_copies) to the appropriate showxxx() method.
      On each subsequent call to runtemplate() in that loop however, the keyword was
      mapped to a list of the first item's pieces, e.g.:
      
         'file_copy': ['mercurial/changelog.py', ' (', 'mercurial/hg.py', ')']
      
      Therefore, the dict for the second and any subsequent items were not processed
      through the corresponding showxxx() method, and the first item's data was
      reused.
      
      The 'extras' keyword regressed in de7e6c489412, and 'file_copies' regressed in
      0b241d7a8c62 for other reasons.  The common thread of things fixed by this seems
      to be when a list of dicts are passed to the templatekw._hybrid class.
      a3c2d9211294
  17. May 14, 2014
  18. Jun 10, 2012
  19. May 13, 2012
    • David Soria Parra's avatar
      merge: respect bookmarks during merge · 4a02cf4fbb2e
      David Soria Parra authored
      Bookmarks will behave more like named branches when merge tries to pick
      a revision to merge.
      
      Bookmarks now to respect the current bookmarks.  Bookmarks will not
      accidentally merged with unnamed heads or other bookmarks. However merge
      can pick heads with diverging bookmarks and pick those automatically.
      
      We end up with two cases for picking a revision to merge:
       (1) In case of an current bookmark, merge can pick a branch head that has a
           diverged bookmark
       (2) In case of no current bookmark, merge can pick a branch head that does not
           have a bookmark.
      4a02cf4fbb2e
  20. Nov 07, 2011
  21. Apr 20, 2011
  22. Apr 03, 2011
  23. Sep 26, 2010
  24. Jul 25, 2010
  25. Oct 05, 2009
  26. Oct 21, 2008
  27. Dec 29, 2007
    • Maxim Dounin's avatar
      Fix copies reporting in log and convert. · 180a3eee4b75
      Maxim Dounin authored
      If copy logged in file revision, we report copy for changeset only
      if file revisions linkrev points back to the changeset in question
      or both changeset parents contain different file revisions.
      
      This fixes extra copies reported when executable bit was changed for
      previously copied file.
      180a3eee4b75
  28. Nov 27, 2007
  29. Sep 04, 2007
  30. Sep 01, 2007
Loading