D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-08 Thread yuja (Yuya Nishihara)
yuja added inline comments. INLINE COMMENTS > quark wrote in localrepo.py:575 > I guess `hg log -r HASH --hidden` would go through this code path so `pass` > makes sense. Maybe. My concern was `getvisibilityexceptions()` "seemed" not working correctly in that case. I know unfiltered repo has

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-08 Thread yuja (Yuya Nishihara)
yuja added a comment. >> How long should the visibilityexception be preserved? > > The visibility exceptions must be preserved until we calculate filteredrevs for that filter. After adding the expections, we clear filteredrevcache to make sure we calculate that again. Sounds like

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-08 Thread quark (Jun Wu)
quark added inline comments. INLINE COMMENTS > yuja wrote in localrepo.py:575 > raise ProgrammingError? I guess `hg log -r HASH --hidden` would go through this code path so `pass` makes sense. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1285 To: pulkit,

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-08 Thread pulkit (Pulkit Goyal)
pulkit added a comment. In https://phab.mercurial-scm.org/D1285#27808, @yuja wrote: > > I have spend a lot of time on this and I am unable to make this work without making it class attribute because to calculate filterrevs, unfilteredrepo is passed and I lose the reference to the

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-08 Thread yuja (Yuya Nishihara)
yuja added a comment. > I have spend a lot of time on this and I am unable to make this work without making it class attribute because to calculate filterrevs, unfilteredrepo is passed and I lose the reference to the object on which I initially stored the visibilityexceptions. If I call

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-07 Thread pulkit (Pulkit Goyal)
pulkit added a comment. In https://phab.mercurial-scm.org/D1285#27283, @yuja wrote: > > As _visibilityexceptions is defined as a class attribute, mutating it is likely to mutate it for all instances of repoview, > > Indeed. I have spend a lot of time on this and I am unable

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-06 Thread yuja (Yuya Nishihara)
yuja requested changes to this revision. yuja added a comment. This revision now requires changes to proceed. > As _visibilityexceptions is defined as a class attribute, mutating it is likely to mutate it for all instances of repoview, Indeed. INLINE COMMENTS > localrepo.py:575 > +

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-06 Thread lothiraldan (Boris Feld)
lothiraldan added inline comments. INLINE COMMENTS > repoview.py:189 > +# hidden revs which should be visible > +_visibilityexceptions = set() > + As `_visibilityexceptions` is defined as a class attribute, mutating it is likely to mutate it for all instances of repoview, I'm not sure

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-04 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 4092. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1285?vs=4051=4092 REVISION DETAIL https://phab.mercurial-scm.org/D1285 AFFECTED FILES mercurial/localrepo.py mercurial/repoview.py CHANGE DETAILS diff --git

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-12-01 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 4051. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1285?vs=3956=4051 REVISION DETAIL https://phab.mercurial-scm.org/D1285 AFFECTED FILES mercurial/localrepo.py mercurial/repoview.py CHANGE DETAILS diff --git

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-11-28 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 3956. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1285?vs=3784=3956 REVISION DETAIL https://phab.mercurial-scm.org/D1285 AFFECTED FILES mercurial/localrepo.py mercurial/repoview.py CHANGE DETAILS diff --git

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-11-28 Thread quark (Jun Wu)
quark accepted this revision. quark added inline comments. INLINE COMMENTS > repoview.py:236-238 > +def addvisibilityexceptions(self, exceptions): > +"""adds hidden revs which should be visible to set of exceptions""" > +self._visibilityexceptions.update(exceptions) Maybe

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-11-22 Thread pulkit (Pulkit Goyal)
pulkit added a comment. In https://phab.mercurial-scm.org/D1285#24461, @quark wrote: > I think the state of "visibilityexception" should really be bounded into whoever controls "filteredrevs", which is the `repoview` object. This allows different exceptions to be set for different

D1285: repoview: add a new attribute _visibilityexceptions and related API

2017-11-22 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 3784. pulkit edited the summary of this revision. pulkit retitled this revision from "localrepo: add a new attribute _visibilityexceptions and related API" to "repoview: add a new attribute _visibilityexceptions and related API". REPOSITORY rHG Mercurial