diff tests/test-merge-symlinks @ 5391:786c1206a029

Test *_ISLINK merge environment vars
author Patrick Mezard <pmezard@gmail.com>
date Fri, 05 Oct 2007 23:01:38 +0200
parents
children 36794dbe66a3
line wrap: on
line diff
new file mode 100755
--- /dev/null
+++ b/tests/test-merge-symlinks
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+"$TESTDIR/hghave" symlink || exit 80
+
+cat > echo.py <<EOF
+#!/usr/bin/env python
+import os
+for k in ('HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
+    print k, os.environ[k]
+EOF
+chmod +x echo.py
+
+# Create 2 heads containing the same file, once as
+# a file, once as a link.
+echo % create heads
+hg init t
+cd t
+echo a > a
+hg ci -qAm t0
+echo l > l
+hg ci -qAm t1
+hg up -C 0
+ln -s a l
+hg ci -qAm t2
+
+# Merge them and display *_ISLINK vars
+echo % merge heads
+HGMERGE=../echo.py hg merge