Skip to content
Snippets Groups Projects
Commit 05eb0874 authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

init: add a try/except to retain compatibility with Mercurial 3.2

Without the try/except, hg-git crashes with Mercurial 3.2. Oops.
parent 82b45751
No related branches found
No related tags found
No related merge requests found
......@@ -220,7 +220,10 @@
def exchangepull(orig, repo, remote, heads=None, force=False, bookmarks=()):
if isinstance(remote, gitrepo.gitrepo):
# transaction manager is present in Mercurial >= 3.3
trmanager = getattr(exchange, 'transactionmanager')
try:
trmanager = getattr(exchange, 'transactionmanager')
except AttributeError:
trmanager = None
pullop = exchange.pulloperation(repo, remote, heads, force,
bookmarks=bookmarks)
if trmanager:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment