##// END OF EJS Templates
merge: fix quadratic behavior in find-copies
Matt Mackall -
r4350:8aee687f default
parent child Browse files
Show More
@@ -105,10 +105,15 b' def findcopies(repo, m1, m2, ma, limit):'
105 def findold(fctx):
105 def findold(fctx):
106 "find files that path was copied from, back to linkrev limit"
106 "find files that path was copied from, back to linkrev limit"
107 old = {}
107 old = {}
108 seen = {}
108 orig = fctx.path()
109 orig = fctx.path()
109 visit = [fctx]
110 visit = [fctx]
110 while visit:
111 while visit:
111 fc = visit.pop()
112 fc = visit.pop()
113 s = str(fc)
114 if s in seen:
115 continue
116 seen[s] = 1
112 if fc.path() != orig and fc.path() not in old:
117 if fc.path() != orig and fc.path() not in old:
113 old[fc.path()] = 1
118 old[fc.path()] = 1
114 if fc.rev() < limit:
119 if fc.rev() < limit:
General Comments 0
You need to be logged in to leave comments. Login now