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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

30,651 views 26 12
Join discussion

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