Issue #36 resolved

AttributeError: 'hgrepo' object has no attribute '_tagtypes'

kiilerix
created an issue

hg-git 163ac98569d3

{{{ $ hg pull -r master pulling from git+ssh://git@github.com:FreeRDP/FreeRDP.git ["git-upload-pack 'FreeRDP/FreeRDP.git'"] unknown exception encountered, please report by visiting http://mercurial.selenic.com/wiki/BugTracker Python 2.7.2 (default, Jan 4 2012, 20:42:34) [GCC 4.7.0 20120103 (Red Hat 4.7.0-0)] Mercurial Distributed SCM (version 2.1.1+38-795d591b6ef5) Extensions loaded: purge, mq, extdiff, graphlog, patchbomb, convert, hg-git, rebase, fetch Traceback (most recent call last): File "/home/mk/hg-bin/hg", line 38, in <module> mercurial.dispatch.run() File "/home/mk/hg-bin/mercurial/dispatch.py", line 27, in run sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255) File "/home/mk/hg-bin/mercurial/dispatch.py", line 64, in dispatch return _runcatch(req) File "/home/mk/hg-bin/mercurial/dispatch.py", line 87, in _runcatch return _dispatch(req) File "/home/mk/hg-bin/mercurial/dispatch.py", line 685, in _dispatch cmdpats, cmdoptions) File "/home/mk/hg-bin/mercurial/dispatch.py", line 467, in runcommand ret = _runcommand(ui, options, cmd, d) File "/home/mk/hg-bin/mercurial/dispatch.py", line 739, in _runcommand return checkargs() File "/home/mk/hg-bin/mercurial/dispatch.py", line 693, in checkargs return cmdfunc() File "/home/mk/hg-bin/mercurial/dispatch.py", line 682, in <lambda> d = lambda: util.checksignature(func)(ui, *args, cmdoptions) File "/home/mk/hg-bin/mercurial/util.py", line 456, in check return func(args, kwargs) File "/home/mk/hg-bin/mercurial/extensions.py", line 139, in wrap util.checksignature(origfn), *args, kwargs) File "/home/mk/hg-bin/mercurial/util.py", line 456, in check return func(args, kwargs) File "/home/mk/hg-bin/hgext/rebase.py", line 659, in pullrebase orig(ui, repo, *args, opts) File "/home/mk/hg-bin/mercurial/util.py", line 456, in check return func(args, kwargs) File "/home/mk/hg-bin/mercurial/extensions.py", line 139, in wrap util.checksignature(origfn), *args, kwargs) File "/home/mk/hg-bin/mercurial/util.py", line 456, in check return func(args, kwargs) File "/home/mk/hg-bin/hgext/mq.py", line 3339, in mqcommand return orig(ui, repo, *args, kwargs) File "/home/mk/hg-bin/mercurial/util.py", line 456, in check return func(args, *kwargs) File "/home/mk/hg-bin/mercurial/commands.py", line 4341, in pull modheads = repo.pull(other, heads=revs, force=opts.get('force')) File "/home/mk/hg-git/hggit/hgrepo.py", line 14, in pull return git.fetch(remote.path, heads) File "/home/mk/hg-git/hggit/git_handler.py", line 176, in fetch self.import_git_objects(remote_name, refs) File "/home/mk/hg-git/hggit/git_handler.py", line 600, in import_git_objects if name in self.repo._tagtypes: AttributeError: 'hgrepo' object has no attribute '_tagtypes' }}}

Comments (6)

  1. David Wolever

    I've encountered the same issue when running `hg pull`. My setup:

    • Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
    • Mercurial Distributed SCM (version 2.1.1+38-795d591b6ef5)
    • hg-git==0.3.2
    • dulwich==0.8.3
  2. David Wolever

    Also, deleting these lines from `hggit/git_handler.py`:

                    if name in self.repo._tagtypes:
                        del self.repo._tagtypes[name]
    

    Does appear to fix this exact crash, although I can't say what it would break.

  3. Log in to comment