973 del actions[f] # don't get = keep local deleted |
973 del actions[f] # don't get = keep local deleted |
974 |
974 |
975 def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, |
975 def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, |
976 acceptremote, followcopies, matcher=None, |
976 acceptremote, followcopies, matcher=None, |
977 mergeforce=False): |
977 mergeforce=False): |
978 "Calculate the actions needed to merge mctx into wctx using ancestors" |
978 """Calculate the actions needed to merge mctx into wctx using ancestors""" |
|
979 # Avoid cycle. |
|
980 from . import sparse |
|
981 |
979 if len(ancestors) == 1: # default |
982 if len(ancestors) == 1: # default |
980 actions, diverge, renamedelete = manifestmerge( |
983 actions, diverge, renamedelete = manifestmerge( |
981 repo, wctx, mctx, ancestors[0], branchmerge, force, matcher, |
984 repo, wctx, mctx, ancestors[0], branchmerge, force, matcher, |
982 acceptremote, followcopies) |
985 acceptremote, followcopies) |
983 _checkunknownfiles(repo, wctx, mctx, force, actions, mergeforce) |
986 _checkunknownfiles(repo, wctx, mctx, force, actions, mergeforce) |
1072 |
1075 |
1073 if wctx.rev() is None: |
1076 if wctx.rev() is None: |
1074 fractions = _forgetremoved(wctx, mctx, branchmerge) |
1077 fractions = _forgetremoved(wctx, mctx, branchmerge) |
1075 actions.update(fractions) |
1078 actions.update(fractions) |
1076 |
1079 |
1077 return actions, diverge, renamedelete |
1080 prunedactions = sparse.filterupdatesactions(repo, wctx, mctx, branchmerge, |
|
1081 actions) |
|
1082 |
|
1083 return prunedactions, diverge, renamedelete |
1078 |
1084 |
1079 def batchremove(repo, wctx, actions): |
1085 def batchremove(repo, wctx, actions): |
1080 """apply removes to the working directory |
1086 """apply removes to the working directory |
1081 |
1087 |
1082 yields tuples for progress updates |
1088 yields tuples for progress updates |