Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SourceTree HG fails - AttributeError: 'NoneType' object has no attribute 'islocalrepo'

Tags:

mercurial

'hg status' failed with code 1:'*** failed to import extension hgext.hgsubversion from /Applications/SourceTree.app/Contents/Resources/mercurial_local/hgext/hgsubversion: 'module' object has no attribute 'canonpath'
** Unknown exception encountered with possibly-broken third-party extension sourcetree_auth
** which supports versions unknown of Mercurial.
** Please disable sourcetree_auth and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.6 (default, Sep  9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
** Mercurial Distributed SCM (version 3.2.3)
** Extensions loaded: strip, mq, rebase, transplant, extdiff, progress, sourcetree_auth, sourcetree_checklink, hgattic, hgflow, gpg, fetch
Traceback (most recent call last):
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/hg_local", line 35, in <module>
    mercurial.dispatch.run()
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/dispatch.py", line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/dispatch.py", line 71, in dispatch
    ret = _runcatch(req)
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/dispatch.py", line 140, in _runcatch
    return _dispatch(req)
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/dispatch.py", line 817, in _dispatch
    repo = hg.repository(ui, path=path)
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/hg.py", line 128, in repository
    peer = _peerorrepo(ui, path, create)
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/hg.py", line 115, in _peerorrepo
    obj = _peerlookup(path).instance(ui, path, create)
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/hg.py", line 89, in _peerlookup
    return thing(path)
  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/hgext/hgsubversion/__init__.py", line 185, in _lookup
    if util.islocalrepo(url):
AttributeError: 'NoneType' object has no attribute 'islocalrepo'
'

This was raised in the following places;

https://bitbucket.org/tortoisehg/thg/issue/3592/nonetype-object-has-no-attribute

http://sourceforge.net/p/tortoisehg/mailman/message/31934003/

https://groups.google.com/forum/#!topic/thg-dev/T7s17_hMTmw

http://trac-hacks.org/ticket/10439

https://jira.atlassian.com/browse/SRCTREE-2891

https://answers.atlassian.com/questions/11467884/comments/11963332

like image 427
sleepycal Avatar asked Jan 08 '15 12:01

sleepycal


1 Answers

Due to a critical security patch, the fix is to do the following;

Preferences -> mercurial -> extensions -> uncheck hgsubversion

This is explained by Atlassian as per this article.

Credits to Pedro Campos for the heads up

like image 77
sleepycal Avatar answered Oct 02 '22 23:10

sleepycal