##// END OF EJS Templates
merge: reorganize some hunks in findcopies
Matt Mackall -
r4400:84cd52b4 default
parent child Browse files
Show More
@@ -102,6 +102,12 b' def findcopies(repo, m1, m2, ma, limit):'
102 Find moves and copies between m1 and m2 back to limit linkrev
102 Find moves and copies between m1 and m2 back to limit linkrev
103 """
103 """
104
104
105 def nonoverlap(d1, d2, d3):
106 "Return list of elements in d1 not in d2 or d3"
107 l = [d for d in d1 if d not in d3 and d not in d2]
108 l.sort()
109 return l
110
105 def dirname(f):
111 def dirname(f):
106 s = f.rfind("/")
112 s = f.rfind("/")
107 if s == -1:
113 if s == -1:
@@ -139,11 +145,8 b' def findcopies(repo, m1, m2, ma, limit):'
139 old.sort()
145 old.sort()
140 return old
146 return old
141
147
142 def nonoverlap(d1, d2, d3):
148 copy = {}
143 "Return list of elements in d1 not in d2 or d3"
149 fullcopy = {}
144 l = [d for d in d1 if d not in d3 and d not in d2]
145 l.sort()
146 return l
147
150
148 def checkcopies(c, man):
151 def checkcopies(c, man):
149 '''check possible copies for filectx c'''
152 '''check possible copies for filectx c'''
@@ -169,8 +172,6 b' def findcopies(repo, m1, m2, ma, limit):'
169 return {}
172 return {}
170
173
171 dcopies = repo.dirstate.copies()
174 dcopies = repo.dirstate.copies()
172 copy = {}
173 fullcopy = {}
174 u1 = nonoverlap(m1, m2, ma)
175 u1 = nonoverlap(m1, m2, ma)
175 u2 = nonoverlap(m2, m1, ma)
176 u2 = nonoverlap(m2, m1, ma)
176 ctx = util.cachefunc(lambda f, n: repo.filectx(f, fileid=n[:20]))
177 ctx = util.cachefunc(lambda f, n: repo.filectx(f, fileid=n[:20]))
General Comments 0
You need to be logged in to leave comments. Login now