[PATCH 5 of 5] adjustlinkrev: remove unnecessary parameters

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Nov 3 12:52:27 EDT 2016



On 11/02/2016 03:45 AM, Jun Wu wrote:
> Excerpts from Pierre-Yves David's message of 2016-11-02 03:35:34 +0100:
>>
>> On 11/02/2016 03:15 AM, Jun Wu wrote:
>>> Excerpts from Pierre-Yves David's message of 2016-11-02 02:53:52 +0100:
>>>
>>>> I would like something a bit more tangible than "I believe" for example
>>>> the changeset that made it a method without cleaning the argument. It
>>>> might contains data about why it did not cleaned them up.
>>>
>>> See 087603b50889. It does not contain data why it did not cleaned them up.
>>
>> The commit message does not says anything, but the last hunk probably
>> have the answer. In the last hunk the path the path, filelog and
>> filenode are not taken from "self" because we are adjusting link for
>> parent filelog we are creating. It seems like the code evolve and such
>> operation do not happen anymore (probably because the parent is lazily
>> responsible to adjust its likerev if needed.
>>
>> Can you double check that all trace of this is now gone? If we, I'm
>> happy to take a signature simplification :-)
>
> I have done this when writing the patch. This is the second check:
> Searching all "_adjustlinkrev" from the repo (at 264f00):
>
>   quark % ack _adjustlinkrev
>   mercurial/context.py
>   683:            return self._adjustlinkrev(self._path, self._filelog, <<<
>   811:    def _adjustlinkrev(self, path, filelog, fnode, srcrev, inclusive=False):
>   874:        return self._adjustlinkrev(self._path, self._filelog, self._filenode, <<<
>   878:        """create parent filectx keeping ancestry info for _adjustlinkrev()"""
>   884:            # This lets us later use _adjustlinkrev to get a correct link.
>   955:            # adjustment. Otherwise, p._adjustlinkrev() would walk changelog
>
> We only have 2 callers of _adjustlinkrev, both using self._path, _filelog
> and _filenode.
>
> If patch 4 is dropped, this one will cause conflict. I will fix that later.

I've fixed the patch in flight and pushed it. Thanks.
(only patch5 is pushed)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list