Patchwork [15,of,18,V2] repoview: add a subset table

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 4, 2013, 1:04 a.m.
Message ID <6fe89fa91a993ac6d989.1357261458@yamac.lan>
Download mbox | patch
Permalink /patch/384/
State Accepted
Commit 59a9f18d458788b5829a0c43b69c8118a62e4ddb
Headers show

Comments

Pierre-Yves David - Jan. 4, 2013, 1:04 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1357087300 -3600
# Node ID 6fe89fa91a993ac6d98953ae34d8f3aca1ce15c9
# Parent  ecb6c49286b1c1238f5d9ce6d2d9ebe8b67ca650
repoview: add a subset table

This will be used by branchmap collaboration. See inline documentation for more
details
Kevin Bullock - Jan. 7, 2013, 4:03 p.m.
On Jan 3, 2013, at 7:04 PM, Pierre-Yves David wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1357087300 -3600
> # Node ID 6fe89fa91a993ac6d98953ae34d8f3aca1ce15c9
> # Parent  ecb6c49286b1c1238f5d9ce6d2d9ebe8b67ca650
> repoview: add a subset table
> 
> This will be used by branchmap collaboration. See inline documentation for more
> details
> 
> diff --git a/mercurial/repoview.py b/mercurial/repoview.py
> --- a/mercurial/repoview.py
> +++ b/mercurial/repoview.py
> @@ -17,12 +17,19 @@ def computeunserved(repo):
>     # fast path in simple case to avoid impact of non optimised code
>     if phases.hassecret(repo) or repo.obsstore:
>         return frozenset(repo.revs('hidden() + secret()'))
>     return frozenset()
> 
> -# function to compute filtered set
> +# Function to compute filtered set

Unrelated capitalization change.

pacem in terris / ??? / ?????? / ????????? / ??
Kevin R. Bullock
Pierre-Yves David - Jan. 7, 2013, 4:40 p.m.
On Mon, Jan 07, 2013 at 10:03:58AM -0600, Kevin Bullock wrote:
> On Jan 3, 2013, at 7:04 PM, Pierre-Yves David wrote:
> 
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> > # Date 1357087300 -3600
> > # Node ID 6fe89fa91a993ac6d98953ae34d8f3aca1ce15c9
> > # Parent  ecb6c49286b1c1238f5d9ce6d2d9ebe8b67ca650
> > repoview: add a subset table
> > 
> > This will be used by branchmap collaboration. See inline documentation for more
> > details
> > 
> > diff --git a/mercurial/repoview.py b/mercurial/repoview.py
> > --- a/mercurial/repoview.py
> > +++ b/mercurial/repoview.py
> > @@ -17,12 +17,19 @@ def computeunserved(repo):
> >     # fast path in simple case to avoid impact of non optimised code
> >     if phases.hassecret(repo) or repo.obsstore:
> >         return frozenset(repo.revs('hidden() + secret()'))
> >     return frozenset()
> > 
> > -# function to compute filtered set
> > +# Function to compute filtered set
> 
> Unrelated capitalization change.

good catch. pull Sbranchmap fro; hg-lab again for fixed version

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -17,12 +17,19 @@  def computeunserved(repo):
     # fast path in simple case to avoid impact of non optimised code
     if phases.hassecret(repo) or repo.obsstore:
         return frozenset(repo.revs('hidden() + secret()'))
     return frozenset()
 
-# function to compute filtered set
+# Function to compute filtered set
 filtertable = {'unserved': computeunserved}
+### Nearest subset relation
+# Nearest subset of filter X is a filter Y so that:
+# * Y is included in X,
+# * X - Y is as small as possible.
+# This create and ordering used for branchmap purpose.
+# the ordering may be partial
+subsettable = {None: 'unserved'}
 
 def filteredrevs(repo, filtername):
     """returns set of filtered revision for this filter name"""
     if filtername not in repo.filteredrevcache:
         func = filtertable[filtername]