comparison mercurial/branchmap.py @ 18214:cd4c75200206

branchmap: ignore Abort error while writing cache Read only vfs can now raise Abort exception. Note that encoding.local are also a possible raiser.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 04 Jan 2013 04:52:57 +0100
parents 493778b5fe9f
children d5655e742457
comparison
equal deleted inserted replaced
18213:c38a62af000e 18214:cd4c75200206
137 f.write(" ".join(cachekey) + '\n') 137 f.write(" ".join(cachekey) + '\n')
138 for label, nodes in self.iteritems(): 138 for label, nodes in self.iteritems():
139 for node in nodes: 139 for node in nodes:
140 f.write("%s %s\n" % (hex(node), encoding.fromlocal(label))) 140 f.write("%s %s\n" % (hex(node), encoding.fromlocal(label)))
141 f.close() 141 f.close()
142 except (IOError, OSError): 142 except (IOError, OSError, util.Abort):
143 # Abort may be raise by read only opener
143 pass 144 pass
144 145
145 def update(self, repo, ctxgen): 146 def update(self, repo, ctxgen):
146 """Given a branchhead cache, self, that may have extra nodes or be 147 """Given a branchhead cache, self, that may have extra nodes or be
147 missing heads, and a generator of nodes that are at least a superset of 148 missing heads, and a generator of nodes that are at least a superset of