next: show changeset hash in `--dry-run` instead of rev numbers
Rev numbers can change, hence we should show rev hash instead of rev numbers in
dry-run.
--- a/hgext3rd/evolve/__init__.py Sun Mar 18 01:27:02 2018 +0530
+++ b/hgext3rd/evolve/__init__.py Fri Mar 16 11:31:13 2018 +0530
@@ -1160,11 +1160,11 @@
bm = repo._activebookmark
shouldmove = opts.get('move_bookmark') and bm is not None
if opts.get('dry_run'):
- ui.write(('hg update %s;\n' % children.rev()))
+ ui.write(('hg update %s;\n' % children))
if shouldmove:
- ui.write(('hg bookmark %s -r %s;\n' % (bm, children.rev())))
+ ui.write(('hg bookmark %s -r %s;\n' % (bm, children)))
else:
- ret = hg.update(repo, children.rev())
+ ret = hg.update(repo, children)
if not ret:
lock = tr = None
try:
--- a/tests/test-prev-next.t Sun Mar 18 01:27:02 2018 +0530
+++ b/tests/test-prev-next.t Fri Mar 16 11:31:13 2018 +0530
@@ -35,8 +35,8 @@
hg next -B should move active bookmark
$ hg next -B --dry-run
- hg update 1;
- hg bookmark mark -r 1;
+ hg update 6e742c9127b3;
+ hg bookmark mark -r 6e742c9127b3;
[1] added b
$ hg next -B
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -60,7 +60,7 @@
mark 1:6e742c9127b3
* mark2 0:a154386e50d1
$ hg next --dry-run --color=debug
- hg update 1;
+ hg update 6e742c9127b3;
[[evolve.rev|1]] added b
$ hg next
1 files updated, 0 files merged, 0 files removed, 0 files unresolved