mercurial/merge.py
changeset 4354 8aee687f0214
parent 4311 4787e2b0dd03
child 4356 10edaed7f909
child 4397 c04c96504a12
equal deleted inserted replaced
4348:b633f470944e 4354:8aee687f0214
   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()