--- a/hgext3rd/evolve/cmdrewrite.py Tue Apr 17 19:42:26 2018 +0200
+++ b/hgext3rd/evolve/cmdrewrite.py Tue Apr 17 19:42:46 2018 +0200
@@ -34,7 +34,10 @@
from mercurial.i18n import _
-from mercurial.utils import dateutil
+try:
+ from mercurial.utils.dateutil import datestr
+except ImportError: # hg <= 4.5
+ from mercurial.util import datestr
from . import (
compat,
@@ -277,7 +280,7 @@
fp.write("# HG changeset patch\n")
fp.write("# User %s\n" % ctx.user())
fp.write("# Date %d %d\n" % ctx.date())
- fp.write("# %s\n" % dateutil.datestr(ctx.date()))
+ fp.write("# %s\n" % datestr(ctx.date()))
if branch and branch != 'default':
fp.write("# Branch %s\n" % branch)
fp.write("# Node ID %s\n" % node.hex(nodeval))