merge: remove "case" comments
The comments introduced in
f05c182430a0 seems important ... but the context has
apparently been lost and they do not have any value now.
merge: merge file flags together with file content
The 'x' flag and the 'l' flag are very different. It is usually not a problem
to change the 'x' flag of a normal file independent of the content, but one
does not simply change the type of a file to 'l' independent of the content.
This removes the fmerge function that merged both 'x' and 'l' independent of
content early in the merge process. This correctly introduces some conflicts
instead of silent incorrect merges. 3-way flag merge will now be done in the
resolve process, right next to file content merge. Conflicts can thus be
resolved with (slightly inconvenient) resolve commands like 'resolve f --tool
internal:other'. It thus brings us closer to be able to re-solve manifest merge
after the merge and avoid prompts during merge.
This also removes the "conflicting flags for a - (n)one, e(x)ec or sym(l)ink?"
prompt that nobody could answer and that made it easy to mix symlink targets
and file contents up. Instead it will give a file merge where a sufficiently
clever merge tool can help resolving the issue.
tests: better test coverage of merges of flags
This makes existing problems with merges of symlinks and files more obvious and
add test coverage for tricky merges without real common ancestors.
merge: remove old pre-audit code checking for absolute paths
Audit will handle this in a more elegant way.
merge: drop reference to file contents immediately after write
Like
7d2aaeea67ed this reduces memory usage on large merges.
merge: changing the mode of a file is also an update
It was a change in the file system that wasn't reported in the summaries.
merge: use util.unlinkpath for removing moved files
- more like how removed files are removed.
merge: remove redundant unlink after merge
The early prescan for move/remove and removal of moved files in applyupdates
was introduced with mergestate
368a4ec603cc and rendered this chunk of code
irrelevant.
The impact of the chunk was reduced in
5b3383ea67d2 - but it could have been
removed completely.
merge: consistently use "x" instead of 'x' for internal action types
This makes it simpler to search for places where the action types are handled.