uncommit: include "operation" metadata in obsmarkers
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 12 Mar 2018 15:50:45 -0700
changeset 3563 d4c457c1ae0d
parent 3562 fe16284cd95a
child 3564 589649021ea1
uncommit: include "operation" metadata in obsmarkers
hgext3rd/evolve/cmdrewrite.py
tests/test-uncommit-interactive.t
--- a/hgext3rd/evolve/cmdrewrite.py	Mon Mar 12 15:40:28 2018 -0700
+++ b/hgext3rd/evolve/cmdrewrite.py	Mon Mar 12 15:50:45 2018 -0700
@@ -389,7 +389,8 @@
         if opts.get('note'):
             metadata['note'] = opts['note']
 
-        compat.createmarkers(repo, [(old, (repo[newid],))], metadata=metadata)
+        compat.createmarkers(repo, [(old, (repo[newid],))], metadata=metadata,
+                             operation="uncommit")
         phases.retractboundary(repo, tr, oldphase, [newid])
         if opts.get('revert'):
             hg.updaterepo(repo, newid, True)
@@ -427,7 +428,7 @@
     fp.seek(0)
     newnode = _patchtocommit(ui, repo, old, fp)
     # creating obs marker temp -> ()
-    compat.createmarkers(repo, [(repo[tempnode], ())])
+    compat.createmarkers(repo, [(repo[tempnode], ())], operation="uncommit")
     return newnode
 
 def _createtempcommit(ui, repo, old, match):
--- a/tests/test-uncommit-interactive.t	Mon Mar 12 15:40:28 2018 -0700
+++ b/tests/test-uncommit-interactive.t	Mon Mar 12 15:50:45 2018 -0700
@@ -168,7 +168,7 @@
   @  678a59e5ff90 (3) another one
   |
   x  f70fb463d5bf (1) another one
-       rewritten(content) as 678a59e5ff90 by test (Thu Jan 01 00:00:00 1970 +0000)
+       rewritten(content) as 678a59e5ff90 using uncommit by test (Thu Jan 01 00:00:00 1970 +0000)
          note: note on amend --extract
   
 The unselected part should be in the diff
@@ -300,11 +300,11 @@
   @  46e35360be47 (5) another one
   |
   x  678a59e5ff90 (3) another one
-  |    rewritten(content) as 46e35360be47 by test (Thu Jan 01 00:00:00 1970 +0000)
+  |    rewritten(content) as 46e35360be47 using uncommit by test (Thu Jan 01 00:00:00 1970 +0000)
   |      note: testing uncommit on dirty wdir
   |
   x  f70fb463d5bf (1) another one
-       rewritten(content) as 678a59e5ff90 by test (Thu Jan 01 00:00:00 1970 +0000)
+       rewritten(content) as 678a59e5ff90 using uncommit by test (Thu Jan 01 00:00:00 1970 +0000)
          note: note on amend --extract