mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
fix encoding conversion of branch names when mq is loaded
This commit is contained in:
parent
8e669882ac
commit
3b575d7b19
10
hgext/mq.py
10
hgext/mq.py
@ -2043,13 +2043,10 @@ def reposetup(ui, repo):
|
||||
|
||||
return tagscache
|
||||
|
||||
def branchtags(self):
|
||||
if self.branchcache != None:
|
||||
return self.branchcache
|
||||
|
||||
def _branchtags(self):
|
||||
q = self.mq
|
||||
if not q.applied:
|
||||
return super(mqrepo, self).branchtags()
|
||||
return super(mqrepo, self)._branchtags()
|
||||
|
||||
self.branchcache = {} # avoid recursion in changectx
|
||||
cl = self.changelog
|
||||
@ -2069,8 +2066,7 @@ def reposetup(ui, repo):
|
||||
# update the cache up to the tip
|
||||
self._updatebranchcache(partial, start, cl.count())
|
||||
|
||||
self.branchcache = partial
|
||||
return self.branchcache
|
||||
return partial
|
||||
|
||||
if repo.local():
|
||||
repo.__class__ = mqrepo
|
||||
|
@ -312,12 +312,7 @@ class localrepository(repo.repository):
|
||||
self.nodetagscache.setdefault(n, []).append(t)
|
||||
return self.nodetagscache.get(node, [])
|
||||
|
||||
def branchtags(self):
|
||||
if self.branchcache != None:
|
||||
return self.branchcache
|
||||
|
||||
self.branchcache = {} # avoid recursion in changectx
|
||||
|
||||
def _branchtags(self):
|
||||
partial, last, lrev = self._readbranchcache()
|
||||
|
||||
tiprev = self.changelog.count() - 1
|
||||
@ -325,6 +320,15 @@ class localrepository(repo.repository):
|
||||
self._updatebranchcache(partial, lrev+1, tiprev+1)
|
||||
self._writebranchcache(partial, self.changelog.tip(), tiprev)
|
||||
|
||||
return partial
|
||||
|
||||
def branchtags(self):
|
||||
if self.branchcache is not None:
|
||||
return self.branchcache
|
||||
|
||||
self.branchcache = {} # avoid recursion in changectx
|
||||
partial = self._branchtags()
|
||||
|
||||
# the branch cache is stored on disk as UTF-8, but in the local
|
||||
# charset internally
|
||||
for k, v in partial.items():
|
||||
|
Loading…
Reference in New Issue
Block a user