##// END OF EJS Templates
obsolete: always return frozensets from obsolete.getrevs()...
av6 -
r49572:994fa23a default draft
parent child Browse files
Show More
@@ -940,8 +940,7 b' def _computeobsoleteset(repo):'
940 getnode = repo.changelog.node
940 getnode = repo.changelog.node
941 notpublic = _mutablerevs(repo)
941 notpublic = _mutablerevs(repo)
942 isobs = repo.obsstore.successors.__contains__
942 isobs = repo.obsstore.successors.__contains__
943 obs = {r for r in notpublic if isobs(getnode(r))}
943 return frozenset(r for r in notpublic if isobs(getnode(r)))
944 return obs
945
944
946
945
947 @cachefor(b'orphan')
946 @cachefor(b'orphan')
@@ -959,14 +958,14 b' def _computeorphanset(repo):'
959 if p in obsolete or p in unstable:
958 if p in obsolete or p in unstable:
960 unstable.add(r)
959 unstable.add(r)
961 break
960 break
962 return unstable
961 return frozenset(unstable)
963
962
964
963
965 @cachefor(b'suspended')
964 @cachefor(b'suspended')
966 def _computesuspendedset(repo):
965 def _computesuspendedset(repo):
967 """the set of obsolete parents with non obsolete descendants"""
966 """the set of obsolete parents with non obsolete descendants"""
968 suspended = repo.changelog.ancestors(getrevs(repo, b'orphan'))
967 suspended = repo.changelog.ancestors(getrevs(repo, b'orphan'))
969 return {r for r in getrevs(repo, b'obsolete') if r in suspended}
968 return frozenset(r for r in getrevs(repo, b'obsolete') if r in suspended)
970
969
971
970
972 @cachefor(b'extinct')
971 @cachefor(b'extinct')
@@ -998,7 +997,7 b' def _computephasedivergentset(repo):'
998 # we have a public predecessor
997 # we have a public predecessor
999 bumped.add(rev)
998 bumped.add(rev)
1000 break # Next draft!
999 break # Next draft!
1001 return bumped
1000 return frozenset(bumped)
1002
1001
1003
1002
1004 @cachefor(b'contentdivergent')
1003 @cachefor(b'contentdivergent')
@@ -1025,7 +1024,7 b' def _computecontentdivergentset(repo):'
1025 divergent.add(rev)
1024 divergent.add(rev)
1026 break
1025 break
1027 toprocess.update(obsstore.predecessors.get(prec, ()))
1026 toprocess.update(obsstore.predecessors.get(prec, ()))
1028 return divergent
1027 return frozenset(divergent)
1029
1028
1030
1029
1031 def makefoldid(relation, user):
1030 def makefoldid(relation, user):
General Comments 0
You need to be logged in to leave comments. Login now