[PATCH 1 of 7 V3] fncache: remove the rewriting logic

Matt Mackall mpm at selenic.com
Thu Apr 3 15:30:47 CDT 2014


On Wed, 2014-04-02 at 20:42 +0200, Adrian Buehlmann wrote:
> On 2014-04-02 00:24, Durham Goode wrote:
> > diff --git a/mercurial/store.py b/mercurial/store.py
> > --- a/mercurial/store.py
> > +++ b/mercurial/store.py
> 
> [..]
> 
> > @@ -476,7 +469,6 @@
> >          return self.rawvfs.stat(path).st_size
> >  
> >      def datafiles(self):
> > -        rewrite = False
> >          existing = []
> >          for f in sorted(self.fncache):
> >              ef = self.encode(f)
> > @@ -486,12 +478,6 @@
> >              except OSError, err:
> >                  if err.errno != errno.ENOENT:
> >                      raise
> > -                # nonexistent entry
> > -                rewrite = True
> > -        if rewrite:
> > -            # rewrite fncache to remove nonexistent entries
> > -            # (may be caused by rollback / strip)
> > -            self.fncache.rewrite(existing)
> >  
> >      def copylist(self):
> >          d = ('data dh fncache phaseroots obsstore'
> 
> This looks like local variable "existing" is now unused and can thus be
> removed (no need to keep appending to it).

Good spotting. I've committed a fix, thanks.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list