Show More
@@ -133,6 +133,10 b' def findcopies(repo, m1, m2, limit):' | |||
|
133 | 133 | Find moves and copies between m1 and m2 back to limit linkrev |
|
134 | 134 | """ |
|
135 | 135 | |
|
136 | # avoid silly behavior for update from empty dir | |
|
137 | if not m1: | |
|
138 | return {} | |
|
139 | ||
|
136 | 140 | dcopies = repo.dirstate.copies() |
|
137 | 141 | copy = {} |
|
138 | 142 | match = {} |
@@ -167,7 +171,12 b' def findcopies(repo, m1, m2, limit):' | |||
|
167 | 171 | |
|
168 | 172 | return copy |
|
169 | 173 | |
|
170 | def manifestmerge(ui, m1, m2, ma, overwrite, backwards, partial): | |
|
174 | def filtermanifest(man, partial): | |
|
175 | if partial: | |
|
176 | for k in man.keys(): | |
|
177 | if not partial(k): del man[k] | |
|
178 | ||
|
179 | def manifestmerge(ui, m1, m2, ma, overwrite, backwards): | |
|
171 | 180 | """ |
|
172 | 181 | Merge manifest m1 with m2 using ancestor ma and generate merge action list |
|
173 | 182 | """ |
@@ -183,13 +192,6 b' def manifestmerge(ui, m1, m2, ma, overwr' | |||
|
183 | 192 | ui.debug(" %s: %s -> %s\n" % (f, msg, m)) |
|
184 | 193 | action.append((f, m) + args) |
|
185 | 194 | |
|
186 | # Filter manifests | |
|
187 | if partial: | |
|
188 | for f in m1.keys(): | |
|
189 | if not partial(f): del m1[f] | |
|
190 | for f in m2.keys(): | |
|
191 | if not partial(f): del m2[f] | |
|
192 | ||
|
193 | 195 | # Compare manifests |
|
194 | 196 | for f, n in m1.iteritems(): |
|
195 | 197 | if f in m2: |
@@ -356,19 +358,20 b' def update(repo, node, branchmerge=False' | |||
|
356 | 358 | (short(p1), short(p2), short(pa))) |
|
357 | 359 | |
|
358 | 360 | action = [] |
|
359 | ||
|
360 | 361 | copy = {} |
|
361 | if not (backwards or overwrite): | |
|
362 | copy = findcopies(repo, m1, m2, repo.changelog.rev(pa)) | |
|
363 | 362 | |
|
364 | 363 | m1 = workingmanifest(repo, m1, status) |
|
364 | filtermanifest(m1, partial) | |
|
365 | filtermanifest(m2, partial) | |
|
365 | 366 | |
|
366 | 367 | if not force: |
|
367 | 368 | checkunknown(repo, m2, status) |
|
368 | 369 | if not branchmerge: |
|
369 | 370 | action += forgetremoved(m2, status) |
|
371 | if not (backwards or overwrite): | |
|
372 | copy = findcopies(repo, m1, m2, repo.changelog.rev(pa)) | |
|
370 | 373 | |
|
371 |
action += manifestmerge(repo.ui, m1, m2, ma, overwrite, backwards |
|
|
374 | action += manifestmerge(repo.ui, m1, m2, ma, overwrite, backwards) | |
|
372 | 375 | del m1, m2, ma |
|
373 | 376 | |
|
374 | 377 | ### apply phase |
General Comments 0
You need to be logged in to leave comments.
Login now