AttributeError: 'gitdirstate' object has no attribute 'refresh' during pull
I'm trying to pull git+https://github.com/prometheus/prometheus.git
, and got this with hg 6.4.2 + hg-git 1.0.2 (dulwich 0.21.3):
pulling from git+https://github.com/prometheus/prometheus.git
Traceback (most recent call last):
File "hgext3rd\evolve\__init__.pyc", line 563, in wrapmayobsoletewc
File "mercurial\util.pyc", line 1881, in check
File "mercurial\commands.pyc", line 5504, in pull
File "hggit\util.pyc", line 99, in inner
File "hggit\gitrepo.pyc", line 196, in exchangepull
File "hggit\git_handler.pyc", line 362, in fetch
File "mercurial\repoview.pyc", line 457, in __getattr__
File "mercurial\pycompat.pyc", line 358, in w
File "mercurial\localrepo.pyc", line 125, in __get__
File "mercurial\scmutil.pyc", line 1709, in __get__
File "mercurial\localrepo.pyc", line 1768, in changelog
File "mercurial\localrepo.pyc", line 223, in __get__
File "mercurial\util.pyc", line 1760, in __get__
File "mercurial\localrepo.pyc", line 1783, in dirstate
AttributeError: 'gitdirstate' object has no attribute 'refresh'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "mercurial\dispatch.pyc", line 461, in _callcatch
File "mercurial\scmutil.pyc", line 153, in callcatch
File "mercurial\dispatch.pyc", line 441, in _runcatchfunc
File "mercurial\dispatch.pyc", line 1266, in _dispatch
File "mercurial\dispatch.pyc", line 899, in runcommand
File "mercurial\dispatch.pyc", line 1278, in _runcommand
File "mercurial\dispatch.pyc", line 1264, in <lambda>
File "mercurial\util.pyc", line 1881, in check
File "mercurial\util.pyc", line 1881, in check
File "hgext\rebase.pyc", line 2182, in pullrebase
File "mercurial\util.pyc", line 1881, in check
File "mercurial\util.pyc", line 1881, in check
File "hgext3rd\evolve\__init__.pyc", line 565, in wrapmayobsoletewc
File "mercurial\lock.pyc", line 393, in release
File "mercurial\lock.pyc", line 376, in release
File "mercurial\localrepo.pyc", line 3125, in unlock
File "mercurial\repoview.pyc", line 457, in __getattr__
File "mercurial\pycompat.pyc", line 358, in w
File "mercurial\localrepo.pyc", line 223, in __get__
File "mercurial\util.pyc", line 1760, in __get__
File "mercurial\localrepo.pyc", line 1783, in dirstate
AttributeError: 'gitdirstate' object has no attribute 'refresh'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "mercurial\dispatch.pyc", line 276, in _rundispatch
File "mercurial\dispatch.pyc", line 451, in _runcatch
File "mercurial\dispatch.pyc", line 505, in _callcatch
File "mercurial\dispatch.pyc", line 1376, in handlecommandexception
File "mercurial\ui.pyc", line 2172, in log
File "mercurial\loggingutil.pyc", line 142, in log
File "hgext\blackbox.pyc", line 130, in log
File "hgext\blackbox.pyc", line 147, in _log
File "mercurial\localrepo.pyc", line 1947, in __getitem__
File "mercurial\extensions.pyc", line 532, in closure
File "hgext3rd\topic\__init__.pyc", line 812, in wrapinit
File "mercurial\context.pyc", line 1562, in __init__
File "mercurial\localrepo.pyc", line 223, in __get__
File "mercurial\util.pyc", line 1760, in __get__
File "mercurial\localrepo.pyc", line 1783, in dirstate
AttributeError: 'gitdirstate' object has no attribute 'refresh'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hg", line 58, in <module>
File "mercurial\dispatch.pyc", line 143, in run
File "mercurial\dispatch.pyc", line 232, in dispatch
File "mercurial\dispatch.pyc", line 307, in _rundispatch
File "mercurial\ui.pyc", line 2172, in log
File "mercurial\loggingutil.pyc", line 142, in log
File "hgext\blackbox.pyc", line 130, in log
File "hgext\blackbox.pyc", line 147, in _log
File "mercurial\localrepo.pyc", line 1947, in __getitem__
File "mercurial\extensions.pyc", line 532, in closure
File "hgext3rd\topic\__init__.pyc", line 812, in wrapinit
File "mercurial\context.pyc", line 1562, in __init__
File "mercurial\localrepo.pyc", line 223, in __get__
File "mercurial\util.pyc", line 1760, in __get__
File "mercurial\localrepo.pyc", line 1783, in dirstate
AttributeError: 'gitdirstate' object has no attribute 'refresh'
This was an old clone I had laying around from 2020, so IDR how I created it (with git, hg-git, or hgext.git), but it now has both a .git
and a .hg
directory. The last commit locally is:
changeset: 8155:0e2004f6fbe9
bookmark: master
tag: tip
user: Harold Dost <h.dost@criteo.com>
date: Mon May 04 12:49:45 2020 +0200
summary: Simplify the Getting Started documentation. (#7193)
I suspect it's an hg 6.4 compat issue though if dirstate.refresh
is missing.