evolve: document the "if not shouldupdate" block
I missed the "not" in "if not shouldupdate: ... hg.updaterepo()" and
it took a long time for me to realize it's about updating *back* to
the original commit (or to its successor). Let's add a comment to
maybe help the person not make the same mistake.
--- a/hgext3rd/evolve/evolvecmd.py Wed Jan 23 11:55:20 2019 -0800
+++ b/hgext3rd/evolve/evolvecmd.py Wed Jan 23 12:11:36 2019 -0800
@@ -1289,6 +1289,8 @@
compat.progress(ui, _('evolve'), None)
if not shouldupdate:
+ # Move back to startnode, or to its successor if the start node is
+ # obsolete (perhaps made obsolete by the current `hg evolve`)
unfi = repo.unfiltered()
succ = utility._singlesuccessor(repo, unfi[startnode])
hg.updaterepo(repo, repo[succ].node(), False)