Mercurial > evolve
comparison hgext3rd/topic/topicmap.py @ 4451:a019067fea9e
branching: merge with stable
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 28 Mar 2019 12:37:55 +0100 |
parents | c6d1b0a6babe 9b0cde5efbc9 |
children | 05f8908df4ce |
comparison
equal
deleted
inserted
replaced
4448:ab5bc57ba897 | 4451:a019067fea9e |
---|---|
7 branchmap, | 7 branchmap, |
8 changegroup, | 8 changegroup, |
9 cmdutil, | 9 cmdutil, |
10 extensions, | 10 extensions, |
11 repoview, | 11 repoview, |
12 util, | |
12 ) | 13 ) |
13 | 14 |
14 basefilter = set(['base', 'immutable']) | 15 basefilter = set(['base', 'immutable']) |
15 def topicfilter(name): | 16 def topicfilter(name): |
16 """return a "topic" version of a filter level""" | 17 """return a "topic" version of a filter level""" |
162 super(_topiccache, self).__init__(*args, **kwargs) | 163 super(_topiccache, self).__init__(*args, **kwargs) |
163 self.phaseshash = None | 164 self.phaseshash = None |
164 | 165 |
165 def copy(self): | 166 def copy(self): |
166 """return an deep copy of the branchcache object""" | 167 """return an deep copy of the branchcache object""" |
167 new = self.__class__(self, self.tipnode, self.tiprev, self.filteredhash, | 168 if util.safehasattr(self, '_entries'): |
168 self._closednodes) | 169 _entries = self._entries |
170 else: | |
171 # hg <= 4.9 (624d6683c705, b137a6793c51) | |
172 _entries = self | |
173 new = self.__class__(_entries, self.tipnode, self.tiprev, | |
174 self.filteredhash, self._closednodes) | |
169 new.phaseshash = self.phaseshash | 175 new.phaseshash = self.phaseshash |
170 return new | 176 return new |
171 | 177 |
172 def branchtip(self, branch, topic=''): | 178 def branchtip(self, branch, topic=''): |
173 '''Return the tipmost open head on branch head, otherwise return the | 179 '''Return the tipmost open head on branch head, otherwise return the |