MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / _compare

Function _compare

scripts/test-impact/profile_text_parser.py:206–219  ·  view source on GitHub ↗
(left, right, gate)

Source from the content-addressed store, hash-verified

204
205
206def _compare(left, right, gate):
207 common = min(len(left.raw_name), len(right.raw_name))
208 for index in range(common):
209 gate.step()
210 a = left.raw_name[index]
211 b = right.raw_name[index]
212 if a != b:
213 return -1 if a < b else 1
214 gate.step()
215 if len(left.raw_name) != len(right.raw_name):
216 return -1 if len(left.raw_name) < len(right.raw_name) else 1
217 if left.function_hash == right.function_hash:
218 return 0
219 return -1 if left.function_hash < right.function_hash else 1
220
221
222def _merge(source, target, start, middle, end, gate):

Callers 2

_mergeFunction · 0.85
_sorted_uniqueFunction · 0.85

Calls 2

rangeFunction · 0.85
stepMethod · 0.45

Tested by

no test coverage detected