Mercurial > evolve
comparison hgext3rd/topic/destination.py @ 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 | b1a9d548af52 |
children | 991be5efe7cb |
comparison
equal
deleted
inserted
replaced
5025:21168e99ba88 | 5026:e7949274c3f9 |
---|---|
8 extensions, | 8 extensions, |
9 ) | 9 ) |
10 from . import ( | 10 from . import ( |
11 common, | 11 common, |
12 topicmap, | 12 topicmap, |
13 constants, | |
13 ) | 14 ) |
14 from .evolvebits import builddependencies | 15 from .evolvebits import builddependencies |
15 | 16 |
16 def _destmergebranch(orig, repo, action=b'merge', sourceset=None, | 17 def _destmergebranch(orig, repo, action=b'merge', sourceset=None, |
17 onheadcheck=True, destspace=None): | 18 onheadcheck=True, destspace=None): |
64 """decide on an update destination from current topic""" | 65 """decide on an update destination from current topic""" |
65 if not common.hastopicext(repo): | 66 if not common.hastopicext(repo): |
66 return None, None, None | 67 return None, None, None |
67 movemark = node = None | 68 movemark = node = None |
68 topic = repo.currenttopic | 69 topic = repo.currenttopic |
69 revs = [] | |
70 if topic: | 70 if topic: |
71 revs = repo.revs(b'.::topic(%s)', topic) | 71 revs = repo.revs(b'.::topic(%s)', topic) |
72 elif constants.extrakey in repo[b'.'].extra(): | |
73 revs = [] | |
72 else: | 74 else: |
73 return None, None, None | 75 return None, None, None |
74 if revs: | 76 if revs: |
75 node = revs.last() | 77 node = revs.last() |
76 else: | 78 else: |