equal
deleted
inserted
replaced
1307 clearing)""" |
1307 clearing)""" |
1308 # only clear cache is there is obsstore data in this repo |
1308 # only clear cache is there is obsstore data in this repo |
1309 if 'obsstore' in repo._filecache: |
1309 if 'obsstore' in repo._filecache: |
1310 repo.obsstore.caches.clear() |
1310 repo.obsstore.caches.clear() |
1311 |
1311 |
|
1312 def _mutablerevs(repo): |
|
1313 """the set of mutable revision in the repository""" |
|
1314 return repo._phasecache.getrevset(repo, (phases.draft, phases.secret)) |
|
1315 |
1312 @cachefor('obsolete') |
1316 @cachefor('obsolete') |
1313 def _computeobsoleteset(repo): |
1317 def _computeobsoleteset(repo): |
1314 """the set of obsolete revisions""" |
1318 """the set of obsolete revisions""" |
1315 getnode = repo.changelog.node |
1319 getnode = repo.changelog.node |
1316 notpublic = repo._phasecache.getrevset(repo, (phases.draft, phases.secret)) |
1320 notpublic = _mutablerevs(repo) |
1317 isobs = repo.obsstore.successors.__contains__ |
1321 isobs = repo.obsstore.successors.__contains__ |
1318 obs = set(r for r in notpublic if isobs(getnode(r))) |
1322 obs = set(r for r in notpublic if isobs(getnode(r))) |
1319 return obs |
1323 return obs |
1320 |
1324 |
1321 @cachefor('unstable') |
1325 @cachefor('unstable') |