[PATCH V2] transaction: allow running file generators after finalizers

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Mar 29 16:42:34 EDT 2016



On 03/29/2016 01:30 PM, FUJIWARA Katsunori wrote:
> At Tue, 29 Mar 2016 18:14:42 +0900,
> FUJIWARA Katsunori wrote:
>>
>> At Sat, 26 Mar 2016 22:15:50 -0700,
>> Pierre-Yves David wrote:
>>>
>>> On 03/20/2016 10:49 AM, Durham Goode wrote:
>>>> # HG changeset patch
>>>> # User Durham Goode <durham at fb.com>
>>>> # Date 1458495989 25200
>>>> #      Sun Mar 20 10:46:29 2016 -0700
>>>> # Node ID 1431f0447a6b0be851f609b386fabf83b2f54666
>>>> # Parent  ed75909c4c670a7d9db4a2bef9817a0d5f0b4d9c
>>>> transaction: allow running file generators after finalizers
>>
>> [...]
>>
>>>> […]
>>>> @@ -276,12 +284,17 @@ class transaction(object):
>>>>            # but for bookmarks that are handled outside this mechanism.
>>>>            self._filegenerators[genid] = (order, filenames, genfunc, location)
>>>>
>>>> -    def _generatefiles(self, suffix=''):
>>>> +    def _generatefiles(self, postfinalize=False, suffix=''):
>>>
>>> The postfinalize=False as the default is an issue here,
>>>
>>> Before this patch tr._generatefiles() would get all file generated.
>>> After that patch, only part of them are. Third parties and future
>>> callers are going to get this wrong and introduce various transaction
>>> bug. This is highlighted by the fact they had to be a special case when
>>> 'suffix' is passed.
>>>
>>> I think we need three values here: 'all', 'precl', 'postcl':
>>>
>>>     def _generatefiles(self, suffix='', group='all')
>>
>> If possible, wording without abbreviation is friendly to
>> non-English-native developer, like me :-)
>>
>> If "preclose"/"postclose" is long, how about "closing"/"closed" ?
>
> I remembered that "cl" is often used as an abbreviation of "changelog"
> in Mercurial source. Would you mean pre/post-changelog(-finalization) ?

I actually did. This is kind of proving your point because your expended 
the abbreviation wrong and disprove it because you eventually got it 
wrong. But you are probably right here that explicite is better than 
abbreviated.

(also, keep in mind that I'm also are a non-native speaker, even if I'm 
kind of cheating as most of my advanced vocabulary got forcefully 
imported into the English language over the past millennial.)

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list