##// END OF EJS Templates
branchmap: make "closed" a set from beginning instead of converting from list...
Martin von Zweigbergk -
r44086:5cdc3c12 default
parent child Browse files
Show More
@@ -107,14 +107,14 b' class BranchMapCache(object):'
107 clrev = cl.rev
107 clrev = cl.rev
108 clbranchinfo = cl.branchinfo
108 clbranchinfo = cl.branchinfo
109 rbheads = []
109 rbheads = []
110 closed = []
110 closed = set()
111 for bheads in pycompat.itervalues(remotebranchmap):
111 for bheads in pycompat.itervalues(remotebranchmap):
112 rbheads += bheads
112 rbheads += bheads
113 for h in bheads:
113 for h in bheads:
114 r = clrev(h)
114 r = clrev(h)
115 b, c = clbranchinfo(r)
115 b, c = clbranchinfo(r)
116 if c:
116 if c:
117 closed.append(h)
117 closed.add(h)
118
118
119 if rbheads:
119 if rbheads:
120 rtiprev = max((int(clrev(node)) for node in rbheads))
120 rtiprev = max((int(clrev(node)) for node in rbheads))
@@ -122,7 +122,7 b' class BranchMapCache(object):'
122 remotebranchmap,
122 remotebranchmap,
123 repo[rtiprev].node(),
123 repo[rtiprev].node(),
124 rtiprev,
124 rtiprev,
125 closednodes=set(closed),
125 closednodes=closed,
126 )
126 )
127
127
128 # Try to stick it as low as possible
128 # Try to stick it as low as possible
General Comments 0
You need to be logged in to leave comments. Login now