Mercurial > evolve
diff hgext3rd/topic/__init__.py @ 2664:ed6fb5f20b24
topics: return early so that other if conditions don't get execute (issue5600)
We were not returning after the _changetopics() call and hence the if's below it
were also executed which resulted in changing of current topic.
This prevent current topic to be updated even when we only affect changeset
unrelated to the working copy.
Not that the rebase output change as it expose a new bug (rebased changeset gain
a topic)
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 25 Jun 2017 06:53:22 +0530 |
parents | 9c0b293c2785 |
children | 0ade6e87346b |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Mon Jun 26 17:47:04 2017 +0200 +++ b/hgext3rd/topic/__init__.py Sun Jun 25 06:53:22 2017 +0530 @@ -286,7 +286,8 @@ raise error.Abort('changing topic requires a topic name or --clear') if any(not c.mutable() for c in repo.set('%r and public()', rev)): raise error.Abort("can't change topic of a public change") - _changetopics(ui, repo, rev, topic) + return _changetopics(ui, repo, rev, topic) + if clear: return _changecurrenttopic(repo, None)