comparison mercurial/localrepo.py @ 6119:b8919d401313

localrepo: keep the UTF-8 version of branchcache around
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 15 Feb 2008 16:06:36 -0200
parents b69a39ab4745
children f89878df40fe
comparison
equal deleted inserted replaced
6118:b69a39ab4745 6119:b8919d401313
92 pass 92 pass
93 93
94 self.tagscache = None 94 self.tagscache = None
95 self._tagstypecache = None 95 self._tagstypecache = None
96 self.branchcache = None 96 self.branchcache = None
97 self._ubranchcache = None # UTF-8 version of branchcache
97 self.nodetagscache = None 98 self.nodetagscache = None
98 self.filterpats = {} 99 self.filterpats = {}
99 self._datafilters = {} 100 self._datafilters = {}
100 self._transref = self._lockref = self._wlockref = None 101 self._transref = self._lockref = self._wlockref = None
101 102
363 364
364 # the branch cache is stored on disk as UTF-8, but in the local 365 # the branch cache is stored on disk as UTF-8, but in the local
365 # charset internally 366 # charset internally
366 for k, v in partial.items(): 367 for k, v in partial.items():
367 self.branchcache[util.tolocal(k)] = v 368 self.branchcache[util.tolocal(k)] = v
369 self._ubranchcache = partial
368 return self.branchcache 370 return self.branchcache
369 371
370 def _readbranchcache(self): 372 def _readbranchcache(self):
371 partial = {} 373 partial = {}
372 try: 374 try:
615 self.__delattr__(a) 617 self.__delattr__(a)
616 self.tagscache = None 618 self.tagscache = None
617 self._tagstypecache = None 619 self._tagstypecache = None
618 self.nodetagscache = None 620 self.nodetagscache = None
619 self.branchcache = None 621 self.branchcache = None
622 self._ubranchcache = None
620 623
621 def _lock(self, lockname, wait, releasefn, acquirefn, desc): 624 def _lock(self, lockname, wait, releasefn, acquirefn, desc):
622 try: 625 try:
623 l = lock.lock(lockname, 0, releasefn, desc=desc) 626 l = lock.lock(lockname, 0, releasefn, desc=desc)
624 except lock.LockHeld, inst: 627 except lock.LockHeld, inst: