diff tests/test-merge-tools.t @ 30538:c2154979409d

merge: use original file extension for temporary files Some merge tools (like Araxis?) can pick merge mode based on the file extension. That didn't work well when temporary files were given random suffixes. It seems to work better when the random part is before the extension. As usual, when using $output, $local will have the .orig extension. That could perhaps be the subject of another change another day.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 23 Nov 2016 23:47:38 +0100
parents ce3a133f71b3
children 7d4ce4b567c5
line wrap: on
line diff
--- a/tests/test-merge-tools.t	Sat Nov 26 09:14:41 2016 -0800
+++ b/tests/test-merge-tools.t	Wed Nov 23 23:47:38 2016 +0100
@@ -1209,3 +1209,15 @@
   [1]
 
 #endif
+
+Verify naming of temporary files and that extension is preserved:
+
+  $ hg update -q -C 1
+  $ hg mv f f.txt
+  $ hg ci -qm "f.txt"
+  $ hg update -q -C 2
+  $ hg merge -y -r tip --tool echo --config merge-tools.echo.args='$base $local $other $output'
+  merging f and f.txt to f.txt
+  */f~base.?????? $TESTTMP/f.txt.orig */f~other.??????.txt $TESTTMP/f.txt (glob)
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)