annotate tests/test-diff-upgrade.t @ 15660:c7b0bedbb07a

merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 15 Dec 2011 16:50:21 -0600
parents db0340f4b507
children f0d55e1b4855
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15442
db0340f4b507 tests: use 'hghave execbit' for tests that manipulate x bit in file system
Mads Kiilerich <mads@kiilerich.com>
parents: 12577
diff changeset
1 $ "$TESTDIR/hghave" execbit || exit 80
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
2
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
3 $ echo "[extensions]" >> $HGRCPATH
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
4 $ echo "autodiff=$TESTDIR/autodiff.py" >> $HGRCPATH
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
5 $ echo "[diff]" >> $HGRCPATH
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
6 $ echo "nodates=1" >> $HGRCPATH
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
7
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
8 $ hg init repo
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
9 $ cd repo
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
10
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
11
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
12
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
13 make a combination of new, changed and deleted file
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
14
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
15 $ echo regular > regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
16 $ echo rmregular > rmregular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
17 $ python -c "file('bintoregular', 'wb').write('\0')"
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
18 $ touch rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
19 $ echo exec > exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
20 $ chmod +x exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
21 $ echo rmexec > rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
22 $ chmod +x rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
23 $ echo setexec > setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
24 $ echo unsetexec > unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
25 $ chmod +x unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
26 $ echo binary > binary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
27 $ python -c "file('rmbinary', 'wb').write('\0')"
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
28 $ hg ci -Am addfiles
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
29 adding binary
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
30 adding bintoregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
31 adding exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
32 adding regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
33 adding rmbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
34 adding rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
35 adding rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
36 adding rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
37 adding setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
38 adding unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
39 $ echo regular >> regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
40 $ echo newregular >> newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
41 $ rm rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
42 $ touch newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
43 $ rm rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
44 $ echo exec >> exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
45 $ echo newexec > newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
46 $ echo bintoregular > bintoregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
47 $ chmod +x newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
48 $ rm rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
49 $ chmod +x setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
50 $ chmod -x unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
51 $ python -c "file('binary', 'wb').write('\0\0')"
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
52 $ python -c "file('newbinary', 'wb').write('\0')"
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
53 $ rm rmbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
54 $ hg addremove -s 0
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
55 adding newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
56 adding newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
57 adding newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
58 adding newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
59 removing rmbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
60 removing rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
61 removing rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
62 removing rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
63
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
64 git=no: regular diff for all files
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
65
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
66 $ hg autodiff --git=no
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
67 diff -r a66d19b9302d binary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
68 Binary file binary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
69 diff -r a66d19b9302d bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
70 Binary file bintoregular has changed
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
71 diff -r a66d19b9302d exec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
72 --- a/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
73 +++ b/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
74 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
75 exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
76 +exec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
77 diff -r a66d19b9302d newbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
78 Binary file newbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
79 diff -r a66d19b9302d newexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
80 --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
81 +++ b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
82 @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
83 +newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
84 diff -r a66d19b9302d newregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
85 --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
86 +++ b/newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
87 @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
88 +newregular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
89 diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
90 --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
91 +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
92 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
93 regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
94 +regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
95 diff -r a66d19b9302d rmbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
96 Binary file rmbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
97 diff -r a66d19b9302d rmexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
98 --- a/rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
99 +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
100 @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
101 -rmexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
102 diff -r a66d19b9302d rmregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
103 --- a/rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
104 +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
105 @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
106 -rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
107
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
108 git=yes: git diff for single regular file
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
109
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
110 $ hg autodiff --git=yes regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
111 diff --git a/regular b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
112 --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
113 +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
114 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
115 regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
116 +regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
117
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
118 git=auto: regular diff for regular files and non-binary removals
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
119
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
120 $ hg autodiff --git=auto regular newregular rmregular rmexec
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
121 diff -r a66d19b9302d newregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
122 --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
123 +++ b/newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
124 @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
125 +newregular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
126 diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
127 --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
128 +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
129 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
130 regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
131 +regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
132 diff -r a66d19b9302d rmexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
133 --- a/rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
134 +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
135 @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
136 -rmexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
137 diff -r a66d19b9302d rmregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
138 --- a/rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
139 +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
140 @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
141 -rmregular
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
142
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
143 $ for f in exec newexec setexec unsetexec binary newbinary newempty rmempty rmbinary bintoregular; do
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
144 > echo
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
145 > echo '% git=auto: git diff for' $f
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
146 > hg autodiff --git=auto $f
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
147 > done
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
148
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
149 % git=auto: git diff for exec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
150 diff -r a66d19b9302d exec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
151 --- a/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
152 +++ b/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
153 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
154 exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
155 +exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
156
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
157 % git=auto: git diff for newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
158 diff --git a/newexec b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
159 new file mode 100755
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
160 --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
161 +++ b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
162 @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
163 +newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
164
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
165 % git=auto: git diff for setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
166 diff --git a/setexec b/setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
167 old mode 100644
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
168 new mode 100755
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
169
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
170 % git=auto: git diff for unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
171 diff --git a/unsetexec b/unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
172 old mode 100755
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
173 new mode 100644
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
174
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
175 % git=auto: git diff for binary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
176 diff --git a/binary b/binary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
177 index a9128c283485202893f5af379dd9beccb6e79486..09f370e38f498a462e1ca0faa724559b6630c04f
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
178 GIT binary patch
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
179 literal 2
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
180 Jc${Nk0000200961
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
181
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
182
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
183 % git=auto: git diff for newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
184 diff --git a/newbinary b/newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
185 new file mode 100644
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
186 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
187 GIT binary patch
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
188 literal 1
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
189 Ic${MZ000310RR91
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
190
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
191
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
192 % git=auto: git diff for newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
193 diff --git a/newempty b/newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
194 new file mode 100644
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
195
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
196 % git=auto: git diff for rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
197 diff --git a/rmempty b/rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
198 deleted file mode 100644
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
199
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
200 % git=auto: git diff for rmbinary
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
201 diff --git a/rmbinary b/rmbinary
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
202 deleted file mode 100644
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
203 Binary file rmbinary has changed
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
204
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
205 % git=auto: git diff for bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
206 diff --git a/bintoregular b/bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
207 index f76dd238ade08917e6712764a16a22005a50573d..9c42f2b6427d8bf034b7bc23986152dc01bfd3ab
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
208 GIT binary patch
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
209 literal 13
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
210 Uc$`bh%qz(+N=+}#Ni5<5043uE82|tP
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
211
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
212
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
213 git=warn: regular diff with data loss warnings
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
214
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
215 $ hg autodiff --git=warn
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
216 diff -r a66d19b9302d binary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
217 Binary file binary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
218 diff -r a66d19b9302d bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
219 Binary file bintoregular has changed
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
220 diff -r a66d19b9302d exec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
221 --- a/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
222 +++ b/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
223 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
224 exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
225 +exec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
226 diff -r a66d19b9302d newbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
227 Binary file newbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
228 diff -r a66d19b9302d newexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
229 --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
230 +++ b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
231 @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
232 +newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
233 diff -r a66d19b9302d newregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
234 --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
235 +++ b/newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
236 @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
237 +newregular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
238 diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
239 --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
240 +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
241 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
242 regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
243 +regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
244 diff -r a66d19b9302d rmbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
245 Binary file rmbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
246 diff -r a66d19b9302d rmexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
247 --- a/rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
248 +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
249 @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
250 -rmexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
251 diff -r a66d19b9302d rmregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
252 --- a/rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
253 +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
254 @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
255 -rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
256 data lost for: binary
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
257 data lost for: bintoregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
258 data lost for: newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
259 data lost for: newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
260 data lost for: newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
261 data lost for: rmbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
262 data lost for: rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
263 data lost for: setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
264 data lost for: unsetexec
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
265
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
266 git=abort: fail on execute bit change
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
267
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
268 $ hg autodiff --git=abort regular setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
269 abort: losing data for setexec
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12149
diff changeset
270 [255]
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
271
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
272 git=abort: succeed on regular file
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
273
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
274 $ hg autodiff --git=abort regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
275 diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
276 --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
277 +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
278 @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
279 regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
280 +regular
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
281
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
282 $ cd ..
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
283