equal
deleted
inserted
replaced
103 """ |
103 """ |
104 |
104 |
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: |
115 continue |
120 continue |
116 visit += fc.parents() |
121 visit += fc.parents() |