# HG changeset patch # User Anton Shestakov # Date 1649526583 -10800 # Node ID 4298ae0b966dabcaaf529c8824b07029b6b46945 # Parent 9571d40061c862bb4822f035d891c771b6778dad evolve: don't update wdir when --dry-run is given (issue6669) What _cleanup() should've been called, perhaps, is _update(). Because it updates working copy to either headnode or a successor of startnode. And yes, it performs an update even when shouldupdate is False. So when --dry-run is given, we should simply avoid calling _cleanup(). diff -r 9571d40061c8 -r 4298ae0b966d CHANGELOG --- a/CHANGELOG Thu Apr 07 16:03:29 2022 +0200 +++ b/CHANGELOG Sat Apr 09 20:49:43 2022 +0300 @@ -4,6 +4,7 @@ 10.5.1 - in progress -------------------- + * evolve: avoid updating working copy when --dry-run is given (issue6669) * fixup: work correctly with bookmarks 10.5.0 -- 2022-02-23 diff -r 9571d40061c8 -r 4298ae0b966d hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Thu Apr 07 16:03:29 2022 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Sat Apr 09 20:49:43 2022 +0300 @@ -1768,7 +1768,8 @@ if showprogress: progress.complete() - _cleanup(ui, repo, startnode, shouldupdate, headnode) + if not dryrunopt: + _cleanup(ui, repo, startnode, shouldupdate, headnode) def _solveonerev(ui, repo, rev, evolvestate, activetopic, dryrunopt, confirmopt, progresscb, targetcat): diff -r 9571d40061c8 -r 4298ae0b966d tests/test-fixup.t --- a/tests/test-fixup.t Thu Apr 07 16:03:29 2022 +0200 +++ b/tests/test-fixup.t Sat Apr 09 20:49:43 2022 +0300 @@ -96,6 +96,17 @@ o 0:e63c23eaa88a foo () draft +using --dry-run should only print actions (issue6669) + + $ hg evolve --dry-run + update:[5] bar + + $ hg evolve --dry-run --any + update:[5] bar + move:[2] baz + atop:[5] bar + hg rebase -r a425495a8e64 -d 2eec5320cfc7 + $ hg evolve update:[5] bar 1 files updated, 0 files merged, 1 files removed, 0 files unresolved