On Tue, 06 Feb 2018 14:21:28 +0100, Boris Feld wrote: > # HG changeset patch > # User Boris Feld <boris.f...@octobus.net> > # Date 1517847733 -3600 > # Mon Feb 05 17:22:13 2018 +0100 > # Node ID d238ec45ba25f7c1ea9ec22aa11a4ec699c72740 > # Parent b192ee27b376523292ec1cf52c49c9382a870658 > # EXP-Topic revlog-fp > # Available At https://bitbucket.org/octobus/mercurial-devel/ > # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r > d238ec45ba25 > revlog: move index file opening in a method
Queud the series, thanks. > @@ -682,6 +682,15 @@ class revlog(object): > def _compressor(self): > return util.compengines[self._compengine].revlogcompressor() > > + def _indexfp(self, mode='r'): > + """file object for the revlog's index file""" > + args = {'mode': mode} > + if mode != 'r': > + args['checkambig'] = self._checkambig > + if mode == 'w': > + args['atomictemp'] = True > + return self.opener(self.indexfile, **args) Added r'' in flight to get around py3 transformer. > - fp = self.opener(self.indexfile, 'w', atomictemp=True, > - checkambig=self._checkambig) > + fp = self._indexfp('w') I don't think it's good idea to make 'w' imply atomictemp=True because here the atomic-temp semantics is really important, but the series looks good as a whole. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel