Patchwork filter: add a comment so that people do not forget to update subsettable

login
register
mail settings
Submitter Pierre-Yves David
Date Dec. 23, 2013, 9:14 p.m.
Message ID <9510f6f79b3944f7997b.1387833268@marginatus.fb.com>
Download mbox | patch
Permalink /patch/3230/
State Accepted
Commit 59198508b0bdbc3b2a945051475cd70c70c8ee7d
Headers show

Comments

Pierre-Yves David - Dec. 23, 2013, 9:14 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1387830231 28800
#      Mon Dec 23 12:23:51 2013 -0800
# Node ID 9510f6f79b3944f7997b0252b85c0eb572f81c43
# Parent  4274eda143cb1025be1130ffdaaf62370a2a6961
filter: add a comment so that people do not forget to update subsettable


Changeset 175c6fd8cacc moved `subsettable` from `mercurial/repoview.py` to
`mercurial/branchmap.py`. This mean that `filtertable` and `subsettable` are no
longer next to each other. So we add a comment to remind people to update both.
Sean Farley - Dec. 24, 2013, 6:04 p.m.
pierre-yves.david@ens-lyon.org writes:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1387830231 28800
> #      Mon Dec 23 12:23:51 2013 -0800
> # Node ID 9510f6f79b3944f7997b0252b85c0eb572f81c43
> # Parent  4274eda143cb1025be1130ffdaaf62370a2a6961
> filter: add a comment so that people do not forget to update subsettable
>
>
> Changeset 175c6fd8cacc moved `subsettable` from `mercurial/repoview.py` to
> `mercurial/branchmap.py`. This mean that `filtertable` and `subsettable` are no
> longer next to each other. So we add a comment to remind people to update both.
>
> diff --git a/mercurial/repoview.py b/mercurial/repoview.py
> --- a/mercurial/repoview.py
> +++ b/mercurial/repoview.py
> @@ -92,10 +92,15 @@ def computeimpactable(repo):
>      # protect from nullrev root
>      firstmutable = max(0, firstmutable)
>      return frozenset(xrange(firstmutable, len(cl)))
>  
>  # function to compute filtered set
> +#
> +# When addding a new filter you MUST update the table at:
> +#     mercurial.branchmap.subsettable
> +# Otherwise you don't your filter will have to recompute all its branches cache
> +# from scratch (very slow).

Do you mean, "Otherwise, your filter will have ..."?
Augie Fackler - Dec. 24, 2013, 10:42 p.m.
On Dec 24, 2013, at 1:04 PM, Sean Farley <sean.michael.farley@gmail.com> wrote:

> 
> pierre-yves.david@ens-lyon.org writes:
> 
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
>> # Date 1387830231 28800
>> #      Mon Dec 23 12:23:51 2013 -0800
>> # Node ID 9510f6f79b3944f7997b0252b85c0eb572f81c43
>> # Parent  4274eda143cb1025be1130ffdaaf62370a2a6961
>> filter: add a comment so that people do not forget to update subsettable
>> 
>> 
>> Changeset 175c6fd8cacc moved `subsettable` from `mercurial/repoview.py` to
>> `mercurial/branchmap.py`. This mean that `filtertable` and `subsettable` are no
>> longer next to each other. So we add a comment to remind people to update both.
>> 
>> diff --git a/mercurial/repoview.py b/mercurial/repoview.py
>> --- a/mercurial/repoview.py
>> +++ b/mercurial/repoview.py
>> @@ -92,10 +92,15 @@ def computeimpactable(repo):
>>     # protect from nullrev root
>>     firstmutable = max(0, firstmutable)
>>     return frozenset(xrange(firstmutable, len(cl)))
>> 
>> # function to compute filtered set
>> +#
>> +# When addding a new filter you MUST update the table at:
>> +#     mercurial.branchmap.subsettable
>> +# Otherwise you don't your filter will have to recompute all its branches cache
>> +# from scratch (very slow).
> 
> Do you mean, "Otherwise, your filter will have ..."?

Yup, that's got to be what he meant. Queued with that fix.

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -92,10 +92,15 @@  def computeimpactable(repo):
     # protect from nullrev root
     firstmutable = max(0, firstmutable)
     return frozenset(xrange(firstmutable, len(cl)))
 
 # function to compute filtered set
+#
+# When addding a new filter you MUST update the table at:
+#     mercurial.branchmap.subsettable
+# Otherwise you don't your filter will have to recompute all its branches cache
+# from scratch (very slow).
 filtertable = {'visible': computehidden,
                'served': computeunserved,
                'immutable':  computemutable,
                'base':  computeimpactable}