Commit 145c12f4 authored by Sushil Khanchi's avatar Sushil Khanchi 🐨
Browse files

evolve: fix a bug in logic to choose destination when no active topic

--HG--
branch : stable
parent 21168e99ba88
Pipeline #2025 passed with stage
in 4 minutes and 2 seconds
......@@ -10,6 +10,7 @@ from mercurial import (
from . import (
common,
topicmap,
constants,
)
from .evolvebits import builddependencies
......@@ -66,9 +67,10 @@ def _destupdatetopic(repo, clean, check=None):
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:
......
......@@ -526,5 +526,6 @@ destination check: when wdp has a topic but wdir has no active topic:
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment