Show More
@@ -9,6 +9,7 b'' | |||||
9 | import copy |
|
9 | import copy | |
10 | import phases |
|
10 | import phases | |
11 | import util |
|
11 | import util | |
|
12 | import obsolete, bookmarks, revset | |||
12 |
|
13 | |||
13 |
|
14 | |||
14 | def computehidden(repo): |
|
15 | def computehidden(repo): | |
@@ -16,10 +17,19 b' def computehidden(repo):' | |||||
16 |
|
17 | |||
17 | During most operation hidden should be filtered.""" |
|
18 | During most operation hidden should be filtered.""" | |
18 | assert not repo.changelog.filteredrevs |
|
19 | assert not repo.changelog.filteredrevs | |
19 | if repo.obsstore: |
|
20 | hideable = obsolete.getrevs(repo, 'obsolete') | |
20 | ### hide extinct changeset that are not accessible by any mean |
|
21 | if hideable: | |
21 | hiddenquery = 'extinct() - ::(parents() + bookmark())' |
|
22 | cl = repo.changelog | |
22 | return frozenset(repo.revs(hiddenquery)) |
|
23 | firsthideable = min(hideable) | |
|
24 | revs = cl.revs(start=firsthideable) | |||
|
25 | blockers = [r for r in revset._children(repo, revs, hideable) | |||
|
26 | if r not in hideable] | |||
|
27 | for par in repo[None].parents(): | |||
|
28 | blockers.append(par.rev()) | |||
|
29 | for bm in bookmarks.listbookmarks(repo).values(): | |||
|
30 | blockers.append(repo[bm].rev()) | |||
|
31 | blocked = cl.ancestors(blockers, inclusive=True) | |||
|
32 | return frozenset(r for r in hideable if r not in blocked) | |||
23 | return frozenset() |
|
33 | return frozenset() | |
24 |
|
34 | |||
25 | def computeunserved(repo): |
|
35 | def computeunserved(repo): |
General Comments 0
You need to be logged in to leave comments.
Login now