title: SourceTree HG fails - AttributeError: 'NoneType' object has no attribute 'islocalrepo'
body: <pre><code>'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 &lt;module&gt;
      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) &amp; 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'
  '
  </code></pre>
  
  <p>This was raised in the following places;</p>
  
  <p><a href="https://bitbucket.org/tortoisehg/thg/issue/3592/nonetype-object-has-no-attribute" rel="nofollow">https://bitbucket.org/tortoisehg/thg/issue/3592/nonetype-object-has-no-attribute</a></p>
  
  <p><a href="http://sourceforge.net/p/tortoisehg/mailman/message/31934003/" rel="nofollow">http://sourceforge.net/p/tortoisehg/mailman/message/31934003/</a></p>
  
  <p><a href="https://groups.google.com/forum/#!topic/thg-dev/T7s17_hMTmw" rel="nofollow">https://groups.google.com/forum/#!topic/thg-dev/T7s17_hMTmw</a></p>
  
  <p><a href="http://trac-hacks.org/ticket/10439" rel="nofollow">http://trac-hacks.org/ticket/10439</a></p>
  
  <p><a href="https://jira.atlassian.com/browse/SRCTREE-2891" rel="nofollow">https://jira.atlassian.com/browse/SRCTREE-2891</a></p>
  
  <p><a href="https://answers.atlassian.com/questions/11467884/comments/11963332" rel="nofollow">https://answers.atlassian.com/questions/11467884/comments/11963332</a></p>