merge with stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 14 Aug 2014 15:26:55 -0700
changeset 1056 edfb9a0ad085
parent 1051 d2fe19c818ea (current diff)
parent 1055 cfe1b9d3e5d9 (diff)
child 1058 00bc31523074
merge with stable
--- a/README	Fri Aug 08 23:16:24 2014 -0700
+++ b/README	Thu Aug 14 15:26:55 2014 -0700
@@ -57,7 +57,7 @@
 Changelog
 =========
 
-4.0.1 -- 2014-08-08
+4.1.0 -- 2014-08-08
 
 - amend: add -D/--current-date option
 - amend: add -U/--current-user option
--- a/hgext/evolve.py	Fri Aug 08 23:16:24 2014 -0700
+++ b/hgext/evolve.py	Thu Aug 14 15:26:55 2014 -0700
@@ -852,7 +852,7 @@
     if not orig.p2().rev() == node.nullrev:
         raise util.Abort(
             'no support for evolving merge changesets yet',
-            hint="Redo the merge a use `hg prune` to obsolete the old one")
+            hint="Redo the merge and use `hg prune` to obsolete the old one")
     destbookmarks = repo.nodebookmarks(dest.node())
     nodesrc = orig.node()
     destphase = repo[nodesrc].phase()
@@ -933,6 +933,8 @@
 def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs):
     extracted = patch.extract(ui, hunk)
     expected = extracted[5]
+    if extracted is not None:
+        expected = node.bin(expected)
     oldextract = patch.extract
     try:
         patch.extract = lambda ui, hunk: extracted
@@ -940,11 +942,12 @@
     finally:
         patch.extract = oldextract
     created = ret[1]
-    if opts['obsolete'] and created is not None and created != expected:
+    if (opts['obsolete'] and None not in (created, expected)
+        and created != expected):
             tr = repo.transaction('import-obs')
             try:
                 metadata = {'user': ui.username()}
-                repo.obsstore.create(tr, node.bin(expected), (created,),
+                repo.obsstore.create(tr, expected, (created,),
                                      metadata=metadata)
                 tr.close()
             finally: