equal
deleted
inserted
replaced
320 self._writebranchcache() |
320 self._writebranchcache() |
321 |
321 |
322 return self.branchcache |
322 return self.branchcache |
323 |
323 |
324 def _writebranchcache(self): |
324 def _writebranchcache(self): |
325 f = self.opener("branches.cache", "w") |
325 try: |
326 t = self.changelog.tip() |
326 f = self.opener("branches.cache", "w") |
327 f.write("%s %s\n" % (hex(t), self.changelog.count() - 1)) |
327 t = self.changelog.tip() |
328 for label, node in self.branchcache.iteritems(): |
328 f.write("%s %s\n" % (hex(t), self.changelog.count() - 1)) |
329 f.write("%s %s\n" % (hex(node), label)) |
329 for label, node in self.branchcache.iteritems(): |
|
330 f.write("%s %s\n" % (hex(node), label)) |
|
331 except IOError: |
|
332 pass |
330 |
333 |
331 def lookup(self, key): |
334 def lookup(self, key): |
332 if key == '.': |
335 if key == '.': |
333 key = self.dirstate.parents()[0] |
336 key = self.dirstate.parents()[0] |
334 if key == nullid: |
337 if key == nullid: |