Show More
@@ -1325,16 +1325,18 b' def _computeobsoleteset(repo):' | |||||
1325 | @cachefor('unstable') |
|
1325 | @cachefor('unstable') | |
1326 | def _computeunstableset(repo): |
|
1326 | def _computeunstableset(repo): | |
1327 | """the set of non obsolete revisions with obsolete parents""" |
|
1327 | """the set of non obsolete revisions with obsolete parents""" | |
1328 | revs = [(ctx.rev(), ctx) for ctx in |
|
1328 | pfunc = repo.changelog.parentrevs | |
1329 | repo.set('(not public()) and (not obsolete())')] |
|
1329 | mutable = _mutablerevs(repo) | |
1330 | revs.sort(key=lambda x:x[0]) |
|
1330 | obsolete = getrevs(repo, 'obsolete') | |
|
1331 | others = mutable - obsolete | |||
1331 | unstable = set() |
|
1332 | unstable = set() | |
1332 |
for r |
|
1333 | for r in sorted(others): | |
1333 | # A rev is unstable if one of its parent is obsolete or unstable |
|
1334 | # A rev is unstable if one of its parent is obsolete or unstable | |
1334 | # this works since we traverse following growing rev order |
|
1335 | # this works since we traverse following growing rev order | |
1335 | if any((x.obsolete() or (x.rev() in unstable)) |
|
1336 | for p in pfunc(r): | |
1336 | for x in ctx.parents()): |
|
1337 | if p in obsolete or p in unstable: | |
1337 |
unstable.add(r |
|
1338 | unstable.add(r) | |
|
1339 | break | |||
1338 | return unstable |
|
1340 | return unstable | |
1339 |
|
1341 | |||
1340 | @cachefor('suspended') |
|
1342 | @cachefor('suspended') |
General Comments 0
You need to be logged in to leave comments.
Login now