comparison 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
comparison
equal deleted inserted replaced
5390:36c46e20976a 5391:786c1206a029
1 #!/bin/sh
2
3 "$TESTDIR/hghave" symlink || exit 80
4
5 cat > echo.py <<EOF
6 #!/usr/bin/env python
7 import os
8 for k in ('HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
9 print k, os.environ[k]
10 EOF
11 chmod +x echo.py
12
13 # Create 2 heads containing the same file, once as
14 # a file, once as a link.
15 echo % create heads
16 hg init t
17 cd t
18 echo a > a
19 hg ci -qAm t0
20 echo l > l
21 hg ci -qAm t1
22 hg up -C 0
23 ln -s a l
24 hg ci -qAm t2
25
26 # Merge them and display *_ISLINK vars
27 echo % merge heads
28 HGMERGE=../echo.py hg merge