Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 285:b347f938a2cd
FIX: Handle conflict marker output properly in "timestamps --show".
This is needed because now the corresponding value is _conflictobj instead of
None.
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Mon, 07 Jan 2019 09:34:51 +0100 |
| parents | 66f526666b96 |
| children | ee3d41f6db63 |
| files | extensions/timestamps.py |
| diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/timestamps.py Mon Jan 07 09:17:10 2019 +0100 +++ b/extensions/timestamps.py Mon Jan 07 09:34:51 2019 +0100 @@ -260,6 +260,10 @@ def show_timestamps(ui, repo, ctx, fm, tsconfig=None): + + def _tsv(v): + return "<CONFLICT>" if v is _conflictobj else v + # # NOTE: no need for a local repo here # @@ -279,15 +283,15 @@ fm.condwrite(not ui.debugflag and ui.verbose and f == "/version/", "version", " version=%d\n", - ts[f]) + _tsv(ts[f])) fm.condwrite(not ui.debugflag and ui.verbose and f == "/encoding/", "encoding", " encoding=%s\n", - ts[f]) + _tsv(ts[f])) fm.condwrite(not ui.debugflag and ui.verbose and f.startswith("/comment-"), "comment", " %s\n", - ts[f]) + _tsv(ts[f])) fm.condwrite(not ui.debugflag and ui.verbose and f.startswith("/-"), "", " \n") @@ -295,7 +299,7 @@ "match date file", " %s %s\t%s\n", '*' if matcher(f) else ' ', - ts[f], + _tsv(ts[f]), f)
