[PATCH 2 of 3 STABLE] store: change ̀_data` to a real list

Adrian Buehlmann adrian at cadifra.com
Thu Jul 19 14:46:43 CDT 2012


On 2012-07-19 21:18, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves.David at ens-lyon.org
> # Date 1342724459 -7200
> # Branch stable
> # Node ID ca58a884607433c52d2ba41ec63f8c1d43c0952e
> # Parent  9ee53e911f958f7581608bd329231a92a671b025
> store: change ̀_data` to a real list

  store: change _data to a list

> Every user user data.split() to create a list from it.

(just drop that sentence)

> diff -r 9ee53e911f95 -r ca58a8846074 mercurial/store.py
> --- a/mercurial/store.py	Thu Jul 19 21:02:49 2012 +0200
> +++ b/mercurial/store.py	Thu Jul 19 21:00:59 2012 +0200
> @@ -232,7 +232,8 @@
>          mode = None
>      return mode
>  
> -_data = 'data 00manifest.d 00manifest.i 00changelog.d 00changelog.i phaseroots'
> +_data = ['data', '00manifest.d', '00manifest.i', '00changelog.d',
> +         '00changelog.i', 'phaseroots']
>  
>  class basicstore(object):
>      '''base class for local repository stores'''
> @@ -280,7 +281,7 @@
>              yield x
>  
>      def copylist(self):
> -        return ['requires'] + _data.split()
> +        return ['requires'] + _data
>  
>      def write(self):
>          pass
> @@ -306,7 +307,7 @@
>  
>      def copylist(self):
>          return (['requires', '00changelog.i'] +
> -                ['store/' + f for f in _data.split()])
> +                ['store/' + f for f in _data])

..

>  class fncache(object):
>      # the filename used to be partially encoded
> @@ -411,10 +412,10 @@
>              self.fncache.rewrite(existing)
>  
>      def copylist(self):
> -        d = ('data dh fncache phaseroots'
> -             ' 00manifest.d 00manifest.i 00changelog.d 00changelog.i')
> +        d = ['data', 'dh', 'fncache', 'phaseroots', '00manifest.d',
> +             '00manifest.i', '00changelog.d', '00changelog.i']
>          return (['requires', '00changelog.i'] +
> -                ['store/' + f for f in d.split()])
> +                ['store/' + f for f in d])
>  
>      def write(self):
>          self.fncache.write()

Seems like an unrelated change to me. And it doesn't fit with the change message. Separate patch?


As a general comment, I think such a change is not suitable for stable.



More information about the Mercurial-devel mailing list