Show More
@@ -1286,8 +1286,29 b' def applyupdates(repo, actions, wctx, mc' | |||||
1286 | removed += msremoved |
|
1286 | removed += msremoved | |
1287 |
|
1287 | |||
1288 | extraactions = ms.actions() |
|
1288 | extraactions = ms.actions() | |
1289 | for k, acts in extraactions.iteritems(): |
|
1289 | if extraactions: | |
1290 | actions[k].extend(acts) |
|
1290 | mfiles = set(a[0] for a in actions['m']) | |
|
1291 | for k, acts in extraactions.iteritems(): | |||
|
1292 | actions[k].extend(acts) | |||
|
1293 | # Remove these files from actions['m'] as well. This is important | |||
|
1294 | # because in recordupdates, files in actions['m'] are processed | |||
|
1295 | # after files in other actions, and the merge driver might add | |||
|
1296 | # files to those actions via extraactions above. This can lead to a | |||
|
1297 | # file being recorded twice, with poor results. This is especially | |||
|
1298 | # problematic for actions['r'] (currently only possible with the | |||
|
1299 | # merge driver in the initial merge process; interrupted merges | |||
|
1300 | # don't go through this flow). | |||
|
1301 | # | |||
|
1302 | # The real fix here is to have indexes by both file and action so | |||
|
1303 | # that when the action for a file is changed it is automatically | |||
|
1304 | # reflected in the other action lists. But that involves a more | |||
|
1305 | # complex data structure, so this will do for now. | |||
|
1306 | # | |||
|
1307 | # We don't need to do the same operation for 'dc' and 'cd' because | |||
|
1308 | # those lists aren't consulted again. | |||
|
1309 | mfiles.difference_update(a[0] for a in acts) | |||
|
1310 | ||||
|
1311 | actions['m'] = [a for a in actions['m'] if a[0] in mfiles] | |||
1291 |
|
1312 | |||
1292 | progress(_updating, None, total=numupdates, unit=_files) |
|
1313 | progress(_updating, None, total=numupdates, unit=_files) | |
1293 |
|
1314 |
General Comments 0
You need to be logged in to leave comments.
Login now