merge with stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 12 Oct 2015 01:23:59 -0700
changeset 1512 c40108ae8fb0
parent 1510 b86eea66ed02 (current diff)
parent 1511 91b6a30424a3 (diff)
child 1513 4f7e0e0318a5
merge with stable
README
hgext/evolve.py
--- a/README	Tue Sep 29 15:40:28 2015 -0400
+++ b/README	Mon Oct 12 01:23:59 2015 -0700
@@ -58,6 +58,7 @@
 
 5.2.1 --
 
+- add compatibility with Mercurial 3.6
 - prune: fixed possible issue with lock and bookmark
 - next/prev: fixed possible issue with lock and bookmark
 
--- a/hgext/evolve.py	Tue Sep 29 15:40:28 2015 -0400
+++ b/hgext/evolve.py	Mon Oct 12 01:23:59 2015 -0700
@@ -1040,7 +1040,11 @@
 @eh.wrapfunction(mercurial.cmdutil, 'tryimportone')
 def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs):
     extracted = patch.extract(ui, hunk)
-    expected = extracted[5]
+    if util.safehasattr(extracted, 'get'):
+        # mercurial 3.6 return a dictionary there
+        expected = extracted.get('nodeid')
+    else:
+        expected = extracted[5]
     if expected is not None:
         expected = node.bin(expected)
     oldextract = patch.extract