mercurial/cmdutil.py
changeset 35904 fc44c2657dc5
parent 35903 1a31111e6239
child 35910 b82c6dd15f5d
--- a/mercurial/cmdutil.py	Sat Jan 27 17:31:25 2018 +0900
+++ b/mercurial/cmdutil.py	Sat Jan 27 17:46:37 2018 +0900
@@ -1563,11 +1563,6 @@
         if fo is not None:
             fo.close()
 
-def _maybebytestr(v):
-    if isinstance(v, bytes):
-        return pycompat.bytestr(v)
-    return v
-
 def showmarker(fm, marker, index=None):
     """utility function to display obsolescence marker in a readable way
 
@@ -1586,7 +1581,7 @@
     fm.write('date', '(%s) ', fm.formatdate(marker.date()))
     meta = marker.metadata().copy()
     meta.pop('date', None)
-    smeta = util.rapply(_maybebytestr, meta)
+    smeta = util.rapply(pycompat.maybebytestr, meta)
     fm.write('metadata', '{%s}', fm.formatdict(smeta, fmt='%r: %r', sep=', '))
     fm.plain('\n')