# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1521180073 -19800 # Node ID d197e6f0d0e3bf181b0ab0efe1680d36a2e1a3b6 # Parent 6aff754c2457172c5b7e1abd3827a37f3128dcca 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. diff -r 6aff754c2457 -r d197e6f0d0e3 hgext3rd/evolve/__init__.py --- 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: diff -r 6aff754c2457 -r d197e6f0d0e3 tests/test-prev-next.t --- 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