Commit 5c41bb48 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

obslog: make {descdiff} not be indented and leave that to the template

Same idea as the previous patch and same explanation for changes to
the test case.
parent b135591bec1a
Pipeline #1098 failed with stage
in 4 minutes and 50 seconds
......@@ -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())
......
......@@ -381,10 +381,10 @@
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]
|
......@@ -390,7 +390,7 @@
|
| [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:
| ```
......@@ -393,11 +393,11 @@
| ```
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]
|
......@@ -403,7 +403,7 @@
|
| [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:
```
......@@ -406,15 +406,15 @@
| ```
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment