Mercurial > evolve
changeset 4377:c2f9de28415a
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.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 23 Jan 2019 12:11:36 -0800 |
parents | 0fbf895ce160 |
children | 0b97d4bea7e0 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)