-
- Downloads
templatekw: introduce obsfate keyword
Introduce an obsfate printer that uses all helpers functions defined in obsutil to get all the obsfate-related data and format a string according to the current format in test-obsmarker-template.t. Then, introduce an obsfate templatekw that uses the obsfateprinter to return a list of strings. The goal is not to replace existing obsfate template functions but to propose a default, good-enough and easily usable obsfate definition for end-users that don't want to customize it. Such output would ultimately get included in the default log output. Here are some output examples for a commit amended: rewritten using amend as 5:a9b1f8652753 by test (at 1970-01-01 00:00 +0000) Next patches will make the output dependent on the verbosity. Exemple of use-cases: For having the obsfate on a single-line between brackets: {if(obsfate, " [{join(obsfate, "; ")}]")} For having the obsfate in several lines: {if(obsfate, "{obsfate % " Obsfate: {fate}\n"}")}
Showing
- mercurial/obsutil.py 41 additions, 0 deletionsmercurial/obsutil.py
- mercurial/templatekw.py 17 additions, 0 deletionsmercurial/templatekw.py
- tests/test-obsolete-distributed.t 22 additions, 29 deletionstests/test-obsolete-distributed.t
- tests/test-obsolete-divergent.t 28 additions, 28 deletionstests/test-obsolete-divergent.t
- tests/test-obsolete.t 21 additions, 21 deletionstests/test-obsolete.t
Loading
Please register or sign in to comment