[PATCH 2 of 2] obsolete: extract obsolescence marker pulling in a dedicated function
Kevin Bullock
kbullock+mercurial at ringworld.org
Thu Apr 18 22:36:08 UTC 2013
On 18 Apr 2013, at 4:48 PM, Pierre-Yves David wrote:
> On 18 avr. 2013, at 23:12, Kevin Bullock wrote:
>
>> (sorry for previous empty reply)
>>
>> On 18 Apr 2013, at 12:16 PM, pierre-yves.david at logilab.fr wrote:
>>
>>> # HG changeset patch
>>> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
>>> # Date 1366192069 -7200
>>> # Wed Apr 17 11:47:49 2013 +0200
>>> # Node ID 6079d531bcb5542b24e4dc192d21eb926b8d223c
>>> # Parent 368a3c420ecf9712b2efa3caf894acf447814b3a
>>> obsolete: extract obsolescence marker pulling in a dedicated function
>>> [...]
>>> diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
>>> --- a/mercurial/obsolete.py
>>> +++ b/mercurial/obsolete.py
>>> @@ -371,11 +371,11 @@ def pushmarker(repo, key, old, new):
>>> lock.release()
>>>
>>> def syncpush(repo, remote):
>>> """utility function to push bookmark to a remote
>>>
>>> - exist mostly to allow overridding for experimentation purpose"""
>>> + Exist mostly to allow overridding for experimentation purpose"""
>>
>> Unrelated case change. Should've been rolled into previous patch.
>
> yeah right.
>
>> Otherwise looks okay, but would it be possible to set tr in gettransaction() rather than making syncpull() return it? Maybe the fact that I have to ask that means 'no'.
>
> That would mean trapping a reference to a something mutable (list, fict?) from localrepo.pull in the closure gettransaction before passing it to syncpush and put the tr in there when creating it.
>
> I dediced that was a level of magnitude than the current implementation.
>
> Another approach would be to turn push into an object and have it handle the tr… ho wait.
We'll get there. ;) Fixed up the minor issues and crewed, thanks. I owe you at least two gold stars for removing code from localrepository, and removing an import from localrepo.py.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel
mailing list