[PATCH 2 of 2] changegroup: remove now-unused 'wasempty' variable and parameter

Gregory Szorc gregory.szorc at gmail.com
Tue Jan 12 10:35:16 CST 2016



> On Jan 12, 2016, at 07:31, Augie Fackler <raf at durin42.com> wrote:
> 
> On Tue, Jan 12, 2016 at 10:28 AM, Martin von Zweigbergk
> <martinvonz at google.com> wrote:
>> Greg has some comments on patch 1. He suggested introducing a new bundle
>> type. If you are with that, could you dequeue these two and queue my cg4
>> patches instead of they look good to you?
> 
> What I took away from that discussion was that we probably need to put
> the required part parameters in the bundle params bit for
> clonebundles, not that we need to bump the bundle format. Am I wrong
> about that?

I need to think about it. We probably should add some forward compat here. I also like "v1" "v2" etc denoting strong, unchanging semantics.

I think we should hold off declaring the new bundle type for cg3/cg4 until the feature set stabilizes, which it apparently is still doing.

> 
> Relatedly, if we take this series, do we still want cg4? If not, then
> I've got new concerns about cg4 and parameterization that we should
> talk through...
> 
>> 
>> 
>>> On Tue, Jan 12, 2016, 07:08 Augie Fackler <raf at durin42.com> wrote:
>>> 
>>>> On Fri, Jan 08, 2016 at 11:18:32PM -0600, Martin von Zweigbergk wrote:
>>>> # HG changeset patch
>>>> # User Martin von Zweigbergk <martinvonz at google.com>
>>>> # Date 1452316448 28800
>>>> #      Fri Jan 08 21:14:08 2016 -0800
>>>> # Node ID 36b82e00a2de1543d58d90446408aabb1eee7a53
>>>> # Parent  ea75b21a97b7549441941268c317995591230dc5
>>>> changegroup: remove now-unused 'wasempty' variable and parameter
>>> 
>>> Queued these, thanks.
>>> 
>>>> 
>>>> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
>>>> --- a/mercurial/changegroup.py
>>>> +++ b/mercurial/changegroup.py
>>>> @@ -315,7 +315,6 @@
>>>>         - number of heads stays the same: 1
>>>>         """
>>>>         repo = repo.unfiltered()
>>>> -        wasempty = (len(repo.changelog) == 0)
>>>>         def csmap(x):
>>>>             repo.ui.debug("add changeset %s\n" % short(x))
>>>>             return len(cl)
>>>> @@ -390,7 +389,7 @@
>>>>             self.callback = None
>>>>             pr = prog(_('files'), efiles)
>>>>             newrevs, newfiles = _addchangegroupfiles(
>>>> -                repo, self, revmap, trp, pr, needfiles, wasempty)
>>>> +                repo, self, revmap, trp, pr, needfiles)
>>>>             revisions += newrevs
>>>>             files += newfiles
>>>> 
>>>> @@ -1034,7 +1033,7 @@
>>>>     # to avoid a race we use changegroupsubset() (issue1320)
>>>>     return changegroupsubset(repo, basenodes, repo.heads(), source)
>>>> 
>>>> -def _addchangegroupfiles(repo, source, revmap, trp, pr, needfiles,
>>>> wasempty):
>>>> +def _addchangegroupfiles(repo, source, revmap, trp, pr, needfiles):
>>>>     revisions = 0
>>>>     files = 0
>>>>     while True:
>>>> _______________________________________________
>>>> Mercurial-devel mailing list
>>>> Mercurial-devel at selenic.com
>>>> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list