mercurial/revlog.py
changeset 47328 27e9ed1217c5
parent 47327 1844a2e3401c
child 47382 d6a52783d2ba
equal deleted inserted replaced
47327:1844a2e3401c 47328:27e9ed1217c5
  2265                 yield
  2265                 yield
  2266                 if self._docket is not None:
  2266                 if self._docket is not None:
  2267                     self._write_docket(transaction)
  2267                     self._write_docket(transaction)
  2268             finally:
  2268             finally:
  2269                 self._writinghandles = None
  2269                 self._writinghandles = None
       
  2270                 if dfh is not None:
       
  2271                     dfh.close()
       
  2272                 # closing the index file last to avoid exposing referent to
       
  2273                 # potential unflushed data content.
  2270                 if ifh is not None:
  2274                 if ifh is not None:
  2271                     ifh.close()
  2275                     ifh.close()
  2272                 if dfh is not None:
       
  2273                     dfh.close()
       
  2274 
  2276 
  2275     def _write_docket(self, transaction):
  2277     def _write_docket(self, transaction):
  2276         """write the current docket on disk
  2278         """write the current docket on disk
  2277 
  2279 
  2278         Exist as a method to help changelog to implement transaction logic
  2280         Exist as a method to help changelog to implement transaction logic