changeset 3552:7e8b2c9edf36

prev: show changeset hash in --dry-run instead of rev numbers rev numbers can change, so it's better to show changeset hash.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 16 Mar 2018 13:24:57 +0530
parents ce346c6165c6
children 6d03ec17c025
files hgext3rd/evolve/__init__.py tests/test-prev-next.t
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Fri Mar 16 13:13:21 2018 +0530
+++ b/hgext3rd/evolve/__init__.py	Fri Mar 16 13:24:57 2018 +0530
@@ -960,10 +960,10 @@
 
 def _prevupdate(repo, displayer, target, bookmark, dryrun):
     if dryrun:
-        repo.ui.write(('hg update %s;\n' % target.rev()))
+        repo.ui.write(('hg update %s;\n' % target))
         if bookmark is not None:
             repo.ui.write(('hg bookmark %s -r %s;\n'
-                           % (bookmark, target.rev())))
+                           % (bookmark, target)))
     else:
         ret = hg.update(repo, target.rev())
         if not ret:
--- a/tests/test-prev-next.t	Fri Mar 16 13:13:21 2018 +0530
+++ b/tests/test-prev-next.t	Fri Mar 16 13:24:57 2018 +0530
@@ -48,7 +48,7 @@
 
 hg prev should unset active bookmark
   $ hg prev --dry-run
-  hg update 0;
+  hg update a154386e50d1;
   [0] added a
   $ hg prev
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -174,7 +174,7 @@
   no children
   [1]
   $ hg prev --dry-run --color=debug
-  hg update 1;
+  hg update 6e742c9127b3;
   [[evolve.rev|1]] added b
   $ hg prev
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved