Skip to content

RevlogError when pulling

Hi,

this is hg-git 4d16f8706a30 (latest 1.1.x as of today), dulwich 0.22.1 (current latest version, installed via pip) on a repo that has been sitting there for some time (~months, 1 year max). OS is Fedora 39.

The problem happens both on the system-level mercurial (6.7.4, installed via "dnf install mercurial"), and on the current stable tip (7ff35f1290c0, 6.8.1+).

The stack trace is not very nice. I think the relevant error is RevlogError, caused by the phases.advanceboundary() call in git_handler.py.

$ hg pull 
pulling from git+https://github.com/Koenkk/zigbee2mqtt.git
importing 14 git commits
updating bookmark dev
adding bookmark feat/the-big-cleanup
updating bookmark fix/adapter-discovery
updating bookmark master
adding bookmark release-please--branches--dev--components--zigbee2mqtt
adding bookmark release-please--branches--dev--components--zigbee2mqtt--release-notes
transaction abort!
rollback completed
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 3.12.6 (main, Sep  9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)]
** Mercurial Distributed SCM (version 6.7.4)
** Extensions loaded: absorb, amend, churn, extdiff, hggit unknown (dulwich 0.22.1), histedit, mq, patchbomb, rebase, show, strip, uncommit
Traceback (most recent call last):
  File "/usr/lib64/python3.12/site-packages/mercurial/scmutil.py", line 152, in callcatch
    return func()
           ^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 446, in _runcatchfunc
    return _dispatch(req)
           ^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 1271, in _dispatch
    return runcommand(
           ^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 904, in runcommand
    ret = _runcommand(ui, options, cmd, d)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 1283, in _runcommand
    return cmdfunc()
           ^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 1269, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/util.py", line 1878, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/util.py", line 1878, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/hgext/mq.py", line 4225, in mqcommand
    return orig(ui, repo, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/util.py", line 1878, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/util.py", line 1878, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/hgext/rebase.py", line 2174, in pullrebase
    ret = orig(ui, repo, *args, **opts)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/util.py", line 1878, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/commands.py", line 5577, in pull
    modheads = exchange.pull(
               ^^^^^^^^^^^^^^
  File "/home/ant/mercurial/hg-git/hggit/util.py", line 100, in inner
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/home/ant/mercurial/hg-git/hggit/gitrepo.py", line 195, in exchangepull
    pullop.cgresult = repo.githandler.fetch(remote, heads)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ant/mercurial/hg-git/hggit/git_handler.py", line 381, in fetch
    imported = self.import_git_objects(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ant/mercurial/hg-git/hggit/git_handler.py", line 1091, in import_git_objects
    self.update_remote_branches(remote_names, refs)
  File "/home/ant/mercurial/hg-git/hggit/git_handler.py", line 2034, in update_remote_branches
    phases.advanceboundary(
  File "/usr/lib64/python3.12/site-packages/mercurial/phases.py", line 982, in advanceboundary
    changes = phcache.advanceboundary(
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/phases.py", line 678, in advanceboundary
    new_revs.update(torev(node) for node in nodes)
  File "/usr/lib64/python3.12/site-packages/mercurial/phases.py", line 678, in <genexpr>
    new_revs.update(torev(node) for node in nodes)
                    ^^^^^^^^^^^
mercurial.error.RevlogError: RevlogError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/hg", line 59, in <module>
    dispatch.run()
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 142, in run
    status = dispatch(req)
             ^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 231, in dispatch
    status = _rundispatch(req)
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 275, in _rundispatch
    ret = _runcatch(req) or 0
          ^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 456, in _runcatch
    return _callcatch(ui, _runcatchfunc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/dispatch.py", line 466, in _callcatch
    return scmutil.callcatch(ui, func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/scmutil.py", line 209, in callcatch
    ui.error(inst.format())
             ^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/mercurial/error.py", line 76, in format
    message = _(b"abort: %s\n") % self.message
              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information