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

AttributeError: 'tuple' object has no attribute 'rfind' #302

Closed jcea closed 8 years ago

jcea commented 9 years ago

I am using Mercurial 3.4.

I have "hggit" activated globally in my profile.

When I do "hg up -r tip" in a particular mercurial repository (NOT git backed, a pure mercurial repository) I get this traceback:

** Unknown exception encountered with possibly-broken third-party extension zipdoc
** which supports versions unknown of Mercurial.
** Please disable zipdoc and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.9 (default, Mar  1 2015, 03:30:17) [GCC 4.8.1]
** Mercurial Distributed SCM (version 3.4)
** Extensions loaded: strip, mq, convert, graphlog, record, rebase, transplant, largefiles, churn, hggit, shelve, zipdoc
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 43, in <module>
    mercurial.dispatch.run()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 29, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 91, in dispatch
    ret = _runcatch(req)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 160, in _runcatch
    return _dispatch(req)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 885, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 646, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 976, in _runcommand
    return checkargs()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 947, in checkargs
    return cmdfunc()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 882, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 716, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mercurial/extensions.py", line 164, in closure
    return func(*(args + a), **kw)
  File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 716, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/hgext/mq.py", line 3505, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 716, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mercurial/commands.py", line 6404, in update
    ret = hg.update(repo, rev)
  File "/usr/local/lib/python2.7/site-packages/mercurial/hg.py", line 524, in update
    stats = updaterepo(repo, node, False)
  File "/usr/local/lib/python2.7/site-packages/mercurial/hg.py", line 520, in updaterepo
    labels=['working copy', 'destination'])
  File "/usr/local/lib/python2.7/site-packages/mercurial/extensions.py", line 164, in closure
    return func(*(args + a), **kw)
  File "/usr/local/lib/python2.7/site-packages/hgext/largefiles/overrides.py", line 1360, in mergeupdate
    normallookup=partial)
  File "/usr/local/lib/python2.7/site-packages/hgext/largefiles/lfcommands.py", line 450, in updatelfiles
    lfiles = set(lfutil.listlfiles(repo)) | set(lfdirstate)
  File "/usr/local/lib/python2.7/site-packages/hgext/largefiles/lfutil.py", line 165, in listlfiles
    for f in repo[rev].walk(matcher)
  File "/usr/local/lib/python2.7/site-packages/mercurial/context.py", line 1275, in walk
    True, False))
  File "/usr/local/lib/python2.7/site-packages/mercurial/dirstate.py", line 727, in walk
    ignore = self._ignore
  File "/usr/local/lib/python2.7/site-packages/mercurial/scmutil.py", line 1136, in __get__
    entry.obj = self.func(obj)
  File "/usr/local/lib/python2.7/site-packages/hggit/gitdirstate.py", line 100, in _ignore
    fns = self._finddotgitignores()
  File "/usr/local/lib/python2.7/site-packages/hggit/gitdirstate.py", line 164, in _finddotgitignores
    work = [d for d in work if not dirignore(d)]
  File "/usr/local/lib/python2.7/site-packages/mercurial/dirstate.py", line 601, in _dirignore
    for p in util.finddirs(f):
  File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 2284, in finddirs
    pos = path.rfind('/')
AttributeError: 'tuple' object has no attribute 'rfind'

Disabling zipdoc extension doesn't solve the issue.

Disabling hg-git extension DOES solve the issue.

I have other repositories not experimenting this issue.

This directory doesn't have a ".git" neither a ".hgignore" file.