Cloning any Mercurial Repo fails with Python syntax errors

Hi,

I just started using SourceTree. Using embedded Mercurial 2.2.2 in SourceTree 1.5.1 I am trying to clone a repo directly from bitbucket.org via this URL:

https://bitbucket.org/sinbad/ssselectabletoolbar

So I go to New and paste in this URL and hit "Clone" and this is the error that I get:

/Users/andre/Library/Application Support/SourceTree/userhg_local/hgext/hgflow.py:1947: Warning: 'with' will become a reserved keyword in Python 2.6

*** failed to import extension hgext.hgflow: invalid syntax (hgflow.py, line 1947)

** Unknown exception encountered with possibly-broken third-party extension hgattic

** which supports versions unknown of Mercurial.

** Please disable hgattic and try your action again.

** If that fixes the bug please report it to the extension author.

** Python 2.5.4 (r254:67916, Aug 1 2011, 15:52:49) [GCC 4.2.1 (Apple Inc. build 5646)]

** Mercurial Distributed SCM (version 2.3)

** Extensions loaded: color, highlight, transplant, fetch, extdiff, rebase, mq, hgattic, hgsubversion

Traceback (most recent call last):

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/hg_local", line 35, in <module>

mercurial.dispatch.run()

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 28, in run

sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 65, in dispatch

return _runcatch(req)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 88, in _runcatch

return _dispatch(req)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 740, in _dispatch

cmdpats, cmdoptions)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 514, in runcommand

ret = _runcommand(ui, options, cmd, d)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 830, in _runcommand

return checkargs()

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 801, in checkargs

return cmdfunc()

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/dispatch.py", line 737, in <lambda>

d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/util.py", line 472, in check

return func(*args, **kwargs)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/extensions.py", line 144, in wrap

util.checksignature(origfn), *args, **kwargs)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/util.py", line 472, in check

return func(*args, **kwargs)

File "/Developer/Applications/Utilities/Third-Party/SourceTree.app/Contents/Resources/mercurial_local/hgext/hgsubversion/wrappers.py", line 496, in clone

orig(ui, source, dest, **opts)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/util.py", line 472, in check

return func(*args, **kwargs)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/commands.py", line 1206, in clone

branch=opts.get('branch'))

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/extensions.py", line 189, in wrap

return wrapper(origfn, *args, **kwargs)

File "/Developer/Applications/Utilities/Third-Party/SourceTree.app/Contents/Resources/mercurial_local/hgext/hgsubversion/wrappers.py", line 475, in hgclonewrapper

srcrepo = hg.repository(ui, source)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/hg.py", line 104, in repository

peer = _peerorrepo(ui, path, create)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/hg.py", line 94, in _peerorrepo

obj = _peerlookup(path).instance(ui, path, create)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/demandimport.py", line 86, in __getattribute__

self._load()

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/mercurial/demandimport.py", line 58, in _load

mod = _origimport(head, globals, locals)

File "/Users/andre/Library/Application Support/SourceTree/userhg_local/hgext/hgsubversion/svnrepo.py", line 139

return svnwrap.SubversionRepo(*self.svnauth, password_stores=self.password_stores)

^

SyntaxError: invalid syntax

Completed with errors, see above

1 answer

1 accepted

1 vote
Accepted answer

SOLVED:

See this link for the solution:

https://confluence.atlassian.com/display/SOURCETREEKB/Using+SourceTree+1.5.3+with+it+embedded+Mercurial+on+OS+X+10.6

In my case I was running OS/X 10.6 (Snow Leopard), and it was using an older 2.5 version of python

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

212 views 3 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you