Mercurial > hg
comparison mercurial/merge.py @ 3728:a32b4b930079
merge: remove unused match logic from findcopies
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 30 Nov 2006 17:36:33 -0600 |
parents | 0fb66912040a |
children | 581d20773326 |
comparison
equal
deleted
inserted
replaced
3727:0fb66912040a | 3728:a32b4b930079 |
---|---|
128 if not m1: | 128 if not m1: |
129 return {} | 129 return {} |
130 | 130 |
131 dcopies = repo.dirstate.copies() | 131 dcopies = repo.dirstate.copies() |
132 copy = {} | 132 copy = {} |
133 match = {} | |
134 u1 = nonoverlap(m1, m2, ma) | 133 u1 = nonoverlap(m1, m2, ma) |
135 u2 = nonoverlap(m2, m1, ma) | 134 u2 = nonoverlap(m2, m1, ma) |
136 ctx = util.cachefunc(lambda f, n: repo.filectx(f, fileid=n[:20])) | 135 ctx = util.cachefunc(lambda f, n: repo.filectx(f, fileid=n[:20])) |
137 | 136 |
138 def checkpair(c, f2, man): | 137 def checkpair(c, f2, man): |
148 for f in u1: | 147 for f in u1: |
149 c = ctx(dcopies.get(f, f), m1[f]) | 148 c = ctx(dcopies.get(f, f), m1[f]) |
150 for of in findold(c, limit): | 149 for of in findold(c, limit): |
151 if of in m2: | 150 if of in m2: |
152 checkpair(c, of, m2) | 151 checkpair(c, of, m2) |
153 else: | |
154 match.setdefault(of, []).append(f) | |
155 | 152 |
156 for f in u2: | 153 for f in u2: |
157 c = ctx(f, m2[f]) | 154 c = ctx(f, m2[f]) |
158 for of in findold(c, limit): | 155 for of in findold(c, limit): |
159 if of in m1: | 156 if of in m1: |
160 checkpair(c, of, m1) | 157 checkpair(c, of, m1) |
161 elif of in match: | |
162 for mf in match[of]: | |
163 checkpair(c, mf, m1) | |
164 | 158 |
165 return copy | 159 return copy |
166 | 160 |
167 def manifestmerge(repo, p1, p2, pa, overwrite, partial): | 161 def manifestmerge(repo, p1, p2, pa, overwrite, partial): |
168 """ | 162 """ |