Package: mercurial Version: 2.2.2-2 Severity: important Tags: patch During a merge conflict, vimdiff is very likely to be picked as the default mergetool.
This have two majors issues 1) People tends to panic and just quit vimdiff. Vimdiff exit with a 0 returns code and Mercurial see the conflict as resolved when nothing have been done. Ignoring change from on side of the merge. We configure vimdiff with vimdiff.check=changed to detect this situation. If the file did not changed we ask the user if the conflict have been resolve. 2) People tends to not know whats going on and how to get out of vimdiff. We configure vimdiff so display a message when launched hg merge conflict, type ":cq" to abort vimdiff As a bonus it teach people the ":cq" command that quit vimdiff with a non-zero exit code. Informing Mercurial that the conflict is unresolved. The previous configuration led to multiple and regular data loss. I would like this config to be backported in wheezy. Here is the patch to apply to mergetool.rc --- /etc/mercurial/hgrc.d/mergetools.rc 2011-09-12 22:38:01.000000000 +0200 +++ /tmp/mergetools.hgrc 2013-02-22 12:01:19.628259820 +0100 @@ -15,7 +15,8 @@ gvimdiff.regname=path gvimdiff.priority=-9 -vimdiff.args=$local $other $base +vimdiff.args=$local $other $base -c 'echohl WarningMsg | echo "merge conflict detected, type \":cq\" to abort" | echohl' +vimdiff.check=changed vimdiff.priority=-10 merge.checkconflicts=True -- System Information: Debian Release: 6.0.6 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/16 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -- Pierre-Yves David http://www.logilab.fr/
signature.asc
Description: Digital signature