comparison hgext/mq.py @ 6120:f89878df40fe

move the reading of branch.cache from _branchtags to branchtags
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 15 Feb 2008 16:06:36 -0200
parents cfb4a51da7d5
children 989467e8e3a9
comparison
equal deleted inserted replaced
6119:b8919d401313 6120:f89878df40fe
2184 else: 2184 else:
2185 tagscache[patch[1]] = patch[0] 2185 tagscache[patch[1]] = patch[0]
2186 2186
2187 return tagscache 2187 return tagscache
2188 2188
2189 def _branchtags(self): 2189 def _branchtags(self, partial, lrev):
2190 q = self.mq 2190 q = self.mq
2191 if not q.applied: 2191 if not q.applied:
2192 return super(mqrepo, self)._branchtags() 2192 return super(mqrepo, self)._branchtags(partial, lrev)
2193 2193
2194 cl = self.changelog 2194 cl = self.changelog
2195 qbasenode = revlog.bin(q.applied[0].rev) 2195 qbasenode = revlog.bin(q.applied[0].rev)
2196 if qbasenode not in cl.nodemap: 2196 if qbasenode not in cl.nodemap:
2197 self.ui.warn('mq status file refers to unknown node %s\n' 2197 self.ui.warn('mq status file refers to unknown node %s\n'
2198 % revlog.short(qbasenode)) 2198 % revlog.short(qbasenode))
2199 return super(mqrepo, self)._branchtags() 2199 return super(mqrepo, self)._branchtags(partial, lrev)
2200
2201 self.branchcache = {} # avoid recursion in changectx
2202 partial, last, lrev = self._readbranchcache()
2203 2200
2204 qbase = cl.rev(qbasenode) 2201 qbase = cl.rev(qbasenode)
2205 start = lrev + 1 2202 start = lrev + 1
2206 if start < qbase: 2203 if start < qbase:
2207 # update the cache (excluding the patches) and save it 2204 # update the cache (excluding the patches) and save it