MCPcopy Create free account
hub / github.com/apache/solr / dedupe_entries

Function dedupe_entries

dev-tools/scripts/addDepsToChanges.py:211–223  ·  view source on GitHub ↗

De-duplicate dependency update entries (newest first input) by dep_key. Keeps the first occurrence for each dependency key.

(entries)

Source from the content-addressed store, hash-verified

209
210
211def dedupe_entries(entries):
212 """
213 De-duplicate dependency update entries (newest first input) by dep_key.
214 Keeps the first occurrence for each dependency key.
215 """
216 seen = set()
217 result = []
218 for e in entries:
219 key = e.dep_key().lower()
220 if key not in seen:
221 seen.add(key)
222 result.append(e)
223 return result
224
225
226def sort_entries(entries):

Callers 1

mainFunction · 0.85

Calls 4

dep_keyMethod · 0.80
addMethod · 0.65
appendMethod · 0.65
setFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…