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

Adrian Buehlmann adrian at cadifra.com
Wed Apr 2 13:42:28 CDT 2014


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).





More information about the Mercurial-devel mailing list