prev: show changeset hash in --dry-run instead of rev numbers
rev numbers can change, so it's better to show changeset hash.
--- 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