changeset 5061:d684c6d73374

templatekw: drop obsfateprinter() and obsfatelineprinter() They were unused (probably because their versions were already pushed to hg 4.4).
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 07 Jan 2020 16:33:37 +0700
parents eded640fc61d
children 901186e1fe05
files hgext3rd/evolve/templatekw.py
diffstat 1 files changed, 0 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/templatekw.py	Tue Jan 07 16:30:18 2020 +0700
+++ b/hgext3rd/evolve/templatekw.py	Tue Jan 07 16:33:37 2020 +0700
@@ -149,63 +149,6 @@
 
     return values
 
-def obsfatelineprinter(obsfateline, ui):
-    quiet = ui.quiet
-    verbose = ui.verbose
-    normal = not verbose and not quiet
-
-    # Build the line step by step
-    line = []
-
-    # Verb
-    line.append(obsfateline[b'verb'])
-
-    # Successors
-    successors = obsfateline[b"successors"]
-
-    if successors:
-        fmtsuccessors = map(lambda s: s[:12], successors)
-        line.append(b" as %s" % b", ".join(fmtsuccessors))
-
-    # Users
-    if (verbose or normal) and b'users' in obsfateline:
-        users = obsfateline[b'users']
-
-        if not verbose:
-            # If current user is the only user, do not show anything if not in
-            # verbose mode
-            username = _getusername(ui)
-            if len(users) == 1 and users[0] == username:
-                users = None
-
-        if users:
-            line.append(b" by %s" % b", ".join(users))
-
-    # Date
-    if verbose:
-        min_date = obsfateline[b'min_date']
-        max_date = obsfateline[b'max_date']
-
-        if min_date == max_date:
-            fmtmin_date = util.datestr(min_date, b'%Y-%m-%d %H:%M %1%2')
-            line.append(b" (at %s)" % fmtmin_date)
-        else:
-            fmtmin_date = util.datestr(min_date, b'%Y-%m-%d %H:%M %1%2')
-            fmtmax_date = util.datestr(max_date, b'%Y-%m-%d %H:%M %1%2')
-            line.append(b" (between %s and %s)" % (fmtmin_date, fmtmax_date))
-
-    return b"".join(line)
-
-def obsfateprinter(obsfate, ui, prefix=b""):
-    lines = []
-    for raw in obsfate:
-        lines.append(obsfatelineprinter(raw, ui))
-
-    if prefix:
-        lines = [prefix + line for line in lines]
-
-    return b"\n".join(lines)
-
 if not util.safehasattr(templatekw, 'obsfateverb'): # <= hg-4.5
     @eh.templatekeyword(b"obsfatedata")
     def showobsfatedata(repo, ctx, **args):