changeset 3563:d4c457c1ae0d

uncommit: include "operation" metadata in obsmarkers
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 12 Mar 2018 15:50:45 -0700
parents fe16284cd95a
children 589649021ea1
files hgext3rd/evolve/cmdrewrite.py tests/test-uncommit-interactive.t
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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