import: compare binary node with binary node when using --obsolete stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 14 Aug 2014 15:14:18 -0700
branchstable
changeset 1054 93e920feff5e
parent 1053 bfa9d535f436
child 1055 cfe1b9d3e5d9
import: compare binary node with binary node when using --obsolete hex(N) != N
hgext/evolve.py
--- a/hgext/evolve.py	Sun Aug 10 23:58:31 2014 -0700
+++ b/hgext/evolve.py	Thu Aug 14 15:14:18 2014 -0700
@@ -933,6 +933,7 @@
 def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs):
     extracted = patch.extract(ui, hunk)
     expected = extracted[5]
+    expected = node.bin(expected)
     oldextract = patch.extract
     try:
         patch.extract = lambda ui, hunk: extracted
@@ -944,7 +945,7 @@
             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: