obslog: phase divergence fix for 5c41bb482867
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 16 Nov 2019 01:45:40 +0100
changeset 4955 e5d92ac69a9c
parent 4954 a76ed637acba (current diff)
parent 4953 5c41bb482867 (diff)
child 4961 c664c71de3d1
obslog: phase divergence fix for 5c41bb482867 I forgot to pull the latest version before publishing the topic :-(
tests/test-evolve-obshistory-amend.t
tests/test-evolve-obshistory-split.t
--- a/hgext3rd/evolve/obshistory.py	Sat Nov 16 01:44:31 2019 +0100
+++ b/hgext3rd/evolve/obshistory.py	Sat Nov 16 01:45:40 2019 +0100
@@ -161,7 +161,7 @@
 TEMPLATE_NOTE = b"""{if(note, "\n    note: {label("evolve.note", note)}")}"""
 TEMPLATE_PATCH = b"""{if(patch, "{patch}")}{if(nopatchreason, "\n(No patch available, {nopatchreason})")}"""
 DEFAULT_TEMPLATE = (b"""%(firstline)s
-{markers %% "  {separate(" ", "%(rewrite)s", "%(operation)s", "%(user)s", "%(date)s")}%(note)s{descdiff}{indent("%(patch)s", "    ")}\n"}
+{markers %% "  {separate(" ", "%(rewrite)s", "%(operation)s", "%(user)s", "%(date)s")}%(note)s{indent(descdiff, "    ")}{indent("%(patch)s", "    ")}\n"}
 """) % {
     b"firstline": TEMPLATE_FIRST_LINE,
     b"rewrite": TEMPLATE_REWRITE,
@@ -623,8 +623,6 @@
 
                 for chunk, label in patch.difflabel(tolist, descriptionpatch):
                     chunk = chunk.strip(b'\t')
-                    if chunk and chunk != b'\n':
-                        ui.write(b'    ')
                     ui.write(chunk, label=label)
                 fm.write(b'descdiff', b'%s', ui.popbuffer())
 
--- a/tests/test-evolve-obshistory-amend.t	Sat Nov 16 01:44:31 2019 +0100
+++ b/tests/test-evolve-obshistory-amend.t	Sat Nov 16 01:45:40 2019 +0100
@@ -94,7 +94,7 @@
   4ae3a4151de9 (2) A1
   
   471f378eab4c (1) A0
-    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
       diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description
       --- a/changeset-description
       +++ b/changeset-description
@@ -244,7 +244,7 @@
   4ae3a4151de9 (1) A1
   
   471f378eab4c
-    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, context is not local)
   
 
@@ -252,7 +252,7 @@
   4ae3a4151de9 (1) A1
   
   471f378eab4c
-    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, context is not local)
   
 
@@ -381,40 +381,40 @@
   x  4f1685185907 A2
   |  description diff:
   |  ```
-  |      [diff.diffline|diff -r 4f1685185907 -r 92210308515b changeset-description]
-  |      [diff.file_a|--- a/changeset-description]
-  |      [diff.file_b|+++ b/changeset-description]
-  |      [diff.hunk|@@ -1,3 +1,3 @@]
-  |      [diff.deleted|-A2]
-  |      [diff.inserted|+A3]
+  |  [diff.diffline|diff -r 4f1685185907 -r 92210308515b changeset-description]
+  |  [diff.file_a|--- a/changeset-description]
+  |  [diff.file_b|+++ b/changeset-description]
+  |  [diff.hunk|@@ -1,3 +1,3 @@]
+  |  [diff.deleted|-A2]
+  |  [diff.inserted|+A3]
   |
-  |      [diff.deleted|-Better better commit message]
-  |      [diff.inserted|+Better better better commit message]
+  |  [diff.deleted|-Better better commit message]
+  |  [diff.inserted|+Better better better commit message]
   |  ```
   x  4ae3a4151de9 A1
   |  description diff:
   |  ```
-  |      [diff.diffline|diff -r 4ae3a4151de9 -r 4f1685185907 changeset-description]
-  |      [diff.file_a|--- a/changeset-description]
-  |      [diff.file_b|+++ b/changeset-description]
-  |      [diff.hunk|@@ -1,3 +1,3 @@]
-  |      [diff.deleted|-A1]
-  |      [diff.inserted|+A2]
+  |  [diff.diffline|diff -r 4ae3a4151de9 -r 4f1685185907 changeset-description]
+  |  [diff.file_a|--- a/changeset-description]
+  |  [diff.file_b|+++ b/changeset-description]
+  |  [diff.hunk|@@ -1,3 +1,3 @@]
+  |  [diff.deleted|-A1]
+  |  [diff.inserted|+A2]
   |
-  |      [diff.deleted|-Better commit message]
-  |      [diff.inserted|+Better better commit message]
+  |  [diff.deleted|-Better commit message]
+  |  [diff.inserted|+Better better commit message]
   |  ```
   x  471f378eab4c A0
      description diff:
      ```
-         [diff.diffline|diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description]
-         [diff.file_a|--- a/changeset-description]
-         [diff.file_b|+++ b/changeset-description]
-         [diff.hunk|@@ -1,1 +1,3 @@]
-         [diff.deleted|-A0]
-         [diff.inserted|+A1]
-         [diff.inserted|+]
-         [diff.inserted|+Better commit message]
+     [diff.diffline|diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description]
+     [diff.file_a|--- a/changeset-description]
+     [diff.file_b|+++ b/changeset-description]
+     [diff.hunk|@@ -1,1 +1,3 @@]
+     [diff.deleted|-A0]
+     [diff.inserted|+A1]
+     [diff.inserted|+]
+     [diff.inserted|+Better commit message]
      ```
 
 Check the output on the server
@@ -455,15 +455,15 @@
   92210308515b (2) A3
   
   4f1685185907
-    rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, context is not local)
   
   4ae3a4151de9 (1) A1
-    rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, successor is unknown locally)
   
   471f378eab4c
-    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, context is not local)
   
 
@@ -471,14 +471,14 @@
   92210308515b (2) A3
   
   4f1685185907
-    rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, context is not local)
   
   4ae3a4151de9 (1) A1
-    rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, successor is unknown locally)
   
   471f378eab4c
-    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)    
+    rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)        
       (No patch available, context is not local)
   
--- a/tests/test-evolve-obshistory-split.t	Sat Nov 16 01:44:31 2019 +0100
+++ b/tests/test-evolve-obshistory-split.t	Sat Nov 16 01:45:40 2019 +0100
@@ -247,7 +247,7 @@
   
   471597cad322
     rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
-      note: testing split    
+      note: testing split        
       (No patch available, context is not local)
   
 
@@ -256,6 +256,6 @@
   
   471597cad322
     rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
-      note: testing split    
+      note: testing split        
       (No patch available, context is not local)