Show More
@@ -959,26 +959,28 b' def manifestmerge(' | |||
|
959 | 959 | return mresult |
|
960 | 960 | |
|
961 | 961 | |
|
962 |
def _resolvetrivial(repo, wctx, mctx, ancestor, |
|
|
962 | def _resolvetrivial(repo, wctx, mctx, ancestor, mresult): | |
|
963 | 963 | """Resolves false conflicts where the nodeid changed but the content |
|
964 | 964 | remained the same.""" |
|
965 | 965 | # We force a copy of actions.items() because we're going to mutate |
|
966 | 966 | # actions as we resolve trivial conflicts. |
|
967 | for f, (m, args, msg) in list(actions.items()): | |
|
967 | for f, (m, args, msg) in list(mresult.actions.items()): | |
|
968 | 968 | if ( |
|
969 | 969 | m == mergestatemod.ACTION_CHANGED_DELETED |
|
970 | 970 | and f in ancestor |
|
971 | 971 | and not wctx[f].cmp(ancestor[f]) |
|
972 | 972 | ): |
|
973 | 973 | # local did change but ended up with same content |
|
974 | actions[f] = mergestatemod.ACTION_REMOVE, None, b'prompt same' | |
|
974 | mresult.addfile( | |
|
975 | f, mergestatemod.ACTION_REMOVE, None, b'prompt same' | |
|
976 | ) | |
|
975 | 977 | elif ( |
|
976 | 978 | m == mergestatemod.ACTION_DELETED_CHANGED |
|
977 | 979 | and f in ancestor |
|
978 | 980 | and not mctx[f].cmp(ancestor[f]) |
|
979 | 981 | ): |
|
980 | 982 | # remote did change but ended up with same content |
|
981 |
|
|
|
983 | mresult.removefile(f) # don't get = keep local deleted | |
|
982 | 984 | |
|
983 | 985 | |
|
984 | 986 | def calculateupdates( |
@@ -1127,7 +1129,7 b' def calculateupdates(' | |||
|
1127 | 1129 | prunedactions = sparse.filterupdatesactions( |
|
1128 | 1130 | repo, wctx, mctx, branchmerge, mresult.actions |
|
1129 | 1131 | ) |
|
1130 |
_resolvetrivial(repo, wctx, mctx, ancestors[0], mresult |
|
|
1132 | _resolvetrivial(repo, wctx, mctx, ancestors[0], mresult) | |
|
1131 | 1133 | |
|
1132 | 1134 | mresult.setactions(prunedactions) |
|
1133 | 1135 | return mresult |
General Comments 0
You need to be logged in to leave comments.
Login now