Commit 018870d5 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

obslog: make user template property into users

parent 471b7a4acf9b
......@@ -116,17 +116,17 @@ TEMPLATE_REWRITE = b"""{if(succnodes, "%(verb)s{if(effects, "({join(effects, ",
b"succnodes": TEMPLATE_SUCCNODES
}
TEMPLATE_OPERATION = b"""{if(operation, "using {label("evolve.operation", operation)}")}"""
TEMPLATE_USER = b"""by {label("evolve.user", user)}"""
TEMPLATE_USERS = b"""by {label("evolve.user", join(users, ", "))}"""
TEMPLATE_DATE = b"""{label("evolve.date", "({date(date, "%a %b %d %H:%M:%S %Y %1%2")})")}"""
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{indent(descdiff, " ")}{indent("%(patch)s", " ")}\n"}
{markers %% " {separate(" ", "%(rewrite)s", "%(operation)s", "%(users)s", "%(date)s")}%(note)s{indent(descdiff, " ")}{indent("%(patch)s", " ")}\n"}
""") % {
b"firstline": TEMPLATE_FIRST_LINE,
b"rewrite": TEMPLATE_REWRITE,
b"operation": TEMPLATE_OPERATION,
b"user": TEMPLATE_USER,
b"users": TEMPLATE_USERS,
b"date": TEMPLATE_DATE,
b"note": TEMPLATE_NOTE,
b"patch": TEMPLATE_PATCH,
......@@ -521,7 +521,9 @@ def _debugobshistorydisplaymarker(ui, fm, marker, node, repo, includediff=False)
if operation:
fm.data(operation=operation)
fm.data(user=metadata[b'user'])
# Users
users = obsutil.markersusers([marker])
fm.data(users=fm.formatlist(users, name=b'user', sep=b', '))
fm.data(date=date)
......
......@@ -309,7 +309,9 @@ Check the json output is valid in this case
"succnodes": [
"0da815c333f6364b46c86b0a897c00eb617397b6"
],
"user": "test",
"users": [
"test"
],
"verb": "rewritten"
}
],
......@@ -332,7 +334,9 @@ Check the json output is valid in this case
"succnodes": [
"868d2e0eb19c2b55a2894d37e1c435c221384d48"
],
"user": "test",
"users": [
"test"
],
"verb": "rewritten"
}
],
......@@ -355,7 +359,9 @@ Check the json output is valid in this case
"succnodes": [
"d9f908fde1a10ad198a462a3ec8b440bb397fc9c"
],
"user": "test",
"users": [
"test"
],
"verb": "rewritten"
}
],
......@@ -379,7 +385,9 @@ Check the json output is valid in this case
"2a34000d35446022104f7a091c06fe21ff2b5912",
"868d2e0eb19c2b55a2894d37e1c435c221384d48"
],
"user": "test",
"users": [
"test"
],
"verb": "split"
}
],
......@@ -402,7 +410,9 @@ Check the json output is valid in this case
"succnodes": [
"a8df460dbbfe9ef0c1e5ab4fff02e9514672e379"
],
"user": "test",
"users": [
"test"
],
"verb": "rewritten"
}
],
......@@ -425,7 +435,9 @@ Check the json output is valid in this case
"succnodes": [
"c473644ee0e988d7f537e31423831bbc409f12f7"
],
"user": "test",
"users": [
"test"
],
"verb": "rewritten"
}
],
......
......@@ -171,7 +171,9 @@ Check that obslog on ROOT with all option show everything
"succnodes": [
"eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
],
"user": "test",
"users": [
"test"
],
"verb": "folded"
}
],
......@@ -192,7 +194,9 @@ Check that obslog on ROOT with all option show everything
"succnodes": [
"b7ea6d14e664bdc8922221f7992631b50da3fb07"
],
"user": "test",
"users": [
"test"
],
"verb": "reworded"
}
],
......@@ -214,7 +218,9 @@ Check that obslog on ROOT with all option show everything
"succnodes": [
"eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
],
"user": "test",
"users": [
"test"
],
"verb": "folded"
}
],
......
......@@ -163,7 +163,9 @@ Check that the same thing works with the old {shortdescription} form
"succnodes": [
"4ae3a4151de9aa872113f0b196e28323308981e8"
],
"user": "test",
"users": [
"test"
],
"verb": "rewritten"
}
],
......@@ -208,7 +210,9 @@ Check that the same thing works with the old {shortdescription} form
"succnodes": [
"4ae3a4151de9aa872113f0b196e28323308981e8"
],
"user": "test",
"users": [
"test"
],
"verb": "rewritten"
}
],
......
......@@ -140,7 +140,9 @@ Check that with all option, every changeset is shown
"succnodes": [
"65b757b745b935093c87a2bccd877521cccffcbd"
],
"user": "test",
"users": [
"test"
],
"verb": "reworded"
},
{
......@@ -155,7 +157,9 @@ Check that with all option, every changeset is shown
"succnodes": [
"fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
],
"user": "test",
"users": [
"test"
],
"verb": "reworded"
}
],
......@@ -304,7 +308,9 @@ graph
"succnodes": [
"65b757b745b935093c87a2bccd877521cccffcbd"
],
"user": "test",
"users": [
"test"
],
"verb": "reworded"
},
{
......@@ -319,7 +325,9 @@ graph
"succnodes": [
"fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
],
"user": "test",
"users": [
"test"
],
"verb": "reworded"
}
],
......
......@@ -190,7 +190,9 @@ graph
"succnodes": [
"eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
],
"user": "test",
"users": [
"test"
],
"verb": "folded"
}
],
......@@ -213,7 +215,9 @@ graph
"succnodes": [
"eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
],
"user": "test",
"users": [
"test"
],
"verb": "folded"
}
],
......
......@@ -212,7 +212,9 @@ Actual test
"c7f044602e9bd5dec6528b33114df3d0221e6359",
"f257fde29c7a847c9b607f6e958656d0df0fb15c"
],
"user": "test",
"users": [
"test"
],
"verb": "split"
}
],
......@@ -252,7 +254,9 @@ Actual test
"c7f044602e9bd5dec6528b33114df3d0221e6359",
"f257fde29c7a847c9b607f6e958656d0df0fb15c"
],
"user": "test",
"users": [
"test"
],
"verb": "split"
}
],
......
......@@ -109,7 +109,9 @@ Check that with all option, every changeset is shown
"succnodes": [
"fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
],
"user": "test",
"users": [
"test"
],
"verb": "reworded"
}
],
......@@ -212,7 +214,9 @@ graph
"succnodes": [
"fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
],
"user": "test",
"users": [
"test"
],
"verb": "reworded"
}
],
......
......@@ -78,7 +78,9 @@ Actual test
0
],
"operation": "prune",
"user": "test",
"users": [
"test"
],
"verb": "pruned"
}
],
......
......@@ -129,7 +129,9 @@ Check that debugobshistory on split commit show both targets
"337fec4d2edcf0e7a467e35f818234bc620068b5",
"f257fde29c7a847c9b607f6e958656d0df0fb15c"
],
"user": "test",
"users": [
"test"
],
"verb": "split"
}
],
......
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