comparison tests/test-hgweb-diffs.out @ 7309:e74a9173c2d7

hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258) This gets us git diffs when enabled and doesn't pick erratic file parents.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 03 Nov 2008 20:05:03 +0100
parents
children bd522d09d5e3
comparison
equal deleted inserted replaced
7308:b6f5490effbf 7309:e74a9173c2d7
1 % setting up repo
2 adding a
3 adding b
4 % change permissions for git diffs
5 % set up hgweb
6 % revision
7 200 Script output follows
8
9 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
10 <html>
11 <head>
12 <link rel="icon" href="/static/hgicon.png" type="image/png">
13 <meta name="robots" content="index, nofollow" />
14 <link rel="stylesheet" href="/static/style.css" type="text/css" />
15
16 <title>test: changeset 0cd96de13884</title>
17 </head>
18 <body>
19
20 <div class="buttons">
21 <a href="/log/0">changelog</a>
22 <a href="/shortlog/0">shortlog</a>
23 <a href="/graph">graph</a>
24 <a href="/tags">tags</a>
25 <a href="/file/0cd96de13884">files</a>
26 <a href="/raw-rev/0cd96de13884">raw</a>
27
28 </div>
29
30 <h2>changeset: a</h2>
31
32 <table id="changesetEntry">
33 <tr>
34 <th class="changeset">changeset 0:</th>
35 <td class="changeset"><a href="/rev/0cd96de13884">0cd96de13884</a></td>
36 </tr>
37
38 <tr><th class="child">child 1:</th><td class="child"><a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td></tr>
39
40 <tr>
41 <th class="author">author:</th>
42 <td class="author">&#116;&#101;&#115;&#116;</td>
43 </tr>
44 <tr>
45 <th class="date">date:</th>
46 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td>
47 </tr>
48 <tr>
49 <th class="files">files:</th>
50 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
51 </tr>
52 <tr>
53 <th class="description">description:</th>
54 <td class="description">a</td>
55 </tr>
56 </table>
57
58 <div id="changesetDiff">
59 <pre class="parity0"><span class="minusline"><a class="lineno" href="#l1" id="l1"> 1</a>--- /dev/null Thu Jan 01 00:00:00 1970 +0000
60 </span><span class="plusline"><a class="lineno" href="#l2" id="l2"> 2</a>+++ b/a Thu Jan 01 00:00:00 1970 +0000
61 </span><span class="atline"><a class="lineno" href="#l3" id="l3"> 3</a>@@ -0,0 +1,1 @@
62 </span><span class="plusline"><a class="lineno" href="#l4" id="l4"> 4</a>+a
63 </span></pre><pre class="parity1"><span class="minusline"><a class="lineno" href="#l1.1" id="l1.1"> 1.1</a>--- /dev/null Thu Jan 01 00:00:00 1970 +0000
64 </span><span class="plusline"><a class="lineno" href="#l1.2" id="l1.2"> 1.2</a>+++ b/b Thu Jan 01 00:00:00 1970 +0000
65 </span><span class="atline"><a class="lineno" href="#l1.3" id="l1.3"> 1.3</a>@@ -0,0 +1,1 @@
66 </span><span class="plusline"><a class="lineno" href="#l1.4" id="l1.4"> 1.4</a>+b
67 </span></pre>
68 </div>
69
70
71 <div class="logo">
72 <a href="http://www.selenic.com/mercurial/">
73 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
74 </div>
75
76 </body>
77 </html>
78
79
80
81 % diff removed file
82 200 Script output follows
83
84 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
85 <html>
86 <head>
87 <link rel="icon" href="/static/hgicon.png" type="image/png">
88 <meta name="robots" content="index, nofollow" />
89 <link rel="stylesheet" href="/static/style.css" type="text/css" />
90
91 <title>test: a diff</title>
92 </head>
93 <body>
94
95 <div class="buttons">
96 <a href="/log/1">changelog</a>
97 <a href="/shortlog/1">shortlog</a>
98 <a href="/graph">graph</a>
99 <a href="/tags">tags</a>
100 <a href="/rev/78e4ebad7cdf">changeset</a>
101 <a href="/file/78e4ebad7cdf/a">file</a>
102 <a href="/log/78e4ebad7cdf/a">revisions</a>
103 <a href="/annotate/78e4ebad7cdf/a">annotate</a>
104 <a href="/raw-diff/78e4ebad7cdf/a">raw</a>
105 </div>
106
107 <h2>a</h2>
108
109 <table id="filediffEntry">
110 <tr>
111 <th class="revision">revision 1:</th>
112 <td class="revision"><a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
113 </tr>
114
115
116 </table>
117
118 <div id="fileDiff">
119 <pre class="parity0"><span class="minusline"><a class="lineno" href="#l1" id="l1"> 1</a>--- /dev/null Thu Jan 01 00:00:00 1970 +0000
120 </span><span class="plusline"><a class="lineno" href="#l2" id="l2"> 2</a>+++ b/a Thu Jan 01 00:00:00 1970 +0000
121 </span><span class="atline"><a class="lineno" href="#l3" id="l3"> 3</a>@@ -0,0 +1,1 @@
122 </span><span class="plusline"><a class="lineno" href="#l4" id="l4"> 4</a>+a
123 </span></pre>
124 </div>
125
126
127 <div class="logo">
128 <a href="http://www.selenic.com/mercurial/">
129 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
130 </div>
131
132 </body>
133 </html>
134
135
136
137 % set up hgweb with git diffs
138 % revision
139 200 Script output follows
140
141 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
142 <html>
143 <head>
144 <link rel="icon" href="/static/hgicon.png" type="image/png">
145 <meta name="robots" content="index, nofollow" />
146 <link rel="stylesheet" href="/static/style.css" type="text/css" />
147
148 <title>test: changeset 0cd96de13884</title>
149 </head>
150 <body>
151
152 <div class="buttons">
153 <a href="/log/0">changelog</a>
154 <a href="/shortlog/0">shortlog</a>
155 <a href="/graph">graph</a>
156 <a href="/tags">tags</a>
157 <a href="/file/0cd96de13884">files</a>
158 <a href="/raw-rev/0cd96de13884">raw</a>
159
160 </div>
161
162 <h2>changeset: a</h2>
163
164 <table id="changesetEntry">
165 <tr>
166 <th class="changeset">changeset 0:</th>
167 <td class="changeset"><a href="/rev/0cd96de13884">0cd96de13884</a></td>
168 </tr>
169
170 <tr><th class="child">child 1:</th><td class="child"><a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td></tr>
171
172 <tr>
173 <th class="author">author:</th>
174 <td class="author">&#116;&#101;&#115;&#116;</td>
175 </tr>
176 <tr>
177 <th class="date">date:</th>
178 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td>
179 </tr>
180 <tr>
181 <th class="files">files:</th>
182 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
183 </tr>
184 <tr>
185 <th class="description">description:</th>
186 <td class="description">a</td>
187 </tr>
188 </table>
189
190 <div id="changesetDiff">
191 <pre class="parity0"><a class="lineno" href="#l1" id="l1"> 1</a>new file mode 100644
192 <span class="minusline"><a class="lineno" href="#l2" id="l2"> 2</a>--- /dev/null
193 </span><span class="plusline"><a class="lineno" href="#l3" id="l3"> 3</a>+++ b/a
194 </span><span class="atline"><a class="lineno" href="#l4" id="l4"> 4</a>@@ -0,0 +1,1 @@
195 </span><span class="plusline"><a class="lineno" href="#l5" id="l5"> 5</a>+a
196 </span></pre><pre class="parity1"><a class="lineno" href="#l1.1" id="l1.1"> 1.1</a>new file mode 100644
197 <span class="minusline"><a class="lineno" href="#l1.2" id="l1.2"> 1.2</a>--- /dev/null
198 </span><span class="plusline"><a class="lineno" href="#l1.3" id="l1.3"> 1.3</a>+++ b/b
199 </span><span class="atline"><a class="lineno" href="#l1.4" id="l1.4"> 1.4</a>@@ -0,0 +1,1 @@
200 </span><span class="plusline"><a class="lineno" href="#l1.5" id="l1.5"> 1.5</a>+b
201 </span></pre>
202 </div>
203
204
205 <div class="logo">
206 <a href="http://www.selenic.com/mercurial/">
207 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
208 </div>
209
210 </body>
211 </html>
212
213
214
215 % diff removed file
216 200 Script output follows
217
218 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
219 <html>
220 <head>
221 <link rel="icon" href="/static/hgicon.png" type="image/png">
222 <meta name="robots" content="index, nofollow" />
223 <link rel="stylesheet" href="/static/style.css" type="text/css" />
224
225 <title>test: a diff</title>
226 </head>
227 <body>
228
229 <div class="buttons">
230 <a href="/log/1">changelog</a>
231 <a href="/shortlog/1">shortlog</a>
232 <a href="/graph">graph</a>
233 <a href="/tags">tags</a>
234 <a href="/rev/78e4ebad7cdf">changeset</a>
235 <a href="/file/78e4ebad7cdf/a">file</a>
236 <a href="/log/78e4ebad7cdf/a">revisions</a>
237 <a href="/annotate/78e4ebad7cdf/a">annotate</a>
238 <a href="/raw-diff/78e4ebad7cdf/a">raw</a>
239 </div>
240
241 <h2>a</h2>
242
243 <table id="filediffEntry">
244 <tr>
245 <th class="revision">revision 1:</th>
246 <td class="revision"><a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
247 </tr>
248
249
250 </table>
251
252 <div id="fileDiff">
253 <pre class="parity0"><a class="lineno" href="#l1" id="l1"> 1</a>new file mode 100755
254 <span class="minusline"><a class="lineno" href="#l2" id="l2"> 2</a>--- /dev/null
255 </span><span class="plusline"><a class="lineno" href="#l3" id="l3"> 3</a>+++ b/a
256 </span><span class="atline"><a class="lineno" href="#l4" id="l4"> 4</a>@@ -0,0 +1,1 @@
257 </span><span class="plusline"><a class="lineno" href="#l5" id="l5"> 5</a>+a
258 </span></pre>
259 </div>
260
261
262 <div class="logo">
263 <a href="http://www.selenic.com/mercurial/">
264 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
265 </div>
266
267 </body>
268 </html>
269
270
271
272 % errors