Skip to content
Snippets Groups Projects
Commit 28445179 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

obsolete: stop doing membership test on list

According to the Surgeon General, computer should not use list for membership
testing because of the risk of being slow.
parent cb466830
Branches
Tags
No related merge requests found
......@@ -267,7 +267,8 @@
Return the number of new marker."""
if not _enabled:
raise util.Abort('obsolete feature is not enabled on this repo')
new = [m for m in markers if m not in self._all]
known = set(self._all)
new = [m for m in markers if m not in known]
if new:
f = self.sopener('obsstore', 'ab')
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment