--- a/tests/test-record.t Sun Jun 10 13:01:40 2012 +0200
+++ b/tests/test-record.t Sun Jun 10 14:14:05 2012 +0200
@@ -772,6 +772,8 @@
+a
+#if execbit
+
Preserve chmod +x
$ chmod +x f1
@@ -885,8 +887,120 @@
+c
+#else
+
+Slightly bogus tests to get almost same repo structure as when x bit is used
+- but with different hashes.
+
+Mock "Preserve chmod +x"
+
+ $ echo a >> f1
+ $ hg record -d '20 0' -mz <<EOF
+ > y
+ > y
+ > y
+ > EOF
+ diff --git a/subdir/f1 b/subdir/f1
+ 1 hunks, 1 lines changed
+ examine changes to 'subdir/f1'? [Ynesfdaq?]
+ @@ -1,2 +1,3 @@
+ a
+ a
+ +a
+ record this change to 'subdir/f1'? [Ynesfdaq?]
+
+ $ hg tip --config diff.git=True -p
+ changeset: 22:0d463bd428f5
+ tag: tip
+ user: test
+ date: Thu Jan 01 00:00:20 1970 +0000
+ summary: z
+
+ diff --git a/subdir/f1 b/subdir/f1
+ --- a/subdir/f1
+ +++ b/subdir/f1
+ @@ -1,2 +1,3 @@
+ a
+ a
+ +a
+
+
+Mock "Preserve execute permission on original"
+
+ $ echo b >> f1
+ $ hg record -d '21 0' -maa <<EOF
+ > y
+ > y
+ > y
+ > EOF
+ diff --git a/subdir/f1 b/subdir/f1
+ 1 hunks, 1 lines changed
+ examine changes to 'subdir/f1'? [Ynesfdaq?]
+ @@ -1,3 +1,4 @@
+ a
+ a
+ a
+ +b
+ record this change to 'subdir/f1'? [Ynesfdaq?]
+
+ $ hg tip --config diff.git=True -p
+ changeset: 23:0eab41a3e524
+ tag: tip
+ user: test
+ date: Thu Jan 01 00:00:21 1970 +0000
+ summary: aa
+
+ diff --git a/subdir/f1 b/subdir/f1
+ --- a/subdir/f1
+ +++ b/subdir/f1
+ @@ -1,3 +1,4 @@
+ a
+ a
+ a
+ +b
+
+
+Mock "Preserve chmod -x"
+
+ $ chmod -x f1
+ $ echo c >> f1
+ $ hg record -d '22 0' -mab <<EOF
+ > y
+ > y
+ > y
+ > EOF
+ diff --git a/subdir/f1 b/subdir/f1
+ 1 hunks, 1 lines changed
+ examine changes to 'subdir/f1'? [Ynesfdaq?]
+ @@ -2,3 +2,4 @@
+ a
+ a
+ b
+ +c
+ record this change to 'subdir/f1'? [Ynesfdaq?]
+
+ $ hg tip --config diff.git=True -p
+ changeset: 24:f4f718f27b7c
+ tag: tip
+ user: test
+ date: Thu Jan 01 00:00:22 1970 +0000
+ summary: ab
+
+ diff --git a/subdir/f1 b/subdir/f1
+ --- a/subdir/f1
+ +++ b/subdir/f1
+ @@ -2,3 +2,4 @@
+ a
+ a
+ b
+ +c
+
+
+#endif
+
$ cd ..
+
Abort early when a merge is in progress
$ hg up 4
@@ -1096,13 +1210,13 @@
record this change to 'subdir/f1'? [Ynesfdaq?]
$ hg tip -p
- changeset: 28:287ad1f41a72
+ changeset: 28:* (glob)
tag: tip
user: test
date: Thu Jan 01 00:00:24 1970 +0000
summary: w1
- diff -r 65ce23a81197 -r 287ad1f41a72 subdir/f1
+ diff -r ???????????? -r ???????????? subdir/f1 (glob)
--- a/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
+++ b/subdir/f1 Thu Jan 01 00:00:24 1970 +0000
@@ -3,3 +3,4 @@