schacon / hg-git

mercurial to git bridge, pushed to directly from the hg-git plugin in Hg
GNU General Public License v2.0
620 stars 72 forks source link

dulwich.errors.NotGitRepository: No git repository was found at ... #338

Open almcleanuk opened 4 years ago

almcleanuk commented 4 years ago

I've recently installed hg-git. I'm using it sucesfully with a couple of hg repositories, interoperating with remote git repositories. Other local hg repositories are working fine without interactions with git. However other hg repositories, which I have not used with git, produce errors. Any ideas?

** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 5.0.2)
** Extensions loaded: hggit, rebase

Traceback (most recent call last):
  File "hg", line 50, in <module>
  File "mercurial\dispatch.pyo", line 99, in run
  File "mercurial\dispatch.pyo", line 225, in dispatch
  File "mercurial\dispatch.pyo", line 376, in _runcatch
  File "mercurial\dispatch.pyo", line 384, in _callcatch
  File "mercurial\scmutil.pyo", line 167, in callcatch
  File "mercurial\dispatch.pyo", line 367, in _runcatchfunc
  File "mercurial\dispatch.pyo", line 1021, in _dispatch
  File "mercurial\dispatch.pyo", line 756, in runcommand
  File "mercurial\dispatch.pyo", line 1030, in _runcommand
  File "mercurial\dispatch.pyo", line 1018, in <lambda>
  File "mercurial\util.pyo", line 1680, in check
  File "mercurial\commands.pyo", line 3893, in log
  File "mercurial\logcmdutil.pyo", line 923, in displayrevs
  File "mercurial\logcmdutil.pyo", line 213, in show
  File "mercurial\logcmdutil.pyo", line 246, in _show
  File "mercurial\namespaces.pyo", line 192, in names
  File "mercurial\namespaces.pyo", line 45, in <lambda>
  File "mercurial\localrepo.pyo", line 1568, in nodetags
  File "mercurial\util.pyo", line 1563, in __get__
  File "mercurial\localrepo.pyo", line 1489, in _tagscache
  File "c:/apps/hg-git\hggit\hgrepo.py", line 53, in _findtags
    for tag, rev in self.githandler.remote_refs.iteritems():
  File "c:/apps/hg-git\hggit\git_handler.py", line 156, in remote_refs
    self.load_remote_refs()
  File "c:/apps/hg-git\hggit\git_handler.py", line 249, in load_remote_refs
    refdir = os.path.join(self.git.path, 'refs', 'remotes')
  File "mercurial\util.pyo", line 1563, in __get__
  File "c:/apps/hg-git\hggit\git_handler.py", line 170, in git
    return Repo(gitpath)
  File "dulwich\repo.pyo", line 868, in __init__
dulwich.errors.NotGitRepository: No git repository was found at C:\Users\andrew\Documents\...snip...\.hg\git