Mercurial > evolve
changeset 5026:e7949274c3f9 stable
evolve: fix a bug in logic to choose destination when no active topic
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Fri, 20 Dec 2019 17:39:44 +0530 |
parents | 21168e99ba88 |
children | 1015a1dbaf7c |
files | hgext3rd/topic/destination.py tests/test-topic-dest.t |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/destination.py Fri Dec 20 17:32:07 2019 +0530 +++ b/hgext3rd/topic/destination.py Fri Dec 20 17:39:44 2019 +0530 @@ -10,6 +10,7 @@ from . import ( common, topicmap, + constants, ) from .evolvebits import builddependencies @@ -66,9 +67,10 @@ return None, None, None movemark = node = None topic = repo.currenttopic - revs = [] if topic: revs = repo.revs(b'.::topic(%s)', topic) + elif constants.extrakey in repo[b'.'].extra(): + revs = [] else: return None, None, None if revs:
--- a/tests/test-topic-dest.t Fri Dec 20 17:32:07 2019 +0530 +++ b/tests/test-topic-dest.t Fri Dec 20 17:39:44 2019 +0530 @@ -526,5 +526,6 @@ active topic 'foo' grew its first changeset (see 'hg help topics' for more information) $ hg topic --clear - $ hg up 2>&1 | grep "AssertionError" - AssertionError: any revision has at least one descendant branch head + $ hg up + switching to topic foo + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved