changeset 5793:ccc558c9c736

evolve: use nodemod.short() instead of nodemod.hex()[:12]
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 23 Feb 2021 06:36:46 +0800
parents 5d00679d78aa
children bf74edda0645
files hgext3rd/evolve/cmdrewrite.py hgext3rd/evolve/evolvecmd.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/cmdrewrite.py	Tue Feb 23 06:31:01 2021 +0800
+++ b/hgext3rd/evolve/cmdrewrite.py	Tue Feb 23 06:36:46 2021 +0800
@@ -579,7 +579,7 @@
         c.write(fp)
 
     fp.seek(0)
-    oldnode = node.hex(old.node())[:12]
+    oldnode = node.short(old.node())
     message = b'temporary commit for uncommiting %s' % oldnode
     tempnode = _patchtocommit(ui, repo, old, fp, message, oldnode)
     return tempnode
@@ -1484,7 +1484,7 @@
     pickstate.load()
     pctxnode = pickstate[b'oldpctx']
     ui.status(_(b"aborting pick, updating to %s\n") %
-              node.hex(pctxnode)[:12])
+              node.short(pctxnode))
     compat.clean_update(repo[pctxnode])
     pickstate.delete()
     return 0
--- a/hgext3rd/evolve/evolvecmd.py	Tue Feb 23 06:31:01 2021 +0800
+++ b/hgext3rd/evolve/evolvecmd.py	Tue Feb 23 06:36:46 2021 +0800
@@ -1966,7 +1966,7 @@
         evolvestate.delete()
         ui.status(_(b'evolve aborted\n'))
         ui.status(_(b'working directory is now at %s\n')
-                  % nodemod.hex(startnode)[:12])
+                  % nodemod.short(startnode))
     else:
         raise error.Abort(_(b"unable to abort interrupted evolve, use 'hg "
                             b"evolve --stop' to stop evolve"))