##// END OF EJS Templates
hgweb: add separate page with bookmarks listing
Alexander Solovyov -
r13597:38c9837b stable
parent child Browse files
Show More
@@ -0,0 +1,49 b''
1 {header}
2 <title>{repo|escape}: bookmarks</title>
3 <link rel="alternate" type="application/atom+xml"
4 href="{url}atom-bookmarks" title="Atom feed for {repo|escape}: bookmarks" />
5 <link rel="alternate" type="application/rss+xml"
6 href="{url}rss-bookmarks" title="RSS feed for {repo|escape}: bookmarks" />
7 </head>
8 <body>
9
10 <div class="container">
11 <div class="menu">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
16 <ul>
17 <li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
18 <li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
19 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
20 <li class="active">bookmarks</li>
21 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
22 </ul>
23 <ul>
24 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
25 </ul>
26 </div>
27
28 <div class="main">
29 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
30 <h3>bookmarks</h3>
31
32 <form class="search" action="{url}log">
33 {sessionvars%hiddenformentry}
34 <p><input name="rev" id="search1" type="text" size="30" /></p>
35 <div id="hint">find changesets by author, revision,
36 files, or words in the commit message</div>
37 </form>
38
39 <table class="bigtable">
40 <tr>
41 <th>bookmark</th>
42 <th>node</th>
43 </tr>
44 {entries%bookmarkentry}
45 </table>
46 </div>
47 </div>
48
49 {footer}
@@ -1,789 +1,814 b''
1 1 #
2 2 # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
3 3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 import os, mimetypes, re, cgi, copy
9 9 import webutil
10 10 from mercurial import error, encoding, archival, templater, templatefilters
11 11 from mercurial.node import short, hex
12 12 from mercurial.util import binary
13 13 from common import paritygen, staticfile, get_contact, ErrorResponse
14 14 from common import HTTP_OK, HTTP_FORBIDDEN, HTTP_NOT_FOUND
15 15 from mercurial import graphmod
16 16 from mercurial import help as helpmod
17 17 from mercurial.i18n import _
18 18
19 19 # __all__ is populated with the allowed commands. Be sure to add to it if
20 20 # you're adding a new command, or the new command won't work.
21 21
22 22 __all__ = [
23 23 'log', 'rawfile', 'file', 'changelog', 'shortlog', 'changeset', 'rev',
24 'manifest', 'tags', 'branches', 'summary', 'filediff', 'diff', 'annotate',
25 'filelog', 'archive', 'static', 'graph', 'help',
24 'manifest', 'tags', 'bookmarks', 'branches', 'summary', 'filediff', 'diff',
25 'annotate', 'filelog', 'archive', 'static', 'graph', 'help',
26 26 ]
27 27
28 28 def log(web, req, tmpl):
29 29 if 'file' in req.form and req.form['file'][0]:
30 30 return filelog(web, req, tmpl)
31 31 else:
32 32 return changelog(web, req, tmpl)
33 33
34 34 def rawfile(web, req, tmpl):
35 35 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
36 36 if not path:
37 37 content = manifest(web, req, tmpl)
38 38 req.respond(HTTP_OK, web.ctype)
39 39 return content
40 40
41 41 try:
42 42 fctx = webutil.filectx(web.repo, req)
43 43 except error.LookupError, inst:
44 44 try:
45 45 content = manifest(web, req, tmpl)
46 46 req.respond(HTTP_OK, web.ctype)
47 47 return content
48 48 except ErrorResponse:
49 49 raise inst
50 50
51 51 path = fctx.path()
52 52 text = fctx.data()
53 53 mt = mimetypes.guess_type(path)[0]
54 54 if mt is None:
55 55 mt = binary(text) and 'application/octet-stream' or 'text/plain'
56 56 if mt.startswith('text/'):
57 57 mt += '; charset="%s"' % encoding.encoding
58 58
59 59 req.respond(HTTP_OK, mt, path, len(text))
60 60 return [text]
61 61
62 62 def _filerevision(web, tmpl, fctx):
63 63 f = fctx.path()
64 64 text = fctx.data()
65 65 parity = paritygen(web.stripecount)
66 66
67 67 if binary(text):
68 68 mt = mimetypes.guess_type(f)[0] or 'application/octet-stream'
69 69 text = '(binary:%s)' % mt
70 70
71 71 def lines():
72 72 for lineno, t in enumerate(text.splitlines(True)):
73 73 yield {"line": t,
74 74 "lineid": "l%d" % (lineno + 1),
75 75 "linenumber": "% 6d" % (lineno + 1),
76 76 "parity": parity.next()}
77 77
78 78 return tmpl("filerevision",
79 79 file=f,
80 80 path=webutil.up(f),
81 81 text=lines(),
82 82 rev=fctx.rev(),
83 83 node=hex(fctx.node()),
84 84 author=fctx.user(),
85 85 date=fctx.date(),
86 86 desc=fctx.description(),
87 87 branch=webutil.nodebranchnodefault(fctx),
88 88 parent=webutil.parents(fctx),
89 89 child=webutil.children(fctx),
90 90 rename=webutil.renamelink(fctx),
91 91 permissions=fctx.manifest().flags(f))
92 92
93 93 def file(web, req, tmpl):
94 94 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
95 95 if not path:
96 96 return manifest(web, req, tmpl)
97 97 try:
98 98 return _filerevision(web, tmpl, webutil.filectx(web.repo, req))
99 99 except error.LookupError, inst:
100 100 try:
101 101 return manifest(web, req, tmpl)
102 102 except ErrorResponse:
103 103 raise inst
104 104
105 105 def _search(web, req, tmpl):
106 106
107 107 query = req.form['rev'][0]
108 108 revcount = web.maxchanges
109 109 if 'revcount' in req.form:
110 110 revcount = int(req.form.get('revcount', [revcount])[0])
111 111 tmpl.defaults['sessionvars']['revcount'] = revcount
112 112
113 113 lessvars = copy.copy(tmpl.defaults['sessionvars'])
114 114 lessvars['revcount'] = revcount / 2
115 115 lessvars['rev'] = query
116 116 morevars = copy.copy(tmpl.defaults['sessionvars'])
117 117 morevars['revcount'] = revcount * 2
118 118 morevars['rev'] = query
119 119
120 120 def changelist(**map):
121 121 count = 0
122 122 qw = query.lower().split()
123 123
124 124 def revgen():
125 125 for i in xrange(len(web.repo) - 1, 0, -100):
126 126 l = []
127 127 for j in xrange(max(0, i - 100), i + 1):
128 128 ctx = web.repo[j]
129 129 l.append(ctx)
130 130 l.reverse()
131 131 for e in l:
132 132 yield e
133 133
134 134 for ctx in revgen():
135 135 miss = 0
136 136 for q in qw:
137 137 if not (q in ctx.user().lower() or
138 138 q in ctx.description().lower() or
139 139 q in " ".join(ctx.files()).lower()):
140 140 miss = 1
141 141 break
142 142 if miss:
143 143 continue
144 144
145 145 count += 1
146 146 n = ctx.node()
147 147 showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n)
148 148 files = webutil.listfilediffs(tmpl, ctx.files(), n, web.maxfiles)
149 149
150 150 yield tmpl('searchentry',
151 151 parity=parity.next(),
152 152 author=ctx.user(),
153 153 parent=webutil.parents(ctx),
154 154 child=webutil.children(ctx),
155 155 changelogtag=showtags,
156 156 desc=ctx.description(),
157 157 date=ctx.date(),
158 158 files=files,
159 159 rev=ctx.rev(),
160 160 node=hex(n),
161 161 tags=webutil.nodetagsdict(web.repo, n),
162 162 inbranch=webutil.nodeinbranch(web.repo, ctx),
163 163 branches=webutil.nodebranchdict(web.repo, ctx))
164 164
165 165 if count >= revcount:
166 166 break
167 167
168 168 tip = web.repo['tip']
169 169 parity = paritygen(web.stripecount)
170 170
171 171 return tmpl('search', query=query, node=tip.hex(),
172 172 entries=changelist, archives=web.archivelist("tip"),
173 173 morevars=morevars, lessvars=lessvars)
174 174
175 175 def changelog(web, req, tmpl, shortlog=False):
176 176
177 177 if 'node' in req.form:
178 178 ctx = webutil.changectx(web.repo, req)
179 179 else:
180 180 if 'rev' in req.form:
181 181 hi = req.form['rev'][0]
182 182 else:
183 183 hi = len(web.repo) - 1
184 184 try:
185 185 ctx = web.repo[hi]
186 186 except error.RepoError:
187 187 return _search(web, req, tmpl) # XXX redirect to 404 page?
188 188
189 189 def changelist(limit=0, **map):
190 190 l = [] # build a list in forward order for efficiency
191 191 for i in xrange(start, end):
192 192 ctx = web.repo[i]
193 193 n = ctx.node()
194 194 showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n)
195 195 files = webutil.listfilediffs(tmpl, ctx.files(), n, web.maxfiles)
196 196
197 197 l.insert(0, {"parity": parity.next(),
198 198 "author": ctx.user(),
199 199 "parent": webutil.parents(ctx, i - 1),
200 200 "child": webutil.children(ctx, i + 1),
201 201 "changelogtag": showtags,
202 202 "desc": ctx.description(),
203 203 "date": ctx.date(),
204 204 "files": files,
205 205 "rev": i,
206 206 "node": hex(n),
207 207 "tags": webutil.nodetagsdict(web.repo, n),
208 208 "bookmarks": webutil.nodebookmarksdict(web.repo, n),
209 209 "inbranch": webutil.nodeinbranch(web.repo, ctx),
210 210 "branches": webutil.nodebranchdict(web.repo, ctx)
211 211 })
212 212
213 213 if limit > 0:
214 214 l = l[:limit]
215 215
216 216 for e in l:
217 217 yield e
218 218
219 219 revcount = shortlog and web.maxshortchanges or web.maxchanges
220 220 if 'revcount' in req.form:
221 221 revcount = int(req.form.get('revcount', [revcount])[0])
222 222 tmpl.defaults['sessionvars']['revcount'] = revcount
223 223
224 224 lessvars = copy.copy(tmpl.defaults['sessionvars'])
225 225 lessvars['revcount'] = revcount / 2
226 226 morevars = copy.copy(tmpl.defaults['sessionvars'])
227 227 morevars['revcount'] = revcount * 2
228 228
229 229 count = len(web.repo)
230 230 pos = ctx.rev()
231 231 start = max(0, pos - revcount + 1)
232 232 end = min(count, start + revcount)
233 233 pos = end - 1
234 234 parity = paritygen(web.stripecount, offset=start - end)
235 235
236 236 changenav = webutil.revnavgen(pos, revcount, count, web.repo.changectx)
237 237
238 238 return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
239 239 node=hex(ctx.node()), rev=pos, changesets=count,
240 240 entries=lambda **x: changelist(limit=0,**x),
241 241 latestentry=lambda **x: changelist(limit=1,**x),
242 242 archives=web.archivelist("tip"), revcount=revcount,
243 243 morevars=morevars, lessvars=lessvars)
244 244
245 245 def shortlog(web, req, tmpl):
246 246 return changelog(web, req, tmpl, shortlog = True)
247 247
248 248 def changeset(web, req, tmpl):
249 249 ctx = webutil.changectx(web.repo, req)
250 250 showtags = webutil.showtag(web.repo, tmpl, 'changesettag', ctx.node())
251 251 showbookmarks = webutil.showbookmark(web.repo, tmpl, 'changesetbookmark',
252 252 ctx.node())
253 253 showbranch = webutil.nodebranchnodefault(ctx)
254 254
255 255 files = []
256 256 parity = paritygen(web.stripecount)
257 257 for f in ctx.files():
258 258 template = f in ctx and 'filenodelink' or 'filenolink'
259 259 files.append(tmpl(template,
260 260 node=ctx.hex(), file=f,
261 261 parity=parity.next()))
262 262
263 263 parity = paritygen(web.stripecount)
264 264 style = web.config('web', 'style', 'paper')
265 265 if 'style' in req.form:
266 266 style = req.form['style'][0]
267 267
268 268 diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style)
269 269 return tmpl('changeset',
270 270 diff=diffs,
271 271 rev=ctx.rev(),
272 272 node=ctx.hex(),
273 273 parent=webutil.parents(ctx),
274 274 child=webutil.children(ctx),
275 275 changesettag=showtags,
276 276 changesetbookmark=showbookmarks,
277 277 changesetbranch=showbranch,
278 278 author=ctx.user(),
279 279 desc=ctx.description(),
280 280 date=ctx.date(),
281 281 files=files,
282 282 archives=web.archivelist(ctx.hex()),
283 283 tags=webutil.nodetagsdict(web.repo, ctx.node()),
284 284 bookmarks=webutil.nodebookmarksdict(web.repo, ctx.node()),
285 285 branch=webutil.nodebranchnodefault(ctx),
286 286 inbranch=webutil.nodeinbranch(web.repo, ctx),
287 287 branches=webutil.nodebranchdict(web.repo, ctx))
288 288
289 289 rev = changeset
290 290
291 291 def manifest(web, req, tmpl):
292 292 ctx = webutil.changectx(web.repo, req)
293 293 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
294 294 mf = ctx.manifest()
295 295 node = ctx.node()
296 296
297 297 files = {}
298 298 dirs = {}
299 299 parity = paritygen(web.stripecount)
300 300
301 301 if path and path[-1] != "/":
302 302 path += "/"
303 303 l = len(path)
304 304 abspath = "/" + path
305 305
306 306 for f, n in mf.iteritems():
307 307 if f[:l] != path:
308 308 continue
309 309 remain = f[l:]
310 310 elements = remain.split('/')
311 311 if len(elements) == 1:
312 312 files[remain] = f
313 313 else:
314 314 h = dirs # need to retain ref to dirs (root)
315 315 for elem in elements[0:-1]:
316 316 if elem not in h:
317 317 h[elem] = {}
318 318 h = h[elem]
319 319 if len(h) > 1:
320 320 break
321 321 h[None] = None # denotes files present
322 322
323 323 if mf and not files and not dirs:
324 324 raise ErrorResponse(HTTP_NOT_FOUND, 'path not found: ' + path)
325 325
326 326 def filelist(**map):
327 327 for f in sorted(files):
328 328 full = files[f]
329 329
330 330 fctx = ctx.filectx(full)
331 331 yield {"file": full,
332 332 "parity": parity.next(),
333 333 "basename": f,
334 334 "date": fctx.date(),
335 335 "size": fctx.size(),
336 336 "permissions": mf.flags(full)}
337 337
338 338 def dirlist(**map):
339 339 for d in sorted(dirs):
340 340
341 341 emptydirs = []
342 342 h = dirs[d]
343 343 while isinstance(h, dict) and len(h) == 1:
344 344 k, v = h.items()[0]
345 345 if v:
346 346 emptydirs.append(k)
347 347 h = v
348 348
349 349 path = "%s%s" % (abspath, d)
350 350 yield {"parity": parity.next(),
351 351 "path": path,
352 352 "emptydirs": "/".join(emptydirs),
353 353 "basename": d}
354 354
355 355 return tmpl("manifest",
356 356 rev=ctx.rev(),
357 357 node=hex(node),
358 358 path=abspath,
359 359 up=webutil.up(abspath),
360 360 upparity=parity.next(),
361 361 fentries=filelist,
362 362 dentries=dirlist,
363 363 archives=web.archivelist(hex(node)),
364 364 tags=webutil.nodetagsdict(web.repo, node),
365 365 inbranch=webutil.nodeinbranch(web.repo, ctx),
366 366 branches=webutil.nodebranchdict(web.repo, ctx))
367 367
368 368 def tags(web, req, tmpl):
369 369 i = web.repo.tagslist()
370 370 i.reverse()
371 371 parity = paritygen(web.stripecount)
372 372
373 373 def entries(notip=False, limit=0, **map):
374 374 count = 0
375 375 for k, n in i:
376 376 if notip and k == "tip":
377 377 continue
378 378 if limit > 0 and count >= limit:
379 379 continue
380 380 count = count + 1
381 381 yield {"parity": parity.next(),
382 382 "tag": k,
383 383 "date": web.repo[n].date(),
384 384 "node": hex(n)}
385 385
386 386 return tmpl("tags",
387 387 node=hex(web.repo.changelog.tip()),
388 388 entries=lambda **x: entries(False, 0, **x),
389 389 entriesnotip=lambda **x: entries(True, 0, **x),
390 390 latestentry=lambda **x: entries(True, 1, **x))
391 391
392 def bookmarks(web, req, tmpl):
393 i = web.repo._bookmarks.items()
394 i.reverse()
395 parity = paritygen(web.stripecount)
396
397 def entries(notip=False, limit=0, **map):
398 count = 0
399 for k, n in i:
400 if notip and k == "tip":
401 continue
402 if limit > 0 and count >= limit:
403 continue
404 count = count + 1
405 yield {"parity": parity.next(),
406 "bookmark": k,
407 "date": web.repo[n].date(),
408 "node": hex(n)}
409
410 return tmpl("bookmarks",
411 node=hex(web.repo.changelog.tip()),
412 entries=lambda **x: entries(False, 0, **x),
413 entriesnotip=lambda **x: entries(True, 0, **x),
414 latestentry=lambda **x: entries(True, 1, **x))
415
392 416 def branches(web, req, tmpl):
393 417 tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems())
394 418 heads = web.repo.heads()
395 419 parity = paritygen(web.stripecount)
396 420 sortkey = lambda ctx: ('close' not in ctx.extra(), ctx.rev())
397 421
398 422 def entries(limit, **map):
399 423 count = 0
400 424 for ctx in sorted(tips, key=sortkey, reverse=True):
401 425 if limit > 0 and count >= limit:
402 426 return
403 427 count += 1
404 428 if ctx.node() not in heads:
405 429 status = 'inactive'
406 430 elif not web.repo.branchheads(ctx.branch()):
407 431 status = 'closed'
408 432 else:
409 433 status = 'open'
410 434 yield {'parity': parity.next(),
411 435 'branch': ctx.branch(),
412 436 'status': status,
413 437 'node': ctx.hex(),
414 438 'date': ctx.date()}
415 439
416 440 return tmpl('branches', node=hex(web.repo.changelog.tip()),
417 441 entries=lambda **x: entries(0, **x),
418 442 latestentry=lambda **x: entries(1, **x))
419 443
420 444 def summary(web, req, tmpl):
421 445 i = web.repo.tagslist()
422 446 i.reverse()
423 447
424 448 def tagentries(**map):
425 449 parity = paritygen(web.stripecount)
426 450 count = 0
427 451 for k, n in i:
428 452 if k == "tip": # skip tip
429 453 continue
430 454
431 455 count += 1
432 456 if count > 10: # limit to 10 tags
433 457 break
434 458
435 459 yield tmpl("tagentry",
436 460 parity=parity.next(),
437 461 tag=k,
438 462 node=hex(n),
439 463 date=web.repo[n].date())
440 464
441 465 def branches(**map):
442 466 parity = paritygen(web.stripecount)
443 467
444 468 b = web.repo.branchtags()
445 469 l = [(-web.repo.changelog.rev(n), n, t) for t, n in b.iteritems()]
446 470 for r, n, t in sorted(l):
447 471 yield {'parity': parity.next(),
448 472 'branch': t,
449 473 'node': hex(n),
450 474 'date': web.repo[n].date()}
451 475
452 476 def changelist(**map):
453 477 parity = paritygen(web.stripecount, offset=start - end)
454 478 l = [] # build a list in forward order for efficiency
455 479 for i in xrange(start, end):
456 480 ctx = web.repo[i]
457 481 n = ctx.node()
458 482 hn = hex(n)
459 483
460 484 l.insert(0, tmpl(
461 485 'shortlogentry',
462 486 parity=parity.next(),
463 487 author=ctx.user(),
464 488 desc=ctx.description(),
465 489 date=ctx.date(),
466 490 rev=i,
467 491 node=hn,
468 492 tags=webutil.nodetagsdict(web.repo, n),
469 493 inbranch=webutil.nodeinbranch(web.repo, ctx),
470 494 branches=webutil.nodebranchdict(web.repo, ctx)))
471 495
472 496 yield l
473 497
474 498 tip = web.repo['tip']
475 499 count = len(web.repo)
476 500 start = max(0, count - web.maxchanges)
477 501 end = min(count, start + web.maxchanges)
478 502
479 503 return tmpl("summary",
480 504 desc=web.config("web", "description", "unknown"),
481 505 owner=get_contact(web.config) or "unknown",
482 506 lastchange=tip.date(),
483 507 tags=tagentries,
484 508 branches=branches,
485 509 shortlog=changelist,
486 510 node=tip.hex(),
487 511 archives=web.archivelist("tip"))
488 512
489 513 def filediff(web, req, tmpl):
490 514 fctx, ctx = None, None
491 515 try:
492 516 fctx = webutil.filectx(web.repo, req)
493 517 except LookupError:
494 518 ctx = webutil.changectx(web.repo, req)
495 519 path = webutil.cleanpath(web.repo, req.form['file'][0])
496 520 if path not in ctx.files():
497 521 raise
498 522
499 523 if fctx is not None:
500 524 n = fctx.node()
501 525 path = fctx.path()
502 526 else:
503 527 n = ctx.node()
504 528 # path already defined in except clause
505 529
506 530 parity = paritygen(web.stripecount)
507 531 style = web.config('web', 'style', 'paper')
508 532 if 'style' in req.form:
509 533 style = req.form['style'][0]
510 534
511 535 diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity, style)
512 536 rename = fctx and webutil.renamelink(fctx) or []
513 537 ctx = fctx and fctx or ctx
514 538 return tmpl("filediff",
515 539 file=path,
516 540 node=hex(n),
517 541 rev=ctx.rev(),
518 542 date=ctx.date(),
519 543 desc=ctx.description(),
520 544 author=ctx.user(),
521 545 rename=rename,
522 546 branch=webutil.nodebranchnodefault(ctx),
523 547 parent=webutil.parents(ctx),
524 548 child=webutil.children(ctx),
525 549 diff=diffs)
526 550
527 551 diff = filediff
528 552
529 553 def annotate(web, req, tmpl):
530 554 fctx = webutil.filectx(web.repo, req)
531 555 f = fctx.path()
532 556 parity = paritygen(web.stripecount)
533 557
534 558 def annotate(**map):
535 559 last = None
536 560 if binary(fctx.data()):
537 561 mt = (mimetypes.guess_type(fctx.path())[0]
538 562 or 'application/octet-stream')
539 563 lines = enumerate([((fctx.filectx(fctx.filerev()), 1),
540 564 '(binary:%s)' % mt)])
541 565 else:
542 566 lines = enumerate(fctx.annotate(follow=True, linenumber=True))
543 567 for lineno, ((f, targetline), l) in lines:
544 568 fnode = f.filenode()
545 569
546 570 if last != fnode:
547 571 last = fnode
548 572
549 573 yield {"parity": parity.next(),
550 574 "node": hex(f.node()),
551 575 "rev": f.rev(),
552 576 "author": f.user(),
553 577 "desc": f.description(),
554 578 "file": f.path(),
555 579 "targetline": targetline,
556 580 "line": l,
557 581 "lineid": "l%d" % (lineno + 1),
558 582 "linenumber": "% 6d" % (lineno + 1),
559 583 "revdate": f.date()}
560 584
561 585 return tmpl("fileannotate",
562 586 file=f,
563 587 annotate=annotate,
564 588 path=webutil.up(f),
565 589 rev=fctx.rev(),
566 590 node=hex(fctx.node()),
567 591 author=fctx.user(),
568 592 date=fctx.date(),
569 593 desc=fctx.description(),
570 594 rename=webutil.renamelink(fctx),
571 595 branch=webutil.nodebranchnodefault(fctx),
572 596 parent=webutil.parents(fctx),
573 597 child=webutil.children(fctx),
574 598 permissions=fctx.manifest().flags(f))
575 599
576 600 def filelog(web, req, tmpl):
577 601
578 602 try:
579 603 fctx = webutil.filectx(web.repo, req)
580 604 f = fctx.path()
581 605 fl = fctx.filelog()
582 606 except error.LookupError:
583 607 f = webutil.cleanpath(web.repo, req.form['file'][0])
584 608 fl = web.repo.file(f)
585 609 numrevs = len(fl)
586 610 if not numrevs: # file doesn't exist at all
587 611 raise
588 612 rev = webutil.changectx(web.repo, req).rev()
589 613 first = fl.linkrev(0)
590 614 if rev < first: # current rev is from before file existed
591 615 raise
592 616 frev = numrevs - 1
593 617 while fl.linkrev(frev) > rev:
594 618 frev -= 1
595 619 fctx = web.repo.filectx(f, fl.linkrev(frev))
596 620
597 621 revcount = web.maxshortchanges
598 622 if 'revcount' in req.form:
599 623 revcount = int(req.form.get('revcount', [revcount])[0])
600 624 tmpl.defaults['sessionvars']['revcount'] = revcount
601 625
602 626 lessvars = copy.copy(tmpl.defaults['sessionvars'])
603 627 lessvars['revcount'] = revcount / 2
604 628 morevars = copy.copy(tmpl.defaults['sessionvars'])
605 629 morevars['revcount'] = revcount * 2
606 630
607 631 count = fctx.filerev() + 1
608 632 start = max(0, fctx.filerev() - revcount + 1) # first rev on this page
609 633 end = min(count, start + revcount) # last rev on this page
610 634 parity = paritygen(web.stripecount, offset=start - end)
611 635
612 636 def entries(limit=0, **map):
613 637 l = []
614 638
615 639 repo = web.repo
616 640 for i in xrange(start, end):
617 641 iterfctx = fctx.filectx(i)
618 642
619 643 l.insert(0, {"parity": parity.next(),
620 644 "filerev": i,
621 645 "file": f,
622 646 "node": hex(iterfctx.node()),
623 647 "author": iterfctx.user(),
624 648 "date": iterfctx.date(),
625 649 "rename": webutil.renamelink(iterfctx),
626 650 "parent": webutil.parents(iterfctx),
627 651 "child": webutil.children(iterfctx),
628 652 "desc": iterfctx.description(),
629 653 "tags": webutil.nodetagsdict(repo, iterfctx.node()),
630 654 "branch": webutil.nodebranchnodefault(iterfctx),
631 655 "inbranch": webutil.nodeinbranch(repo, iterfctx),
632 656 "branches": webutil.nodebranchdict(repo, iterfctx)})
633 657
634 658 if limit > 0:
635 659 l = l[:limit]
636 660
637 661 for e in l:
638 662 yield e
639 663
640 664 nodefunc = lambda x: fctx.filectx(fileid=x)
641 665 nav = webutil.revnavgen(end - 1, revcount, count, nodefunc)
642 666 return tmpl("filelog", file=f, node=hex(fctx.node()), nav=nav,
643 667 entries=lambda **x: entries(limit=0, **x),
644 668 latestentry=lambda **x: entries(limit=1, **x),
645 669 revcount=revcount, morevars=morevars, lessvars=lessvars)
646 670
647 671 def archive(web, req, tmpl):
648 672 type_ = req.form.get('type', [None])[0]
649 673 allowed = web.configlist("web", "allow_archive")
650 674 key = req.form['node'][0]
651 675
652 676 if type_ not in web.archives:
653 677 msg = 'Unsupported archive type: %s' % type_
654 678 raise ErrorResponse(HTTP_NOT_FOUND, msg)
655 679
656 680 if not ((type_ in allowed or
657 681 web.configbool("web", "allow" + type_, False))):
658 682 msg = 'Archive type not allowed: %s' % type_
659 683 raise ErrorResponse(HTTP_FORBIDDEN, msg)
660 684
661 685 reponame = re.sub(r"\W+", "-", os.path.basename(web.reponame))
662 686 cnode = web.repo.lookup(key)
663 687 arch_version = key
664 688 if cnode == key or key == 'tip':
665 689 arch_version = short(cnode)
666 690 name = "%s-%s" % (reponame, arch_version)
667 691 mimetype, artype, extension, encoding = web.archive_specs[type_]
668 692 headers = [
669 693 ('Content-Type', mimetype),
670 694 ('Content-Disposition', 'attachment; filename=%s%s' % (name, extension))
671 695 ]
672 696 if encoding:
673 697 headers.append(('Content-Encoding', encoding))
674 698 req.header(headers)
675 699 req.respond(HTTP_OK)
676 700 archival.archive(web.repo, req, cnode, artype, prefix=name)
677 701 return []
678 702
679 703
680 704 def static(web, req, tmpl):
681 705 fname = req.form['file'][0]
682 706 # a repo owner may set web.static in .hg/hgrc to get any file
683 707 # readable by the user running the CGI script
684 708 static = web.config("web", "static", None, untrusted=False)
685 709 if not static:
686 710 tp = web.templatepath or templater.templatepath()
687 711 if isinstance(tp, str):
688 712 tp = [tp]
689 713 static = [os.path.join(p, 'static') for p in tp]
690 714 return [staticfile(static, fname, req)]
691 715
692 716 def graph(web, req, tmpl):
693 717
694 718 rev = webutil.changectx(web.repo, req).rev()
695 719 bg_height = 39
696 720 revcount = web.maxshortchanges
697 721 if 'revcount' in req.form:
698 722 revcount = int(req.form.get('revcount', [revcount])[0])
699 723 tmpl.defaults['sessionvars']['revcount'] = revcount
700 724
701 725 lessvars = copy.copy(tmpl.defaults['sessionvars'])
702 726 lessvars['revcount'] = revcount / 2
703 727 morevars = copy.copy(tmpl.defaults['sessionvars'])
704 728 morevars['revcount'] = revcount * 2
705 729
706 730 max_rev = len(web.repo) - 1
707 731 revcount = min(max_rev, revcount)
708 732 revnode = web.repo.changelog.node(rev)
709 733 revnode_hex = hex(revnode)
710 734 uprev = min(max_rev, rev + revcount)
711 735 downrev = max(0, rev - revcount)
712 736 count = len(web.repo)
713 737 changenav = webutil.revnavgen(rev, revcount, count, web.repo.changectx)
714 738
715 739 dag = graphmod.revisions(web.repo, rev, downrev)
716 740 tree = list(graphmod.colored(dag))
717 741 canvasheight = (len(tree) + 1) * bg_height - 27
718 742 data = []
719 743 for (id, type, ctx, vtx, edges) in tree:
720 744 if type != graphmod.CHANGESET:
721 745 continue
722 746 node = short(ctx.node())
723 747 age = templatefilters.age(ctx.date())
724 748 desc = templatefilters.firstline(ctx.description())
725 749 desc = cgi.escape(templatefilters.nonempty(desc))
726 750 user = cgi.escape(templatefilters.person(ctx.user()))
727 751 branch = ctx.branch()
728 752 branch = branch, web.repo.branchtags().get(branch) == ctx.node()
729 data.append((node, vtx, edges, desc, user, age, branch, ctx.tags(), ctx.bookmarks()))
753 data.append((node, vtx, edges, desc, user, age, branch, ctx.tags(),
754 ctx.bookmarks()))
730 755
731 756 return tmpl('graph', rev=rev, revcount=revcount, uprev=uprev,
732 757 lessvars=lessvars, morevars=morevars, downrev=downrev,
733 758 canvasheight=canvasheight, jsdata=data, bg_height=bg_height,
734 759 node=revnode_hex, changenav=changenav)
735 760
736 761 def _getdoc(e):
737 762 doc = e[0].__doc__
738 763 if doc:
739 764 doc = doc.split('\n')[0]
740 765 else:
741 766 doc = _('(no help text available)')
742 767 return doc
743 768
744 769 def help(web, req, tmpl):
745 770 from mercurial import commands # avoid cycle
746 771
747 772 topicname = req.form.get('node', [None])[0]
748 773 if not topicname:
749 774 topic = []
750 775
751 776 def topics(**map):
752 777 for entries, summary, _ in helpmod.helptable:
753 778 entries = sorted(entries, key=len)
754 779 yield {'topic': entries[-1], 'summary': summary}
755 780
756 781 early, other = [], []
757 782 primary = lambda s: s.split('|')[0]
758 783 for c, e in commands.table.iteritems():
759 784 doc = _getdoc(e)
760 785 if 'DEPRECATED' in doc or c.startswith('debug'):
761 786 continue
762 787 cmd = primary(c)
763 788 if cmd.startswith('^'):
764 789 early.append((cmd[1:], doc))
765 790 else:
766 791 other.append((cmd, doc))
767 792
768 793 early.sort()
769 794 other.sort()
770 795
771 796 def earlycommands(**map):
772 797 for c, doc in early:
773 798 yield {'topic': c, 'summary': doc}
774 799
775 800 def othercommands(**map):
776 801 for c, doc in other:
777 802 yield {'topic': c, 'summary': doc}
778 803
779 804 return tmpl('helptopics', topics=topics, earlycommands=earlycommands,
780 805 othercommands=othercommands, title='Index')
781 806
782 807 u = webutil.wsgiui()
783 808 u.pushbuffer()
784 809 try:
785 810 commands.help_(u, topicname)
786 811 except error.UnknownCommand:
787 812 raise ErrorResponse(HTTP_NOT_FOUND)
788 813 doc = u.popbuffer()
789 814 return tmpl('help', topic=topicname, doc=doc)
@@ -1,59 +1,60 b''
1 1 {header}
2 2 <title>{repo|escape}: branches</title>
3 3 <link rel="alternate" type="application/atom+xml"
4 4 href="{url}atom-tags" title="Atom feed for {repo|escape}: branches" />
5 5 <link rel="alternate" type="application/rss+xml"
6 6 href="{url}rss-tags" title="RSS feed for {repo|escape}: branches" />
7 7 </head>
8 8 <body>
9 9
10 10 <div class="container">
11 11 <div class="menu">
12 12 <div class="logo">
13 13 <a href="http://mercurial.selenic.com/">
14 14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 15 </div>
16 16 <ul>
17 17 <li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
18 18 <li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
19 19 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
20 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
20 21 <li class="active">branches</li>
21 22 </ul>
22 23 <ul>
23 24 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
24 25 </ul>
25 26 </div>
26 27
27 28 <div class="main">
28 29 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
29 30 <h3>branches</h3>
30 31
31 32 <form class="search" action="{url}log">
32 33 {sessionvars%hiddenformentry}
33 34 <p><input name="rev" id="search1" type="text" size="30" /></p>
34 35 <div id="hint">find changesets by author, revision,
35 36 files, or words in the commit message</div>
36 37 </form>
37 38
38 39 <table class="bigtable">
39 40 <tr>
40 41 <th>branch</th>
41 42 <th>node</th>
42 43 </tr>
43 44 {entries %
44 45 ' <tr class="tagEntry parity{parity}">
45 46 <td>
46 47 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
47 48 {branch|escape}
48 49 </a>
49 50 </td>
50 51 <td class="node">
51 52 {node|short}
52 53 </td>
53 54 </tr>'
54 55 }
55 56 </table>
56 57 </div>
57 58 </div>
58 59
59 60 {footer}
@@ -1,74 +1,75 b''
1 1 {header}
2 2 <title>{repo|escape}: {node|short}</title>
3 3 </head>
4 4 <body>
5 5 <div class="container">
6 6 <div class="menu">
7 7 <div class="logo">
8 8 <a href="http://mercurial.selenic.com/">
9 9 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
10 10 </div>
11 11 <ul>
12 12 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
13 13 <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
14 14 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
15 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
15 16 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
16 17 </ul>
17 18 <ul>
18 19 <li class="active">changeset</li>
19 20 <li><a href="{url}raw-rev/{node|short}{sessionvars%urlparameter}">raw</a></li>
20 21 <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">browse</a></li>
21 22 </ul>
22 23 <ul>
23 24 {archives%archiveentry}
24 25 </ul>
25 26 <ul>
26 27 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
27 28 </ul>
28 29 </div>
29 30
30 31 <div class="main">
31 32
32 33 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
33 34 <h3>changeset {rev}:{node|short} {changesetbranch%changelogbranchname} {changesettag} {changesetbookmark}</h3>
34 35
35 36 <form class="search" action="{url}log">
36 37 {sessionvars%hiddenformentry}
37 38 <p><input name="rev" id="search1" type="text" size="30" /></p>
38 39 <div id="hint">find changesets by author, revision,
39 40 files, or words in the commit message</div>
40 41 </form>
41 42
42 43 <div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
43 44
44 45 <table id="changesetEntry">
45 46 <tr>
46 47 <th class="author">author</th>
47 48 <td class="author">{author|obfuscate}</td>
48 49 </tr>
49 50 <tr>
50 51 <th class="date">date</th>
51 52 <td class="date">{date|date} ({date|age})</td></tr>
52 53 <tr>
53 54 <th class="author">parents</th>
54 55 <td class="author">{parent%changesetparent}</td>
55 56 </tr>
56 57 <tr>
57 58 <th class="author">children</th>
58 59 <td class="author">{child%changesetchild}</td>
59 60 </tr>
60 61 <tr>
61 62 <th class="files">files</th>
62 63 <td class="files">{files}</td>
63 64 </tr>
64 65 </table>
65 66
66 67 <div class="overflow">
67 68 <div class="sourcefirst"> line diff</div>
68 69
69 70 {diff}
70 71 </div>
71 72
72 73 </div>
73 74 </div>
74 75 {footer}
@@ -1,44 +1,45 b''
1 1 {header}
2 2 <title>{repo|escape}: error</title>
3 3 </head>
4 4 <body>
5 5
6 6 <div class="container">
7 7 <div class="menu">
8 8 <div class="logo">
9 9 <a href="http://mercurial.selenic.com/">
10 10 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
11 11 </div>
12 12 <ul>
13 13 <li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
14 14 <li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
15 15 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
16 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
16 17 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
17 18 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
18 19 </ul>
19 20 </div>
20 21
21 22 <div class="main">
22 23
23 24 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
24 25 <h3>error</h3>
25 26
26 27 <form class="search" action="{url}log">
27 28 {sessionvars%hiddenformentry}
28 29 <p><input name="rev" id="search1" type="text" size="30"></p>
29 30 <div id="hint">find changesets by author, revision,
30 31 files, or words in the commit message</div>
31 32 </form>
32 33
33 34 <div class="description">
34 35 <p>
35 36 An error occurred while processing your request:
36 37 </p>
37 38 <p>
38 39 {error|escape}
39 40 </p>
40 41 </div>
41 42 </div>
42 43 </div>
43 44
44 45 {footer}
@@ -1,81 +1,82 b''
1 1 {header}
2 2 <title>{repo|escape}: {file|escape} annotate</title>
3 3 </head>
4 4 <body>
5 5
6 6 <div class="container">
7 7 <div class="menu">
8 8 <div class="logo">
9 9 <a href="http://mercurial.selenic.com/">
10 10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
11 11 </div>
12 12 <ul>
13 13 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
14 14 <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
15 15 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
16 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
16 17 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
17 18 </ul>
18 19
19 20 <ul>
20 21 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
21 22 <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
22 23 </ul>
23 24 <ul>
24 25 <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
25 26 <li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
26 27 <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
27 28 <li class="active">annotate</li>
28 29 <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
29 30 <li><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li>
30 31 </ul>
31 32 <ul>
32 33 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
33 34 </ul>
34 35 </div>
35 36
36 37 <div class="main">
37 38 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
38 39 <h3>annotate {file|escape} @ {rev}:{node|short}</h3>
39 40
40 41 <form class="search" action="{url}log">
41 42 {sessionvars%hiddenformentry}
42 43 <p><input name="rev" id="search1" type="text" size="30" /></p>
43 44 <div id="hint">find changesets by author, revision,
44 45 files, or words in the commit message</div>
45 46 </form>
46 47
47 48 <div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
48 49
49 50 <table id="changesetEntry">
50 51 <tr>
51 52 <th class="author">author</th>
52 53 <td class="author">{author|obfuscate}</td>
53 54 </tr>
54 55 <tr>
55 56 <th class="date">date</th>
56 57 <td class="date">{date|date} ({date|age})</td>
57 58 </tr>
58 59 <tr>
59 60 <th class="author">parents</th>
60 61 <td class="author">{parent%filerevparent}</td>
61 62 </tr>
62 63 <tr>
63 64 <th class="author">children</th>
64 65 <td class="author">{child%filerevchild}</td>
65 66 </tr>
66 67 {changesettag}
67 68 </table>
68 69
69 70 <div class="overflow">
70 71 <table class="bigtable">
71 72 <tr>
72 73 <th class="annotate">rev</th>
73 74 <th class="line">&nbsp;&nbsp;line source</th>
74 75 </tr>
75 76 {annotate%annotateline}
76 77 </table>
77 78 </div>
78 79 </div>
79 80 </div>
80 81
81 82 {footer}
@@ -1,76 +1,77 b''
1 1 {header}
2 2 <title>{repo|escape}: {file|escape} diff</title>
3 3 </head>
4 4 <body>
5 5
6 6 <div class="container">
7 7 <div class="menu">
8 8 <div class="logo">
9 9 <a href="http://mercurial.selenic.com/">
10 10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
11 11 </div>
12 12 <ul>
13 13 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
14 14 <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
15 15 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
16 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
16 17 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
17 18 </ul>
18 19 <ul>
19 20 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
20 21 <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
21 22 </ul>
22 23 <ul>
23 24 <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
24 25 <li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
25 26 <li class="active">diff</li>
26 27 <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
27 28 <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
28 29 <li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
29 30 </ul>
30 31 <ul>
31 32 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
32 33 </ul>
33 34 </div>
34 35
35 36 <div class="main">
36 37 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
37 38 <h3>diff {file|escape} @ {rev}:{node|short}</h3>
38 39
39 40 <form class="search" action="{url}log">
40 41 <p>{sessionvars%hiddenformentry}</p>
41 42 <p><input name="rev" id="search1" type="text" size="30" /></p>
42 43 <div id="hint">find changesets by author, revision,
43 44 files, or words in the commit message</div>
44 45 </form>
45 46
46 47 <div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
47 48
48 49 <table id="changesetEntry">
49 50 <tr>
50 51 <th>author</th>
51 52 <td>{author|obfuscate}</td>
52 53 </tr>
53 54 <tr>
54 55 <th>date</th>
55 56 <td>{date|date} ({date|age})</td>
56 57 </tr>
57 58 <tr>
58 59 <th>parents</th>
59 60 <td>{parent%filerevparent}</td>
60 61 </tr>
61 62 <tr>
62 63 <th>children</th>
63 64 <td>{child%filerevchild}</td>
64 65 </tr>
65 66 {changesettag}
66 67 </table>
67 68
68 69 <div class="overflow">
69 70 <div class="sourcefirst"> line diff</div>
70 71
71 72 {diff}
72 73 </div>
73 74 </div>
74 75 </div>
75 76
76 77 {footer}
@@ -1,72 +1,73 b''
1 1 {header}
2 2 <title>{repo|escape}: {file|escape} history</title>
3 3 <link rel="alternate" type="application/atom+xml"
4 4 href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}" />
5 5 <link rel="alternate" type="application/rss+xml"
6 6 href="{url}rss-log/tip/{file|urlescape}" title="RSS feed for {repo|escape}:{file}" />
7 7 </head>
8 8 <body>
9 9
10 10 <div class="container">
11 11 <div class="menu">
12 12 <div class="logo">
13 13 <a href="http://mercurial.selenic.com/">
14 14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 15 </div>
16 16 <ul>
17 17 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
18 18 <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
19 19 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
20 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
20 21 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
21 22 </ul>
22 23 <ul>
23 24 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
24 25 <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
25 26 </ul>
26 27 <ul>
27 28 <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
28 29 <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
29 30 <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
30 31 <li class="active">file log</li>
31 32 <li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
32 33 </ul>
33 34 <ul>
34 35 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
35 36 </ul>
36 37 </div>
37 38
38 39 <div class="main">
39 40 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
40 41 <h3>log {file|escape}</h3>
41 42
42 43 <form class="search" action="{url}log">
43 44 {sessionvars%hiddenformentry}
44 45 <p><input name="rev" id="search1" type="text" size="30" /></p>
45 46 <div id="hint">find changesets by author, revision,
46 47 files, or words in the commit message</div>
47 48 </form>
48 49
49 50 <div class="navigate">
50 51 <a href="{url}log/{node|short}/{file|urlescape}{lessvars%urlparameter}">less</a>
51 52 <a href="{url}log/{node|short}/{file|urlescape}{morevars%urlparameter}">more</a>
52 53 | {nav%filenav}</div>
53 54
54 55 <table class="bigtable">
55 56 <tr>
56 57 <th class="age">age</th>
57 58 <th class="author">author</th>
58 59 <th class="description">description</th>
59 60 </tr>
60 61 {entries%filelogentry}
61 62 </table>
62 63
63 64 <div class="navigate">
64 65 <a href="{url}log/{node|short}/{file|urlescape}{lessvars%urlparameter}">less</a>
65 66 <a href="{url}log/{node|short}/{file|urlescape}{morevars%urlparameter}">more</a>
66 67 | {nav%filenav}
67 68 </div>
68 69
69 70 </div>
70 71 </div>
71 72
72 73 {footer}
@@ -1,141 +1,142 b''
1 1 {header}
2 2 <title>{repo|escape}: revision graph</title>
3 3 <link rel="alternate" type="application/atom+xml"
4 4 href="{url}atom-log" title="Atom feed for {repo|escape}: log" />
5 5 <link rel="alternate" type="application/rss+xml"
6 6 href="{url}rss-log" title="RSS feed for {repo|escape}: log" />
7 7 <!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
8 8 </head>
9 9 <body>
10 10
11 11 <div class="container">
12 12 <div class="menu">
13 13 <div class="logo">
14 14 <a href="http://mercurial.selenic.com/">
15 15 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
16 16 </div>
17 17 <ul>
18 18 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
19 19 <li class="active">graph</li>
20 20 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
21 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
21 22 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
22 23 </ul>
23 24 <ul>
24 25 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
25 26 <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
26 27 </ul>
27 28 <ul>
28 29 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
29 30 </ul>
30 31 </div>
31 32
32 33 <div class="main">
33 34 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
34 35 <h3>graph</h3>
35 36
36 37 <form class="search" action="{url}log">
37 38 {sessionvars%hiddenformentry}
38 39 <p><input name="rev" id="search1" type="text" size="30" /></p>
39 40 <div id="hint">find changesets by author, revision,
40 41 files, or words in the commit message</div>
41 42 </form>
42 43
43 44 <div class="navigate">
44 45 <a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
45 46 <a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
46 47 | rev {rev}: {changenav%navgraph}
47 48 </div>
48 49
49 50 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
50 51
51 52 <div id="wrapper">
52 53 <ul id="nodebgs"></ul>
53 54 <canvas id="graph" width="224" height="{canvasheight}"></canvas>
54 55 <ul id="graphnodes"></ul>
55 56 </div>
56 57
57 58 <script type="text/javascript" src="{staticurl}graph.js"></script>
58 59 <script type="text/javascript">
59 60 <!-- hide script content
60 61
61 62 var data = {jsdata|json};
62 63 var graph = new Graph();
63 64 graph.scale({bg_height});
64 65
65 66 graph.edge = function(x0, y0, x1, y1, color) \{
66 67
67 68 this.setColor(color, 0.0, 0.65);
68 69 this.ctx.beginPath();
69 70 this.ctx.moveTo(x0, y0);
70 71 this.ctx.lineTo(x1, y1);
71 72 this.ctx.stroke();
72 73
73 74 }
74 75
75 76 var revlink = '<li style="_STYLE"><span class="desc">';
76 77 revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
77 78 revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
78 79
79 80 graph.vertex = function(x, y, color, parity, cur) \{
80 81
81 82 this.ctx.beginPath();
82 83 color = this.setColor(color, 0.25, 0.75);
83 84 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
84 85 this.ctx.fill();
85 86
86 87 var bg = '<li class="bg parity' + parity + '"></li>';
87 88 var left = (this.columns + 1) * this.bg_height;
88 89 var nstyle = 'padding-left: ' + left + 'px;';
89 90 var item = revlink.replace(/_STYLE/, nstyle);
90 91 item = item.replace(/_PARITY/, 'parity' + parity);
91 92 item = item.replace(/_NODEID/, cur[0]);
92 93 item = item.replace(/_NODEID/, cur[0]);
93 94 item = item.replace(/_DESC/, cur[3]);
94 95 item = item.replace(/_USER/, cur[4]);
95 96 item = item.replace(/_DATE/, cur[5]);
96 97
97 98 var tagspan = '';
98 99 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) \{
99 100 tagspan = '<span class="logtags">';
100 101 if (cur[6][1]) \{
101 102 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
102 103 tagspan += cur[6][0] + '</span> ';
103 104 } else if (!cur[6][1] && cur[6][0] != 'default') \{
104 105 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
105 106 tagspan += cur[6][0] + '</span> ';
106 107 }
107 108 if (cur[7].length) \{
108 109 for (var t in cur[7]) \{
109 110 var tag = cur[7][t];
110 111 tagspan += '<span class="tag">' + tag + '</span> ';
111 112 }
112 113 }
113 114 if (cur[8].length) \{
114 115 for (var b in cur[8]) \{
115 116 var bookmark = cur[8][b];
116 117 tagspan += '<span class="tag">' + bookmark + '</span> ';
117 118 }
118 119 }
119 120 tagspan += '</span>';
120 121 }
121 122
122 123 item = item.replace(/_TAGS/, tagspan);
123 124 return [bg, item];
124 125
125 126 }
126 127
127 128 graph.render(data);
128 129
129 130 // stop hiding script -->
130 131 </script>
131 132
132 133 <div class="navigate">
133 134 <a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
134 135 <a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
135 136 | rev {rev}: {changenav%navgraph}
136 137 </div>
137 138
138 139 </div>
139 140 </div>
140 141
141 142 {footer}
@@ -1,43 +1,44 b''
1 1 {header}
2 2 <title>Help: {topic}</title>
3 3 <link rel="alternate" type="application/atom+xml"
4 4 href="{url}atom-tags" title="Atom feed for {repo|escape}" />
5 5 <link rel="alternate" type="application/rss+xml"
6 6 href="{url}rss-tags" title="RSS feed for {repo|escape}" />
7 7 </head>
8 8 <body>
9 9
10 10 <div class="container">
11 11 <div class="menu">
12 12 <div class="logo">
13 13 <a href="http://mercurial.selenic.com/">
14 14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 15 </div>
16 16 <ul>
17 17 <li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
18 18 <li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
19 19 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
20 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
20 21 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
21 22 </ul>
22 23 <ul>
23 24 <li class="active">help</li>
24 25 </ul>
25 26 </div>
26 27
27 28 <div class="main">
28 29 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
29 30 <h3>Help: {topic}</h3>
30 31
31 32 <form class="search" action="{url}log">
32 33 {sessionvars%hiddenformentry}
33 34 <p><input name="rev" id="search1" type="text" size="30" /></p>
34 35 <div id="hint">find changesets by author, revision,
35 36 files, or words in the commit message</div>
36 37 </form>
37 38 <pre>
38 39 {doc|escape}
39 40 </pre>
40 41 </div>
41 42 </div>
42 43
43 44 {footer}
@@ -1,48 +1,49 b''
1 1 {header}
2 2 <title>Help: {title}</title>
3 3 <link rel="alternate" type="application/atom+xml"
4 4 href="{url}atom-tags" title="Atom feed for {repo|escape}" />
5 5 <link rel="alternate" type="application/rss+xml"
6 6 href="{url}rss-tags" title="RSS feed for {repo|escape}" />
7 7 </head>
8 8 <body>
9 9
10 10 <div class="container">
11 11 <div class="menu">
12 12 <div class="logo">
13 13 <a href="http://mercurial.selenic.com/">
14 14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 15 </div>
16 16 <ul>
17 17 <li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
18 18 <li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
19 19 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
20 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
20 21 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
21 22 </ul>
22 23 <ul>
23 24 <li class="active">help</li>
24 25 </ul>
25 26 </div>
26 27
27 28 <div class="main">
28 29 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
29 30 <form class="search" action="{url}log">
30 31 {sessionvars%hiddenformentry}
31 32 <p><input name="rev" id="search1" type="text" size="30" /></p>
32 33 <div id="hint">find changesets by author, revision,
33 34 files, or words in the commit message</div>
34 35 </form>
35 36 <table class="bigtable">
36 37 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
37 38 {topics % helpentry}
38 39
39 40 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
40 41 {earlycommands % helpentry}
41 42
42 43 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
43 44 {othercommands % helpentry}
44 45 </table>
45 46 </div>
46 47 </div>
47 48
48 49 {footer}
@@ -1,57 +1,58 b''
1 1 {header}
2 2 <title>{repo|escape}: {node|short} {path|escape}</title>
3 3 </head>
4 4 <body>
5 5
6 6 <div class="container">
7 7 <div class="menu">
8 8 <div class="logo">
9 9 <a href="http://mercurial.selenic.com/">
10 10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
11 11 </div>
12 12 <ul>
13 13 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
14 14 <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
15 15 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
16 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
16 17 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
17 18 </ul>
18 19 <ul>
19 20 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
20 21 <li class="active">browse</li>
21 22 </ul>
22 23 <ul>
23 24 {archives%archiveentry}
24 25 </ul>
25 26 <ul>
26 27 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
27 28 </ul>
28 29 </div>
29 30
30 31 <div class="main">
31 32 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
32 33 <h3>directory {path|escape} @ {rev}:{node|short} {tags%changelogtag}</h3>
33 34
34 35 <form class="search" action="{url}log">
35 36 {sessionvars%hiddenformentry}
36 37 <p><input name="rev" id="search1" type="text" size="30" /></p>
37 38 <div id="hint">find changesets by author, revision,
38 39 files, or words in the commit message</div>
39 40 </form>
40 41
41 42 <table class="bigtable">
42 43 <tr>
43 44 <th class="name">name</th>
44 45 <th class="size">size</th>
45 46 <th class="permissions">permissions</th>
46 47 </tr>
47 48 <tr class="fileline parity{upparity}">
48 49 <td class="name"><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
49 50 <td class="size"></td>
50 51 <td class="permissions">drwxr-xr-x</td>
51 52 </tr>
52 53 {dentries%direntry}
53 54 {fentries%fileentry}
54 55 </table>
55 56 </div>
56 57 </div>
57 58 {footer}
@@ -1,201 +1,213 b''
1 1 default = 'shortlog'
2 2
3 3 mimetype = 'text/html; charset={encoding}'
4 4 header = header.tmpl
5 5 footer = footer.tmpl
6 6 search = search.tmpl
7 7
8 8 changelog = shortlog.tmpl
9 9 shortlog = shortlog.tmpl
10 10 shortlogentry = shortlogentry.tmpl
11 11 graph = graph.tmpl
12 12 help = help.tmpl
13 13 helptopics = helptopics.tmpl
14 14
15 15 helpentry = '<tr><td><a href="{url}help/{topic|escape}{sessionvars%urlparameter}">{topic|escape}</a></td><td>{summary|escape}</td></tr>'
16 16
17 17 naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
18 18 navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
19 19 navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
20 20 filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
21 21 filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
22 22 filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
23 23 filenolink = '{file|escape} '
24 24 fileellipses = '...'
25 25 changelogentry = shortlogentry.tmpl
26 26 searchentry = shortlogentry.tmpl
27 27 changeset = changeset.tmpl
28 28 manifest = manifest.tmpl
29 29
30 30 nav = '{before%naventry} {after%naventry}'
31 31 navshort = '{before%navshortentry}{after%navshortentry}'
32 32 navgraph = '{before%navgraphentry}{after%navgraphentry}'
33 33 filenav = '{before%filenaventry}{after%filenaventry}'
34 34
35 35 direntry = '
36 36 <tr class="fileline parity{parity}">
37 37 <td class="name">
38 38 <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
39 39 <img src="{staticurl}coal-folder.png" alt="dir."/> {basename|escape}/
40 40 </a>
41 41 <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
42 42 {emptydirs|escape}
43 43 </a>
44 44 </td>
45 45 <td class="size"></td>
46 46 <td class="permissions">drwxr-xr-x</td>
47 47 </tr>'
48 48
49 49 fileentry = '
50 50 <tr class="fileline parity{parity}">
51 51 <td class="filename">
52 52 <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
53 53 <img src="{staticurl}coal-file.png" alt="file"/> {basename|escape}
54 54 </a>
55 55 </td>
56 56 <td class="size">{size}</td>
57 57 <td class="permissions">{permissions|permissions}</td>
58 58 </tr>'
59 59
60 60 filerevision = filerevision.tmpl
61 61 fileannotate = fileannotate.tmpl
62 62 filediff = filediff.tmpl
63 63 filelog = filelog.tmpl
64 64 fileline = '
65 65 <div class="parity{parity} source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</div>'
66 66 filelogentry = filelogentry.tmpl
67 67
68 68 annotateline = '
69 69 <tr class="parity{parity}">
70 70 <td class="annotate">
71 71 <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
72 72 title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
73 73 </td>
74 74 <td class="source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</td>
75 75 </tr>'
76 76
77 77 diffblock = '<div class="source bottomline parity{parity}"><pre>{lines}</pre></div>'
78 78 difflineplus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="plusline">{line|escape}</span>'
79 79 difflineminus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="minusline">{line|escape}</span>'
80 80 difflineat = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="atline">{line|escape}</span>'
81 81 diffline = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
82 82
83 83 changelogparent = '
84 84 <tr>
85 85 <th class="parent">parent {rev}:</th>
86 86 <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
87 87 </tr>'
88 88
89 89 changesetparent = '<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> '
90 90
91 91 filerevparent = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a> '
92 92 filerevchild = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a> '
93 93
94 94 filerename = '{file|escape}@'
95 95 filelogrename = '
96 96 <tr>
97 97 <th>base:</th>
98 98 <td>
99 99 <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
100 100 {file|escape}@{node|short}
101 101 </a>
102 102 </td>
103 103 </tr>'
104 104 fileannotateparent = '
105 105 <tr>
106 106 <td class="metatag">parent:</td>
107 107 <td>
108 108 <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
109 109 {rename%filerename}{node|short}
110 110 </a>
111 111 </td>
112 112 </tr>'
113 113 changesetchild = ' <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>'
114 114 changelogchild = '
115 115 <tr>
116 116 <th class="child">child</th>
117 117 <td class="child">
118 118 <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
119 119 {node|short}
120 120 </a>
121 121 </td>
122 122 </tr>'
123 123 fileannotatechild = '
124 124 <tr>
125 125 <td class="metatag">child:</td>
126 126 <td>
127 127 <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
128 128 {node|short}
129 129 </a>
130 130 </td>
131 131 </tr>'
132 132 tags = tags.tmpl
133 133 tagentry = '
134 134 <tr class="tagEntry parity{parity}">
135 135 <td>
136 136 <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
137 137 {tag|escape}
138 138 </a>
139 139 </td>
140 140 <td class="node">
141 141 {node|short}
142 142 </td>
143 143 </tr>'
144 bookmarks = bookmarks.tmpl
145 bookmarkentry = '
146 <tr class="tagEntry parity{parity}">
147 <td>
148 <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
149 {bookmark|escape}
150 </a>
151 </td>
152 <td class="node">
153 {node|short}
154 </td>
155 </tr>'
144 156 branches = branches.tmpl
145 157 branchentry = '
146 158 <tr class="tagEntry parity{parity}">
147 159 <td>
148 160 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
149 161 {branch|escape}
150 162 </a>
151 163 </td>
152 164 <td class="node">
153 165 {node|short}
154 166 </td>
155 167 </tr>'
156 168 changelogtag = '<span class="tag">{name|escape}</span> '
157 169 changesettag = '<span class="tag">{tag|escape}</span> '
158 170 changesetbookmark = '<span class="tag">{bookmark|escape}</span> '
159 171 changelogbranchhead = '<span class="branchhead">{name|escape}</span> '
160 172 changelogbranchname = '<span class="branchname">{name|escape}</span> '
161 173
162 174 filediffparent = '
163 175 <tr>
164 176 <th class="parent">parent {rev}:</th>
165 177 <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
166 178 </tr>'
167 179 filelogparent = '
168 180 <tr>
169 181 <th>parent {rev}:</th>
170 182 <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
171 183 </tr>'
172 184 filediffchild = '
173 185 <tr>
174 186 <th class="child">child {rev}:</th>
175 187 <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
176 188 </td>
177 189 </tr>'
178 190 filelogchild = '
179 191 <tr>
180 192 <th>child {rev}:</th>
181 193 <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
182 194 </tr>'
183 195
184 196 indexentry = '
185 197 <tr class="parity{parity}">
186 198 <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
187 199 <td>{description}</td>
188 200 <td>{contact|obfuscate}</td>
189 201 <td class="age">{lastchange|age}</td>
190 202 <td class="indexlinks">{archives%indexarchiveentry}</td>
191 203 </tr>\n'
192 204 indexarchiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">&nbsp;&darr;{type|escape}</a>'
193 205 index = index.tmpl
194 206 archiveentry = '
195 207 <li>
196 208 <a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a>
197 209 </li>'
198 210 notfound = notfound.tmpl
199 211 error = error.tmpl
200 212 urlparameter = '{separator}{name}={value|urlescape}'
201 213 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
@@ -1,54 +1,55 b''
1 1 {header}
2 2 <title>{repo|escape}: searching for {query|escape}</title>
3 3 </head>
4 4 <body>
5 5
6 6 <div class="container">
7 7 <div class="menu">
8 8 <div class="logo">
9 9 <a href="http://mercurial.selenic.com/">
10 10 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
11 11 </div>
12 12 <ul>
13 13 <li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
14 14 <li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
15 15 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
16 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
16 17 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
17 18 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
18 19 </ul>
19 20 </div>
20 21
21 22 <div class="main">
22 23 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
23 24 <h3>searching for '{query|escape}'</h3>
24 25
25 26 <form class="search" action="{url}log">
26 27 {sessionvars%hiddenformentry}
27 28 <p><input name="rev" id="search1" type="text" size="30"></p>
28 29 <div id="hint">find changesets by author, revision,
29 30 files, or words in the commit message</div>
30 31 </form>
31 32
32 33 <div class="navigate">
33 34 <a href="{url}search/{lessvars%urlparameter}">less</a>
34 35 <a href="{url}search/{morevars%urlparameter}">more</a>
35 36 </div>
36 37
37 38 <table class="bigtable">
38 39 <tr>
39 40 <th class="age">age</th>
40 41 <th class="author">author</th>
41 42 <th class="description">description</th>
42 43 </tr>
43 44 {entries}
44 45 </table>
45 46
46 47 <div class="navigate">
47 48 <a href="{url}search/{lessvars%urlparameter}">less</a>
48 49 <a href="{url}search/{morevars%urlparameter}">more</a>
49 50 </div>
50 51
51 52 </div>
52 53 </div>
53 54
54 55 {footer}
@@ -1,69 +1,70 b''
1 1 {header}
2 2 <title>{repo|escape}: log</title>
3 3 <link rel="alternate" type="application/atom+xml"
4 4 href="{url}atom-log" title="Atom feed for {repo|escape}" />
5 5 <link rel="alternate" type="application/rss+xml"
6 6 href="{url}rss-log" title="RSS feed for {repo|escape}" />
7 7 </head>
8 8 <body>
9 9
10 10 <div class="container">
11 11 <div class="menu">
12 12 <div class="logo">
13 13 <a href="http://mercurial.selenic.com/">
14 14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 15 </div>
16 16 <ul>
17 17 <li class="active">log</li>
18 18 <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
19 19 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
20 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
20 21 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
21 22 </ul>
22 23 <ul>
23 24 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
24 25 <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
25 26 </ul>
26 27 <ul>
27 28 {archives%archiveentry}
28 29 </ul>
29 30 <ul>
30 31 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
31 32 </ul>
32 33 </div>
33 34
34 35 <div class="main">
35 36 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
36 37 <h3>log</h3>
37 38
38 39 <form class="search" action="{url}log">
39 40 {sessionvars%hiddenformentry}
40 41 <p><input name="rev" id="search1" type="text" size="30" /></p>
41 42 <div id="hint">find changesets by author, revision,
42 43 files, or words in the commit message</div>
43 44 </form>
44 45
45 46 <div class="navigate">
46 47 <a href="{url}shortlog/{rev}{lessvars%urlparameter}">less</a>
47 48 <a href="{url}shortlog/{rev}{morevars%urlparameter}">more</a>
48 49 | rev {rev}: {changenav%navshort}
49 50 </div>
50 51
51 52 <table class="bigtable">
52 53 <tr>
53 54 <th class="age">age</th>
54 55 <th class="author">author</th>
55 56 <th class="description">description</th>
56 57 </tr>
57 58 {entries%shortlogentry}
58 59 </table>
59 60
60 61 <div class="navigate">
61 62 <a href="{url}shortlog/{rev}{lessvars%urlparameter}">less</a>
62 63 <a href="{url}shortlog/{rev}{morevars%urlparameter}">more</a>
63 64 | rev {rev}: {changenav%navshort}
64 65 </div>
65 66
66 67 </div>
67 68 </div>
68 69
69 70 {footer}
@@ -1,48 +1,49 b''
1 1 {header}
2 2 <title>{repo|escape}: tags</title>
3 3 <link rel="alternate" type="application/atom+xml"
4 4 href="{url}atom-tags" title="Atom feed for {repo|escape}: tags" />
5 5 <link rel="alternate" type="application/rss+xml"
6 6 href="{url}rss-tags" title="RSS feed for {repo|escape}: tags" />
7 7 </head>
8 8 <body>
9 9
10 10 <div class="container">
11 11 <div class="menu">
12 12 <div class="logo">
13 13 <a href="http://mercurial.selenic.com/">
14 14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 15 </div>
16 16 <ul>
17 17 <li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
18 18 <li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
19 19 <li class="active">tags</li>
20 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
20 21 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
21 22 </ul>
22 23 <ul>
23 24 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
24 25 </ul>
25 26 </div>
26 27
27 28 <div class="main">
28 29 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
29 30 <h3>tags</h3>
30 31
31 32 <form class="search" action="{url}log">
32 33 {sessionvars%hiddenformentry}
33 34 <p><input name="rev" id="search1" type="text" size="30" /></p>
34 35 <div id="hint">find changesets by author, revision,
35 36 files, or words in the commit message</div>
36 37 </form>
37 38
38 39 <table class="bigtable">
39 40 <tr>
40 41 <th>tag</th>
41 42 <th>node</th>
42 43 </tr>
43 44 {entries%tagentry}
44 45 </table>
45 46 </div>
46 47 </div>
47 48
48 49 {footer}
@@ -1,1078 +1,1081 b''
1 1 An attempt at more fully testing the hgweb web interface.
2 2 The following things are tested elsewhere and are therefore omitted:
3 3 - archive, tested in test-archive
4 4 - unbundle, tested in test-push-http
5 5 - changegroupsubset, tested in test-pull
6 6
7 7 Set up the repo
8 8
9 9 $ hg init test
10 10 $ cd test
11 11 $ mkdir da
12 12 $ echo foo > da/foo
13 13 $ echo foo > foo
14 14 $ hg ci -Ambase
15 15 adding da/foo
16 16 adding foo
17 17 $ hg tag 1.0
18 18 $ hg bookmark something
19 19 $ echo another > foo
20 20 $ hg branch stable
21 21 marked working directory as branch stable
22 22 $ hg ci -Ambranch
23 23 $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
24 24 $ cat hg.pid >> $DAEMON_PIDS
25 25
26 26 Logs and changes
27 27
28 28 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom'
29 29 200 Script output follows
30 30
31 31 <?xml version="1.0" encoding="ascii"?>
32 32 <feed xmlns="http://www.w3.org/2005/Atom">
33 33 <!-- Changelog -->
34 34 <id>http://*:$HGPORT/</id> (glob)
35 35 <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
36 36 <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
37 37 <title>test Changelog</title>
38 38 <updated>1970-01-01T00:00:00+00:00</updated>
39 39
40 40 <entry>
41 41 <title>branch</title>
42 42 <id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
43 43 <link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
44 44 <author>
45 45 <name>test</name>
46 46 <email>&#116;&#101;&#115;&#116;</email>
47 47 </author>
48 48 <updated>1970-01-01T00:00:00+00:00</updated>
49 49 <published>1970-01-01T00:00:00+00:00</published>
50 50 <content type="xhtml">
51 51 <div xmlns="http://www.w3.org/1999/xhtml">
52 52 <pre xml:space="preserve">branch</pre>
53 53 </div>
54 54 </content>
55 55 </entry>
56 56 <entry>
57 57 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
58 58 <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
59 59 <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
60 60 <author>
61 61 <name>test</name>
62 62 <email>&#116;&#101;&#115;&#116;</email>
63 63 </author>
64 64 <updated>1970-01-01T00:00:00+00:00</updated>
65 65 <published>1970-01-01T00:00:00+00:00</published>
66 66 <content type="xhtml">
67 67 <div xmlns="http://www.w3.org/1999/xhtml">
68 68 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
69 69 </div>
70 70 </content>
71 71 </entry>
72 72 <entry>
73 73 <title>base</title>
74 74 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
75 75 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
76 76 <author>
77 77 <name>test</name>
78 78 <email>&#116;&#101;&#115;&#116;</email>
79 79 </author>
80 80 <updated>1970-01-01T00:00:00+00:00</updated>
81 81 <published>1970-01-01T00:00:00+00:00</published>
82 82 <content type="xhtml">
83 83 <div xmlns="http://www.w3.org/1999/xhtml">
84 84 <pre xml:space="preserve">base</pre>
85 85 </div>
86 86 </content>
87 87 </entry>
88 88
89 89 </feed>
90 90 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom'
91 91 200 Script output follows
92 92
93 93 <?xml version="1.0" encoding="ascii"?>
94 94 <feed xmlns="http://www.w3.org/2005/Atom">
95 95 <!-- Changelog -->
96 96 <id>http://*:$HGPORT/</id> (glob)
97 97 <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
98 98 <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
99 99 <title>test Changelog</title>
100 100 <updated>1970-01-01T00:00:00+00:00</updated>
101 101
102 102 <entry>
103 103 <title>branch</title>
104 104 <id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
105 105 <link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
106 106 <author>
107 107 <name>test</name>
108 108 <email>&#116;&#101;&#115;&#116;</email>
109 109 </author>
110 110 <updated>1970-01-01T00:00:00+00:00</updated>
111 111 <published>1970-01-01T00:00:00+00:00</published>
112 112 <content type="xhtml">
113 113 <div xmlns="http://www.w3.org/1999/xhtml">
114 114 <pre xml:space="preserve">branch</pre>
115 115 </div>
116 116 </content>
117 117 </entry>
118 118 <entry>
119 119 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
120 120 <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
121 121 <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
122 122 <author>
123 123 <name>test</name>
124 124 <email>&#116;&#101;&#115;&#116;</email>
125 125 </author>
126 126 <updated>1970-01-01T00:00:00+00:00</updated>
127 127 <published>1970-01-01T00:00:00+00:00</published>
128 128 <content type="xhtml">
129 129 <div xmlns="http://www.w3.org/1999/xhtml">
130 130 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
131 131 </div>
132 132 </content>
133 133 </entry>
134 134 <entry>
135 135 <title>base</title>
136 136 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
137 137 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
138 138 <author>
139 139 <name>test</name>
140 140 <email>&#116;&#101;&#115;&#116;</email>
141 141 </author>
142 142 <updated>1970-01-01T00:00:00+00:00</updated>
143 143 <published>1970-01-01T00:00:00+00:00</published>
144 144 <content type="xhtml">
145 145 <div xmlns="http://www.w3.org/1999/xhtml">
146 146 <pre xml:space="preserve">base</pre>
147 147 </div>
148 148 </content>
149 149 </entry>
150 150
151 151 </feed>
152 152 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom'
153 153 200 Script output follows
154 154
155 155 <?xml version="1.0" encoding="ascii"?>
156 156 <feed xmlns="http://www.w3.org/2005/Atom">
157 157 <id>http://*:$HGPORT/atom-log/tip/foo</id> (glob)
158 158 <link rel="self" href="http://*:$HGPORT/atom-log/tip/foo"/> (glob)
159 159 <title>test: foo history</title>
160 160 <updated>1970-01-01T00:00:00+00:00</updated>
161 161
162 162 <entry>
163 163 <title>base</title>
164 164 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
165 165 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
166 166 <author>
167 167 <name>test</name>
168 168 <email>&#116;&#101;&#115;&#116;</email>
169 169 </author>
170 170 <updated>1970-01-01T00:00:00+00:00</updated>
171 171 <published>1970-01-01T00:00:00+00:00</published>
172 172 <content type="xhtml">
173 173 <div xmlns="http://www.w3.org/1999/xhtml">
174 174 <pre xml:space="preserve">base</pre>
175 175 </div>
176 176 </content>
177 177 </entry>
178 178
179 179 </feed>
180 180 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
181 181 200 Script output follows
182 182
183 183 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
184 184 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
185 185 <head>
186 186 <link rel="icon" href="/static/hgicon.png" type="image/png" />
187 187 <meta name="robots" content="index, nofollow" />
188 188 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
189 189
190 190 <title>test: log</title>
191 191 <link rel="alternate" type="application/atom+xml"
192 192 href="/atom-log" title="Atom feed for test" />
193 193 <link rel="alternate" type="application/rss+xml"
194 194 href="/rss-log" title="RSS feed for test" />
195 195 </head>
196 196 <body>
197 197
198 198 <div class="container">
199 199 <div class="menu">
200 200 <div class="logo">
201 201 <a href="http://mercurial.selenic.com/">
202 202 <img src="/static/hglogo.png" alt="mercurial" /></a>
203 203 </div>
204 204 <ul>
205 205 <li class="active">log</li>
206 206 <li><a href="/graph/1d22e65f027e">graph</a></li>
207 207 <li><a href="/tags">tags</a></li>
208 <li><a href="/bookmarks">bookmarks</a></li>
208 209 <li><a href="/branches">branches</a></li>
209 210 </ul>
210 211 <ul>
211 212 <li><a href="/rev/1d22e65f027e">changeset</a></li>
212 213 <li><a href="/file/1d22e65f027e">browse</a></li>
213 214 </ul>
214 215 <ul>
215 216
216 217 </ul>
217 218 <ul>
218 219 <li><a href="/help">help</a></li>
219 220 </ul>
220 221 </div>
221 222
222 223 <div class="main">
223 224 <h2><a href="/">test</a></h2>
224 225 <h3>log</h3>
225 226
226 227 <form class="search" action="/log">
227 228
228 229 <p><input name="rev" id="search1" type="text" size="30" /></p>
229 230 <div id="hint">find changesets by author, revision,
230 231 files, or words in the commit message</div>
231 232 </form>
232 233
233 234 <div class="navigate">
234 235 <a href="/shortlog/2?revcount=30">less</a>
235 236 <a href="/shortlog/2?revcount=120">more</a>
236 237 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
237 238 </div>
238 239
239 240 <table class="bigtable">
240 241 <tr>
241 242 <th class="age">age</th>
242 243 <th class="author">author</th>
243 244 <th class="description">description</th>
244 245 </tr>
245 246 <tr class="parity0">
246 247 <td class="age">1970-01-01</td>
247 248 <td class="author">test</td>
248 249 <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> <span class="tag">something</span> </td>
249 250 </tr>
250 251 <tr class="parity1">
251 252 <td class="age">1970-01-01</td>
252 253 <td class="author">test</td>
253 254 <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
254 255 </tr>
255 256 <tr class="parity0">
256 257 <td class="age">1970-01-01</td>
257 258 <td class="author">test</td>
258 259 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> </td>
259 260 </tr>
260 261
261 262 </table>
262 263
263 264 <div class="navigate">
264 265 <a href="/shortlog/2?revcount=30">less</a>
265 266 <a href="/shortlog/2?revcount=120">more</a>
266 267 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
267 268 </div>
268 269
269 270 </div>
270 271 </div>
271 272
272 273
273 274
274 275 </body>
275 276 </html>
276 277
277 278 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
278 279 200 Script output follows
279 280
280 281 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
281 282 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
282 283 <head>
283 284 <link rel="icon" href="/static/hgicon.png" type="image/png" />
284 285 <meta name="robots" content="index, nofollow" />
285 286 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
286 287
287 288 <title>test: 2ef0ac749a14</title>
288 289 </head>
289 290 <body>
290 291 <div class="container">
291 292 <div class="menu">
292 293 <div class="logo">
293 294 <a href="http://mercurial.selenic.com/">
294 295 <img src="/static/hglogo.png" alt="mercurial" /></a>
295 296 </div>
296 297 <ul>
297 298 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
298 299 <li><a href="/graph/2ef0ac749a14">graph</a></li>
299 300 <li><a href="/tags">tags</a></li>
301 <li><a href="/bookmarks">bookmarks</a></li>
300 302 <li><a href="/branches">branches</a></li>
301 303 </ul>
302 304 <ul>
303 305 <li class="active">changeset</li>
304 306 <li><a href="/raw-rev/2ef0ac749a14">raw</a></li>
305 307 <li><a href="/file/2ef0ac749a14">browse</a></li>
306 308 </ul>
307 309 <ul>
308 310
309 311 </ul>
310 312 <ul>
311 313 <li><a href="/help">help</a></li>
312 314 </ul>
313 315 </div>
314 316
315 317 <div class="main">
316 318
317 319 <h2><a href="/">test</a></h2>
318 320 <h3>changeset 0:2ef0ac749a14 <span class="tag">1.0</span> </h3>
319 321
320 322 <form class="search" action="/log">
321 323
322 324 <p><input name="rev" id="search1" type="text" size="30" /></p>
323 325 <div id="hint">find changesets by author, revision,
324 326 files, or words in the commit message</div>
325 327 </form>
326 328
327 329 <div class="description">base</div>
328 330
329 331 <table id="changesetEntry">
330 332 <tr>
331 333 <th class="author">author</th>
332 334 <td class="author">&#116;&#101;&#115;&#116;</td>
333 335 </tr>
334 336 <tr>
335 337 <th class="date">date</th>
336 338 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td></tr>
337 339 <tr>
338 340 <th class="author">parents</th>
339 341 <td class="author"></td>
340 342 </tr>
341 343 <tr>
342 344 <th class="author">children</th>
343 345 <td class="author"> <a href="/rev/a4f92ed23982">a4f92ed23982</a></td>
344 346 </tr>
345 347 <tr>
346 348 <th class="files">files</th>
347 349 <td class="files"><a href="/file/2ef0ac749a14/da/foo">da/foo</a> <a href="/file/2ef0ac749a14/foo">foo</a> </td>
348 350 </tr>
349 351 </table>
350 352
351 353 <div class="overflow">
352 354 <div class="sourcefirst"> line diff</div>
353 355
354 356 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
355 357 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/da/foo Thu Jan 01 00:00:00 1970 +0000
356 358 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
357 359 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+foo
358 360 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
359 361 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/foo Thu Jan 01 00:00:00 1970 +0000
360 362 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
361 363 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+foo
362 364 </span></pre></div>
363 365 </div>
364 366
365 367 </div>
366 368 </div>
367 369
368 370
369 371 </body>
370 372 </html>
371 373
372 374 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
373 375 200 Script output follows
374 376
375 377
376 378 # HG changeset patch
377 379 # User test
378 380 # Date 0 0
379 381 # Node ID a4f92ed23982be056b9852de5dfe873eaac7f0de
380 382 # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
381 383 Added tag 1.0 for changeset 2ef0ac749a14
382 384
383 385 diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags
384 386 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
385 387 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
386 388 @@ -0,0 +1,1 @@
387 389 +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
388 390
389 391 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
390 392 200 Script output follows
391 393
392 394 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
393 395 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
394 396 <head>
395 397 <link rel="icon" href="/static/hgicon.png" type="image/png" />
396 398 <meta name="robots" content="index, nofollow" />
397 399 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
398 400
399 401 <title>test: searching for base</title>
400 402 </head>
401 403 <body>
402 404
403 405 <div class="container">
404 406 <div class="menu">
405 407 <div class="logo">
406 408 <a href="http://mercurial.selenic.com/">
407 409 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
408 410 </div>
409 411 <ul>
410 412 <li><a href="/shortlog">log</a></li>
411 413 <li><a href="/graph">graph</a></li>
412 414 <li><a href="/tags">tags</a></li>
415 <li><a href="/bookmarks">bookmarks</a></li>
413 416 <li><a href="/branches">branches</a></li>
414 417 <li><a href="/help">help</a></li>
415 418 </ul>
416 419 </div>
417 420
418 421 <div class="main">
419 422 <h2><a href="/">test</a></h2>
420 423 <h3>searching for 'base'</h3>
421 424
422 425 <form class="search" action="/log">
423 426
424 427 <p><input name="rev" id="search1" type="text" size="30"></p>
425 428 <div id="hint">find changesets by author, revision,
426 429 files, or words in the commit message</div>
427 430 </form>
428 431
429 432 <div class="navigate">
430 433 <a href="/search/?rev=base&revcount=5">less</a>
431 434 <a href="/search/?rev=base&revcount=20">more</a>
432 435 </div>
433 436
434 437 <table class="bigtable">
435 438 <tr>
436 439 <th class="age">age</th>
437 440 <th class="author">author</th>
438 441 <th class="description">description</th>
439 442 </tr>
440 443 <tr class="parity0">
441 444 <td class="age">1970-01-01</td>
442 445 <td class="author">test</td>
443 446 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> </td>
444 447 </tr>
445 448
446 449 </table>
447 450
448 451 <div class="navigate">
449 452 <a href="/search/?rev=base&revcount=5">less</a>
450 453 <a href="/search/?rev=base&revcount=20">more</a>
451 454 </div>
452 455
453 456 </div>
454 457 </div>
455 458
456 459
457 460
458 461 </body>
459 462 </html>
460 463
461 464
462 465 File-related
463 466
464 467 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
465 468 200 Script output follows
466 469
467 470 foo
468 471 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
469 472 200 Script output follows
470 473
471 474
472 475 test@0: foo
473 476
474 477
475 478
476 479
477 480 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
478 481 200 Script output follows
479 482
480 483
481 484 drwxr-xr-x da
482 485 -rw-r--r-- 45 .hgtags
483 486 -rw-r--r-- 4 foo
484 487
485 488
486 489 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
487 490 200 Script output follows
488 491
489 492 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
490 493 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
491 494 <head>
492 495 <link rel="icon" href="/static/hgicon.png" type="image/png" />
493 496 <meta name="robots" content="index, nofollow" />
494 497 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
495 498
496 499 <title>test: a4f92ed23982 foo</title>
497 500 </head>
498 501 <body>
499 502
500 503 <div class="container">
501 504 <div class="menu">
502 505 <div class="logo">
503 506 <a href="http://mercurial.selenic.com/">
504 507 <img src="/static/hglogo.png" alt="mercurial" /></a>
505 508 </div>
506 509 <ul>
507 510 <li><a href="/shortlog/a4f92ed23982">log</a></li>
508 511 <li><a href="/graph/a4f92ed23982">graph</a></li>
509 512 <li><a href="/tags">tags</a></li>
510 513 <li><a href="/branches">branches</a></li>
511 514 </ul>
512 515 <ul>
513 516 <li><a href="/rev/a4f92ed23982">changeset</a></li>
514 517 <li><a href="/file/a4f92ed23982/">browse</a></li>
515 518 </ul>
516 519 <ul>
517 520 <li class="active">file</li>
518 521 <li><a href="/file/tip/foo">latest</a></li>
519 522 <li><a href="/diff/a4f92ed23982/foo">diff</a></li>
520 523 <li><a href="/annotate/a4f92ed23982/foo">annotate</a></li>
521 524 <li><a href="/log/a4f92ed23982/foo">file log</a></li>
522 525 <li><a href="/raw-file/a4f92ed23982/foo">raw</a></li>
523 526 </ul>
524 527 <ul>
525 528 <li><a href="/help">help</a></li>
526 529 </ul>
527 530 </div>
528 531
529 532 <div class="main">
530 533 <h2><a href="/">test</a></h2>
531 534 <h3>view foo @ 1:a4f92ed23982</h3>
532 535
533 536 <form class="search" action="/log">
534 537
535 538 <p><input name="rev" id="search1" type="text" size="30" /></p>
536 539 <div id="hint">find changesets by author, revision,
537 540 files, or words in the commit message</div>
538 541 </form>
539 542
540 543 <div class="description">Added tag 1.0 for changeset 2ef0ac749a14</div>
541 544
542 545 <table id="changesetEntry">
543 546 <tr>
544 547 <th class="author">author</th>
545 548 <td class="author">&#116;&#101;&#115;&#116;</td>
546 549 </tr>
547 550 <tr>
548 551 <th class="date">date</th>
549 552 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
550 553 </tr>
551 554 <tr>
552 555 <th class="author">parents</th>
553 556 <td class="author"></td>
554 557 </tr>
555 558 <tr>
556 559 <th class="author">children</th>
557 560 <td class="author"><a href="/file/1d22e65f027e/foo">1d22e65f027e</a> </td>
558 561 </tr>
559 562
560 563 </table>
561 564
562 565 <div class="overflow">
563 566 <div class="sourcefirst"> line source</div>
564 567
565 568 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> foo
566 569 </div>
567 570 <div class="sourcelast"></div>
568 571 </div>
569 572 </div>
570 573 </div>
571 574
572 575
573 576
574 577 </body>
575 578 </html>
576 579
577 580 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
578 581 200 Script output follows
579 582
580 583
581 584 diff -r 000000000000 -r a4f92ed23982 foo
582 585 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
583 586 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
584 587 @@ -0,0 +1,1 @@
585 588 +foo
586 589
587 590
588 591
589 592
590 593
591 594 Overviews
592 595
593 596 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags'
594 597 200 Script output follows
595 598
596 599 tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
597 600 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
598 601 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches'
599 602 200 Script output follows
600 603
601 604 stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open
602 605 default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive
603 606 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
604 607 200 Script output follows
605 608
606 609 <?xml version="1.0" encoding="ascii"?>
607 610 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
608 611 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
609 612 <head>
610 613 <link rel="icon" href="/static/hgicon.png" type="image/png" />
611 614 <meta name="robots" content="index, nofollow"/>
612 615 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
613 616
614 617
615 618 <title>test: Summary</title>
616 619 <link rel="alternate" type="application/atom+xml"
617 620 href="/atom-log" title="Atom feed for test"/>
618 621 <link rel="alternate" type="application/rss+xml"
619 622 href="/rss-log" title="RSS feed for test"/>
620 623 </head>
621 624 <body>
622 625
623 626 <div class="page_header">
624 627 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / summary
625 628
626 629 <form action="/log">
627 630 <input type="hidden" name="style" value="gitweb" />
628 631 <div class="search">
629 632 <input type="text" name="rev" />
630 633 </div>
631 634 </form>
632 635 </div>
633 636
634 637 <div class="page_nav">
635 638 summary |
636 639 <a href="/shortlog?style=gitweb">shortlog</a> |
637 640 <a href="/log?style=gitweb">changelog</a> |
638 641 <a href="/graph?style=gitweb">graph</a> |
639 642 <a href="/tags?style=gitweb">tags</a> |
640 643 <a href="/branches?style=gitweb">branches</a> |
641 644 <a href="/file/1d22e65f027e?style=gitweb">files</a> |
642 645 <a href="/help?style=gitweb">help</a>
643 646 <br/>
644 647 </div>
645 648
646 649 <div class="title">&nbsp;</div>
647 650 <table cellspacing="0">
648 651 <tr><td>description</td><td>unknown</td></tr>
649 652 <tr><td>owner</td><td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td></tr>
650 653 <tr><td>last change</td><td>Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
651 654 </table>
652 655
653 656 <div><a class="title" href="/shortlog?style=gitweb">changes</a></div>
654 657 <table cellspacing="0">
655 658
656 659 <tr class="parity0">
657 660 <td class="age"><i>1970-01-01</i></td>
658 661 <td><i>test</i></td>
659 662 <td>
660 663 <a class="list" href="/rev/1d22e65f027e?style=gitweb">
661 664 <b>branch</b>
662 665 <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> </span>
663 666 </a>
664 667 </td>
665 668 <td class="link" nowrap>
666 669 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
667 670 <a href="/file/1d22e65f027e?style=gitweb">files</a>
668 671 </td>
669 672 </tr>
670 673 <tr class="parity1">
671 674 <td class="age"><i>1970-01-01</i></td>
672 675 <td><i>test</i></td>
673 676 <td>
674 677 <a class="list" href="/rev/a4f92ed23982?style=gitweb">
675 678 <b>Added tag 1.0 for changeset 2ef0ac749a14</b>
676 679 <span class="logtags"><span class="branchtag" title="default">default</span> </span>
677 680 </a>
678 681 </td>
679 682 <td class="link" nowrap>
680 683 <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> |
681 684 <a href="/file/a4f92ed23982?style=gitweb">files</a>
682 685 </td>
683 686 </tr>
684 687 <tr class="parity0">
685 688 <td class="age"><i>1970-01-01</i></td>
686 689 <td><i>test</i></td>
687 690 <td>
688 691 <a class="list" href="/rev/2ef0ac749a14?style=gitweb">
689 692 <b>base</b>
690 693 <span class="logtags"><span class="tagtag" title="1.0">1.0</span> </span>
691 694 </a>
692 695 </td>
693 696 <td class="link" nowrap>
694 697 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
695 698 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
696 699 </td>
697 700 </tr>
698 701 <tr class="light"><td colspan="4"><a class="list" href="/shortlog?style=gitweb">...</a></td></tr>
699 702 </table>
700 703
701 704 <div><a class="title" href="/tags?style=gitweb">tags</a></div>
702 705 <table cellspacing="0">
703 706
704 707 <tr class="parity0">
705 708 <td class="age"><i>1970-01-01</i></td>
706 709 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td>
707 710 <td class="link">
708 711 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
709 712 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
710 713 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
711 714 </td>
712 715 </tr>
713 716 <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
714 717 </table>
715 718
716 719 <div><a class="title" href="#">branches</a></div>
717 720 <table cellspacing="0">
718 721
719 722 <tr class="parity0">
720 723 <td class="age"><i>1970-01-01</i></td>
721 724 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
722 725 <td class="">stable</td>
723 726 <td class="link">
724 727 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
725 728 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
726 729 <a href="/file/1d22e65f027e?style=gitweb">files</a>
727 730 </td>
728 731 </tr>
729 732 <tr class="parity1">
730 733 <td class="age"><i>1970-01-01</i></td>
731 734 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
732 735 <td class="">default</td>
733 736 <td class="link">
734 737 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
735 738 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
736 739 <a href="/file/a4f92ed23982?style=gitweb">files</a>
737 740 </td>
738 741 </tr>
739 742 <tr class="light">
740 743 <td colspan="4"><a class="list" href="#">...</a></td>
741 744 </tr>
742 745 </table>
743 746 <div class="page_footer">
744 747 <div class="page_footer_text">test</div>
745 748 <div class="rss_logo">
746 749 <a href="/rss-log">RSS</a>
747 750 <a href="/atom-log">Atom</a>
748 751 </div>
749 752 <br />
750 753
751 754 </div>
752 755 </body>
753 756 </html>
754 757
755 758 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
756 759 200 Script output follows
757 760
758 761 <?xml version="1.0" encoding="ascii"?>
759 762 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
760 763 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
761 764 <head>
762 765 <link rel="icon" href="/static/hgicon.png" type="image/png" />
763 766 <meta name="robots" content="index, nofollow"/>
764 767 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
765 768
766 769
767 770 <title>test: Graph</title>
768 771 <link rel="alternate" type="application/atom+xml"
769 772 href="/atom-log" title="Atom feed for test"/>
770 773 <link rel="alternate" type="application/rss+xml"
771 774 href="/rss-log" title="RSS feed for test"/>
772 775 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
773 776 </head>
774 777 <body>
775 778
776 779 <div class="page_header">
777 780 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / graph
778 781 </div>
779 782
780 783 <form action="/log">
781 784 <input type="hidden" name="style" value="gitweb" />
782 785 <div class="search">
783 786 <input type="text" name="rev" />
784 787 </div>
785 788 </form>
786 789 <div class="page_nav">
787 790 <a href="/summary?style=gitweb">summary</a> |
788 791 <a href="/shortlog?style=gitweb">shortlog</a> |
789 792 <a href="/log/2?style=gitweb">changelog</a> |
790 793 graph |
791 794 <a href="/tags?style=gitweb">tags</a> |
792 795 <a href="/branches?style=gitweb">branches</a> |
793 796 <a href="/file/1d22e65f027e?style=gitweb">files</a> |
794 797 <a href="/help?style=gitweb">help</a>
795 798 <br/>
796 799 <a href="/graph/2?style=gitweb&revcount=30">less</a>
797 800 <a href="/graph/2?style=gitweb&revcount=120">more</a>
798 801 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> <br/>
799 802 </div>
800 803
801 804 <div class="title">&nbsp;</div>
802 805
803 806 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
804 807
805 808 <div id="wrapper">
806 809 <ul id="nodebgs"></ul>
807 810 <canvas id="graph" width="224" height="129"></canvas>
808 811 <ul id="graphnodes"></ul>
809 812 </div>
810 813
811 814 <script type="text/javascript" src="/static/graph.js"></script>
812 815 <script>
813 816 <!-- hide script content
814 817
815 818 var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], []]];
816 819 var graph = new Graph();
817 820 graph.scale(39);
818 821
819 822 graph.edge = function(x0, y0, x1, y1, color) {
820 823
821 824 this.setColor(color, 0.0, 0.65);
822 825 this.ctx.beginPath();
823 826 this.ctx.moveTo(x0, y0);
824 827 this.ctx.lineTo(x1, y1);
825 828 this.ctx.stroke();
826 829
827 830 }
828 831
829 832 var revlink = '<li style="_STYLE"><span class="desc">';
830 833 revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>';
831 834 revlink += '</span> _TAGS';
832 835 revlink += '<span class="info">_DATE, by _USER</span></li>';
833 836
834 837 graph.vertex = function(x, y, color, parity, cur) {
835 838
836 839 this.ctx.beginPath();
837 840 color = this.setColor(color, 0.25, 0.75);
838 841 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
839 842 this.ctx.fill();
840 843
841 844 var bg = '<li class="bg parity' + parity + '"></li>';
842 845 var left = (this.columns + 1) * this.bg_height;
843 846 var nstyle = 'padding-left: ' + left + 'px;';
844 847 var item = revlink.replace(/_STYLE/, nstyle);
845 848 item = item.replace(/_PARITY/, 'parity' + parity);
846 849 item = item.replace(/_NODEID/, cur[0]);
847 850 item = item.replace(/_NODEID/, cur[0]);
848 851 item = item.replace(/_DESC/, cur[3]);
849 852 item = item.replace(/_USER/, cur[4]);
850 853 item = item.replace(/_DATE/, cur[5]);
851 854
852 855 var tagspan = '';
853 856 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
854 857 tagspan = '<span class="logtags">';
855 858 if (cur[6][1]) {
856 859 tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
857 860 tagspan += cur[6][0] + '</span> ';
858 861 } else if (!cur[6][1] && cur[6][0] != 'default') {
859 862 tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
860 863 tagspan += cur[6][0] + '</span> ';
861 864 }
862 865 if (cur[7].length) {
863 866 for (var t in cur[7]) {
864 867 var tag = cur[7][t];
865 868 tagspan += '<span class="tagtag">' + tag + '</span> ';
866 869 }
867 870 }
868 871 tagspan += '</span>';
869 872 }
870 873
871 874 item = item.replace(/_TAGS/, tagspan);
872 875 return [bg, item];
873 876
874 877 }
875 878
876 879 graph.render(data);
877 880
878 881 // stop hiding script -->
879 882 </script>
880 883
881 884 <div class="page_nav">
882 885 <a href="/graph/2?style=gitweb&revcount=30">less</a>
883 886 <a href="/graph/2?style=gitweb&revcount=120">more</a>
884 887 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a>
885 888 </div>
886 889
887 890 <div class="page_footer">
888 891 <div class="page_footer_text">test</div>
889 892 <div class="rss_logo">
890 893 <a href="/rss-log">RSS</a>
891 894 <a href="/atom-log">Atom</a>
892 895 </div>
893 896 <br />
894 897
895 898 </div>
896 899 </body>
897 900 </html>
898 901
899 902
900 903 capabilities
901 904
902 905 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo
903 906 200 Script output follows
904 907
905 908 lookup changegroupsubset branchmap pushkey unbundle=HG10GZ,HG10BZ,HG10UN
906 909
907 910 heads
908 911
909 912 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
910 913 200 Script output follows
911 914
912 915 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
913 916
914 917 branches
915 918
916 919 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches&nodes=0000000000000000000000000000000000000000'
917 920 200 Script output follows
918 921
919 922 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
920 923
921 924 changegroup
922 925
923 926 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000'
924 927 200 Script output follows
925 928
926 929 x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82 (esc)
927 930 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\\n\xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee \xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk (esc)
928 931 \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3'\x859 (esc)
929 932 \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00 _\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc (no-eol) (esc)
930 933
931 934 stream_out
932 935
933 936 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out'
934 937 200 Script output follows
935 938
936 939 1
937 940
938 941 failing unbundle, requires POST request
939 942
940 943 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle'
941 944 405 push requires POST request
942 945
943 946 0
944 947 push requires POST request
945 948 [1]
946 949
947 950 Static files
948 951
949 952 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
950 953 200 Script output follows
951 954
952 955 a { text-decoration:none; }
953 956 .age { white-space:nowrap; }
954 957 .date { white-space:nowrap; }
955 958 .indexlinks { white-space:nowrap; }
956 959 .parity0 { background-color: #ddd; }
957 960 .parity1 { background-color: #eee; }
958 961 .lineno { width: 60px; color: #aaa; font-size: smaller;
959 962 text-align: right; }
960 963 .plusline { color: green; }
961 964 .minusline { color: red; }
962 965 .atline { color: purple; }
963 966 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
964 967 .buttons a {
965 968 background-color: #666;
966 969 padding: 2pt;
967 970 color: white;
968 971 font-family: sans;
969 972 font-weight: bold;
970 973 }
971 974 .navigate a {
972 975 background-color: #ccc;
973 976 padding: 2pt;
974 977 font-family: sans;
975 978 color: black;
976 979 }
977 980
978 981 .metatag {
979 982 background-color: #888;
980 983 color: white;
981 984 text-align: right;
982 985 }
983 986
984 987 /* Common */
985 988 pre { margin: 0; }
986 989
987 990 .logo {
988 991 float: right;
989 992 clear: right;
990 993 }
991 994
992 995 /* Changelog/Filelog entries */
993 996 .logEntry { width: 100%; }
994 997 .logEntry .age { width: 15%; }
995 998 .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
996 999 .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
997 1000 .logEntry th.firstline { text-align: left; width: inherit; }
998 1001
999 1002 /* Shortlog entries */
1000 1003 .slogEntry { width: 100%; }
1001 1004 .slogEntry .age { width: 8em; }
1002 1005 .slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
1003 1006 .slogEntry td.author { width: 15em; }
1004 1007
1005 1008 /* Tag entries */
1006 1009 #tagEntries { list-style: none; margin: 0; padding: 0; }
1007 1010 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
1008 1011
1009 1012 /* Changeset entry */
1010 1013 #changesetEntry { }
1011 1014 #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1012 1015 #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
1013 1016
1014 1017 /* File diff view */
1015 1018 #filediffEntry { }
1016 1019 #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1017 1020
1018 1021 /* Graph */
1019 1022 div#wrapper {
1020 1023 position: relative;
1021 1024 margin: 0;
1022 1025 padding: 0;
1023 1026 }
1024 1027
1025 1028 canvas {
1026 1029 position: absolute;
1027 1030 z-index: 5;
1028 1031 top: -0.6em;
1029 1032 margin: 0;
1030 1033 }
1031 1034
1032 1035 ul#nodebgs {
1033 1036 list-style: none inside none;
1034 1037 padding: 0;
1035 1038 margin: 0;
1036 1039 top: -0.7em;
1037 1040 }
1038 1041
1039 1042 ul#graphnodes li, ul#nodebgs li {
1040 1043 height: 39px;
1041 1044 }
1042 1045
1043 1046 ul#graphnodes {
1044 1047 position: absolute;
1045 1048 z-index: 10;
1046 1049 top: -0.85em;
1047 1050 list-style: none inside none;
1048 1051 padding: 0;
1049 1052 }
1050 1053
1051 1054 ul#graphnodes li .info {
1052 1055 display: block;
1053 1056 font-size: 70%;
1054 1057 position: relative;
1055 1058 top: -1px;
1056 1059 }
1057 1060
1058 1061 Stop and restart with HGENCODING=cp932
1059 1062
1060 1063 $ "$TESTDIR/killdaemons.py"
1061 1064 $ HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \
1062 1065 > -p $HGPORT -d --pid-file=hg.pid -E errors.log
1063 1066 $ cat hg.pid >> $DAEMON_PIDS
1064 1067
1065 1068 commit message with Japanese Kanji 'Noh', which ends with '\x5c'
1066 1069
1067 1070 $ echo foo >> foo
1068 1071 $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'`
1069 1072
1070 1073 Graph json escape of multibyte character
1071 1074
1072 1075 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \
1073 1076 > | grep '^var data ='
1074 1077 var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "\u80fd", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], []]];
1075 1078
1076 1079 ERRORS ENCOUNTERED
1077 1080
1078 1081 $ cat errors.log
@@ -1,137 +1,138 b''
1 1 Test chains of near empty directories, terminating 3 different ways:
2 2 - a1: file at level 4 (deepest)
3 3 - b1: two dirs at level 3
4 4 - e1: file at level 2
5 5
6 6 Set up the repo
7 7
8 8 $ hg init test
9 9 $ cd test
10 10 $ mkdir -p a1/a2/a3/a4
11 11 $ mkdir -p b1/b2/b3/b4
12 12 $ mkdir -p b1/b2/c3/c4
13 13 $ mkdir -p d1/d2/d3/d4
14 14 $ echo foo > a1/a2/a3/a4/foo
15 15 $ echo foo > b1/b2/b3/b4/foo
16 16 $ echo foo > b1/b2/c3/c4/foo
17 17 $ echo foo > d1/d2/d3/d4/foo
18 18 $ echo foo > d1/d2/foo
19 19 $ hg ci -Ama
20 20 adding a1/a2/a3/a4/foo
21 21 adding b1/b2/b3/b4/foo
22 22 adding b1/b2/c3/c4/foo
23 23 adding d1/d2/d3/d4/foo
24 24 adding d1/d2/foo
25 25 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
26 26 $ cat hg.pid >> $DAEMON_PIDS
27 27
28 28 manifest with descending
29 29
30 30 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file'
31 31 200 Script output follows
32 32
33 33 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
34 34 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
35 35 <head>
36 36 <link rel="icon" href="/static/hgicon.png" type="image/png" />
37 37 <meta name="robots" content="index, nofollow" />
38 38 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
39 39
40 40 <title>test: 9087c84a0f5d /</title>
41 41 </head>
42 42 <body>
43 43
44 44 <div class="container">
45 45 <div class="menu">
46 46 <div class="logo">
47 47 <a href="http://mercurial.selenic.com/">
48 48 <img src="/static/hglogo.png" alt="mercurial" /></a>
49 49 </div>
50 50 <ul>
51 51 <li><a href="/shortlog/9087c84a0f5d">log</a></li>
52 52 <li><a href="/graph/9087c84a0f5d">graph</a></li>
53 53 <li><a href="/tags">tags</a></li>
54 <li><a href="/bookmarks">bookmarks</a></li>
54 55 <li><a href="/branches">branches</a></li>
55 56 </ul>
56 57 <ul>
57 58 <li><a href="/rev/9087c84a0f5d">changeset</a></li>
58 59 <li class="active">browse</li>
59 60 </ul>
60 61 <ul>
61 62
62 63 </ul>
63 64 <ul>
64 65 <li><a href="/help">help</a></li>
65 66 </ul>
66 67 </div>
67 68
68 69 <div class="main">
69 70 <h2><a href="/">test</a></h2>
70 71 <h3>directory / @ 0:9087c84a0f5d <span class="tag">tip</span> </h3>
71 72
72 73 <form class="search" action="/log">
73 74
74 75 <p><input name="rev" id="search1" type="text" size="30" /></p>
75 76 <div id="hint">find changesets by author, revision,
76 77 files, or words in the commit message</div>
77 78 </form>
78 79
79 80 <table class="bigtable">
80 81 <tr>
81 82 <th class="name">name</th>
82 83 <th class="size">size</th>
83 84 <th class="permissions">permissions</th>
84 85 </tr>
85 86 <tr class="fileline parity0">
86 87 <td class="name"><a href="/file/9087c84a0f5d/">[up]</a></td>
87 88 <td class="size"></td>
88 89 <td class="permissions">drwxr-xr-x</td>
89 90 </tr>
90 91
91 92 <tr class="fileline parity1">
92 93 <td class="name">
93 94 <a href="/file/9087c84a0f5d/a1">
94 95 <img src="/static/coal-folder.png" alt="dir."/> a1/
95 96 </a>
96 97 <a href="/file/9087c84a0f5d/a1/a2/a3/a4">
97 98 a2/a3/a4
98 99 </a>
99 100 </td>
100 101 <td class="size"></td>
101 102 <td class="permissions">drwxr-xr-x</td>
102 103 </tr>
103 104 <tr class="fileline parity0">
104 105 <td class="name">
105 106 <a href="/file/9087c84a0f5d/b1">
106 107 <img src="/static/coal-folder.png" alt="dir."/> b1/
107 108 </a>
108 109 <a href="/file/9087c84a0f5d/b1/b2">
109 110 b2
110 111 </a>
111 112 </td>
112 113 <td class="size"></td>
113 114 <td class="permissions">drwxr-xr-x</td>
114 115 </tr>
115 116 <tr class="fileline parity1">
116 117 <td class="name">
117 118 <a href="/file/9087c84a0f5d/d1">
118 119 <img src="/static/coal-folder.png" alt="dir."/> d1/
119 120 </a>
120 121 <a href="/file/9087c84a0f5d/d1/d2">
121 122 d2
122 123 </a>
123 124 </td>
124 125 <td class="size"></td>
125 126 <td class="permissions">drwxr-xr-x</td>
126 127 </tr>
127 128
128 129 </table>
129 130 </div>
130 131 </div>
131 132
132 133
133 134 </body>
134 135 </html>
135 136
136 137
137 138 $ cat errors.log
@@ -1,485 +1,489 b''
1 1 setting up repo
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ echo a > a
6 6 $ echo b > b
7 7 $ hg ci -Ama
8 8 adding a
9 9 adding b
10 10
11 11 change permissions for git diffs
12 12
13 13 $ chmod 755 a
14 14 $ hg ci -Amb
15 15
16 16 set up hgweb
17 17
18 18 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
19 19 $ cat hg.pid >> $DAEMON_PIDS
20 20
21 21 revision
22 22
23 23 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
24 24 200 Script output follows
25 25
26 26 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
27 27 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
28 28 <head>
29 29 <link rel="icon" href="/static/hgicon.png" type="image/png" />
30 30 <meta name="robots" content="index, nofollow" />
31 31 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
32 32
33 33 <title>test: 0cd96de13884</title>
34 34 </head>
35 35 <body>
36 36 <div class="container">
37 37 <div class="menu">
38 38 <div class="logo">
39 39 <a href="http://mercurial.selenic.com/">
40 40 <img src="/static/hglogo.png" alt="mercurial" /></a>
41 41 </div>
42 42 <ul>
43 43 <li><a href="/shortlog/0cd96de13884">log</a></li>
44 44 <li><a href="/graph/0cd96de13884">graph</a></li>
45 45 <li><a href="/tags">tags</a></li>
46 <li><a href="/bookmarks">bookmarks</a></li>
46 47 <li><a href="/branches">branches</a></li>
47 48 </ul>
48 49 <ul>
49 50 <li class="active">changeset</li>
50 51 <li><a href="/raw-rev/0cd96de13884">raw</a></li>
51 52 <li><a href="/file/0cd96de13884">browse</a></li>
52 53 </ul>
53 54 <ul>
54 55
55 56 </ul>
56 57 <ul>
57 58 <li><a href="/help">help</a></li>
58 59 </ul>
59 60 </div>
60 61
61 62 <div class="main">
62 63
63 64 <h2><a href="/">test</a></h2>
64 65 <h3>changeset 0:0cd96de13884 </h3>
65 66
66 67 <form class="search" action="/log">
67 68
68 69 <p><input name="rev" id="search1" type="text" size="30" /></p>
69 70 <div id="hint">find changesets by author, revision,
70 71 files, or words in the commit message</div>
71 72 </form>
72 73
73 74 <div class="description">a</div>
74 75
75 76 <table id="changesetEntry">
76 77 <tr>
77 78 <th class="author">author</th>
78 79 <td class="author">&#116;&#101;&#115;&#116;</td>
79 80 </tr>
80 81 <tr>
81 82 <th class="date">date</th>
82 83 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td></tr>
83 84 <tr>
84 85 <th class="author">parents</th>
85 86 <td class="author"></td>
86 87 </tr>
87 88 <tr>
88 89 <th class="author">children</th>
89 90 <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
90 91 </tr>
91 92 <tr>
92 93 <th class="files">files</th>
93 94 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
94 95 </tr>
95 96 </table>
96 97
97 98 <div class="overflow">
98 99 <div class="sourcefirst"> line diff</div>
99 100
100 101 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
101 102 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
102 103 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
103 104 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
104 105 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
105 106 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000
106 107 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
107 108 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+b
108 109 </span></pre></div>
109 110 </div>
110 111
111 112 </div>
112 113 </div>
113 114
114 115
115 116 </body>
116 117 </html>
117 118
118 119
119 120 raw revision
120 121
121 122 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
122 123 200 Script output follows
123 124
124 125
125 126 # HG changeset patch
126 127 # User test
127 128 # Date 0 0
128 129 # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e
129 130
130 131 a
131 132
132 133 diff -r 000000000000 -r 0cd96de13884 a
133 134 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
134 135 +++ b/a Thu Jan 01 00:00:00 1970 +0000
135 136 @@ -0,0 +1,1 @@
136 137 +a
137 138 diff -r 000000000000 -r 0cd96de13884 b
138 139 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
139 140 +++ b/b Thu Jan 01 00:00:00 1970 +0000
140 141 @@ -0,0 +1,1 @@
141 142 +b
142 143
143 144
144 145 diff removed file
145 146
146 147 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
147 148 200 Script output follows
148 149
149 150 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
150 151 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
151 152 <head>
152 153 <link rel="icon" href="/static/hgicon.png" type="image/png" />
153 154 <meta name="robots" content="index, nofollow" />
154 155 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
155 156
156 157 <title>test: a diff</title>
157 158 </head>
158 159 <body>
159 160
160 161 <div class="container">
161 162 <div class="menu">
162 163 <div class="logo">
163 164 <a href="http://mercurial.selenic.com/">
164 165 <img src="/static/hglogo.png" alt="mercurial" /></a>
165 166 </div>
166 167 <ul>
167 168 <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
168 169 <li><a href="/graph/78e4ebad7cdf">graph</a></li>
169 170 <li><a href="/tags">tags</a></li>
171 <li><a href="/bookmarks">bookmarks</a></li>
170 172 <li><a href="/branches">branches</a></li>
171 173 </ul>
172 174 <ul>
173 175 <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
174 176 <li><a href="/file/78e4ebad7cdf">browse</a></li>
175 177 </ul>
176 178 <ul>
177 179 <li><a href="/file/78e4ebad7cdf/a">file</a></li>
178 180 <li><a href="/file/tip/a">latest</a></li>
179 181 <li class="active">diff</li>
180 182 <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
181 183 <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
182 184 <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
183 185 </ul>
184 186 <ul>
185 187 <li><a href="/help">help</a></li>
186 188 </ul>
187 189 </div>
188 190
189 191 <div class="main">
190 192 <h2><a href="/">test</a></h2>
191 193 <h3>diff a @ 1:78e4ebad7cdf</h3>
192 194
193 195 <form class="search" action="/log">
194 196 <p></p>
195 197 <p><input name="rev" id="search1" type="text" size="30" /></p>
196 198 <div id="hint">find changesets by author, revision,
197 199 files, or words in the commit message</div>
198 200 </form>
199 201
200 202 <div class="description">b</div>
201 203
202 204 <table id="changesetEntry">
203 205 <tr>
204 206 <th>author</th>
205 207 <td>&#116;&#101;&#115;&#116;</td>
206 208 </tr>
207 209 <tr>
208 210 <th>date</th>
209 211 <td>Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
210 212 </tr>
211 213 <tr>
212 214 <th>parents</th>
213 215 <td></td>
214 216 </tr>
215 217 <tr>
216 218 <th>children</th>
217 219 <td></td>
218 220 </tr>
219 221
220 222 </table>
221 223
222 224 <div class="overflow">
223 225 <div class="sourcefirst"> line diff</div>
224 226
225 227 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
226 228 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
227 229 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
228 230 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
229 231 </span></pre></div>
230 232 </div>
231 233 </div>
232 234 </div>
233 235
234 236
235 237
236 238 </body>
237 239 </html>
238 240
239 241
240 242 set up hgweb with git diffs
241 243
242 244 $ "$TESTDIR/killdaemons.py"
243 245 $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
244 246 $ cat hg.pid >> $DAEMON_PIDS
245 247
246 248 revision
247 249
248 250 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
249 251 200 Script output follows
250 252
251 253 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
252 254 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
253 255 <head>
254 256 <link rel="icon" href="/static/hgicon.png" type="image/png" />
255 257 <meta name="robots" content="index, nofollow" />
256 258 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
257 259
258 260 <title>test: 0cd96de13884</title>
259 261 </head>
260 262 <body>
261 263 <div class="container">
262 264 <div class="menu">
263 265 <div class="logo">
264 266 <a href="http://mercurial.selenic.com/">
265 267 <img src="/static/hglogo.png" alt="mercurial" /></a>
266 268 </div>
267 269 <ul>
268 270 <li><a href="/shortlog/0cd96de13884">log</a></li>
269 271 <li><a href="/graph/0cd96de13884">graph</a></li>
270 272 <li><a href="/tags">tags</a></li>
273 <li><a href="/bookmarks">bookmarks</a></li>
271 274 <li><a href="/branches">branches</a></li>
272 275 </ul>
273 276 <ul>
274 277 <li class="active">changeset</li>
275 278 <li><a href="/raw-rev/0cd96de13884">raw</a></li>
276 279 <li><a href="/file/0cd96de13884">browse</a></li>
277 280 </ul>
278 281 <ul>
279 282
280 283 </ul>
281 284 <ul>
282 285 <li><a href="/help">help</a></li>
283 286 </ul>
284 287 </div>
285 288
286 289 <div class="main">
287 290
288 291 <h2><a href="/">test</a></h2>
289 292 <h3>changeset 0:0cd96de13884 </h3>
290 293
291 294 <form class="search" action="/log">
292 295
293 296 <p><input name="rev" id="search1" type="text" size="30" /></p>
294 297 <div id="hint">find changesets by author, revision,
295 298 files, or words in the commit message</div>
296 299 </form>
297 300
298 301 <div class="description">a</div>
299 302
300 303 <table id="changesetEntry">
301 304 <tr>
302 305 <th class="author">author</th>
303 306 <td class="author">&#116;&#101;&#115;&#116;</td>
304 307 </tr>
305 308 <tr>
306 309 <th class="date">date</th>
307 310 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td></tr>
308 311 <tr>
309 312 <th class="author">parents</th>
310 313 <td class="author"></td>
311 314 </tr>
312 315 <tr>
313 316 <th class="author">children</th>
314 317 <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
315 318 </tr>
316 319 <tr>
317 320 <th class="files">files</th>
318 321 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
319 322 </tr>
320 323 </table>
321 324
322 325 <div class="overflow">
323 326 <div class="sourcefirst"> line diff</div>
324 327
325 328 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100644
326 329 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
327 330 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
328 331 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
329 332 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
330 333 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> new file mode 100644
331 334 <a href="#l2.2" id="l2.2"> 2.2</a> <span class="minusline">--- /dev/null
332 335 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="plusline">+++ b/b
333 336 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="atline">@@ -0,0 +1,1 @@
334 337 </span><a href="#l2.5" id="l2.5"> 2.5</a> <span class="plusline">+b
335 338 </span></pre></div>
336 339 </div>
337 340
338 341 </div>
339 342 </div>
340 343
341 344
342 345 </body>
343 346 </html>
344 347
345 348
346 349 revision
347 350
348 351 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
349 352 200 Script output follows
350 353
351 354
352 355 # HG changeset patch
353 356 # User test
354 357 # Date 0 0
355 358 # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e
356 359
357 360 a
358 361
359 362 diff --git a/a b/a
360 363 new file mode 100644
361 364 --- /dev/null
362 365 +++ b/a
363 366 @@ -0,0 +1,1 @@
364 367 +a
365 368 diff --git a/b b/b
366 369 new file mode 100644
367 370 --- /dev/null
368 371 +++ b/b
369 372 @@ -0,0 +1,1 @@
370 373 +b
371 374
372 375
373 376 diff removed file
374 377
375 378 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
376 379 200 Script output follows
377 380
378 381 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
379 382 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
380 383 <head>
381 384 <link rel="icon" href="/static/hgicon.png" type="image/png" />
382 385 <meta name="robots" content="index, nofollow" />
383 386 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
384 387
385 388 <title>test: a diff</title>
386 389 </head>
387 390 <body>
388 391
389 392 <div class="container">
390 393 <div class="menu">
391 394 <div class="logo">
392 395 <a href="http://mercurial.selenic.com/">
393 396 <img src="/static/hglogo.png" alt="mercurial" /></a>
394 397 </div>
395 398 <ul>
396 399 <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
397 400 <li><a href="/graph/78e4ebad7cdf">graph</a></li>
398 401 <li><a href="/tags">tags</a></li>
402 <li><a href="/bookmarks">bookmarks</a></li>
399 403 <li><a href="/branches">branches</a></li>
400 404 </ul>
401 405 <ul>
402 406 <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
403 407 <li><a href="/file/78e4ebad7cdf">browse</a></li>
404 408 </ul>
405 409 <ul>
406 410 <li><a href="/file/78e4ebad7cdf/a">file</a></li>
407 411 <li><a href="/file/tip/a">latest</a></li>
408 412 <li class="active">diff</li>
409 413 <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
410 414 <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
411 415 <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
412 416 </ul>
413 417 <ul>
414 418 <li><a href="/help">help</a></li>
415 419 </ul>
416 420 </div>
417 421
418 422 <div class="main">
419 423 <h2><a href="/">test</a></h2>
420 424 <h3>diff a @ 1:78e4ebad7cdf</h3>
421 425
422 426 <form class="search" action="/log">
423 427 <p></p>
424 428 <p><input name="rev" id="search1" type="text" size="30" /></p>
425 429 <div id="hint">find changesets by author, revision,
426 430 files, or words in the commit message</div>
427 431 </form>
428 432
429 433 <div class="description">b</div>
430 434
431 435 <table id="changesetEntry">
432 436 <tr>
433 437 <th>author</th>
434 438 <td>&#116;&#101;&#115;&#116;</td>
435 439 </tr>
436 440 <tr>
437 441 <th>date</th>
438 442 <td>Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
439 443 </tr>
440 444 <tr>
441 445 <th>parents</th>
442 446 <td></td>
443 447 </tr>
444 448 <tr>
445 449 <th>children</th>
446 450 <td></td>
447 451 </tr>
448 452
449 453 </table>
450 454
451 455 <div class="overflow">
452 456 <div class="sourcefirst"> line diff</div>
453 457
454 458 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100755
455 459 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
456 460 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
457 461 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
458 462 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
459 463 </span></pre></div>
460 464 </div>
461 465 </div>
462 466 </div>
463 467
464 468
465 469
466 470 </body>
467 471 </html>
468 472
469 473 $ cd ..
470 474
471 475 test import rev as raw-rev
472 476
473 477 $ hg clone -r0 test test1
474 478 adding changesets
475 479 adding manifests
476 480 adding file changes
477 481 added 1 changesets with 2 changes to 2 files
478 482 updating to branch default
479 483 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
480 484 $ cd test1
481 485 $ hg import -q --exact http://localhost:$HGPORT/rev/1
482 486
483 487 errors
484 488
485 489 $ cat ../test/errors.log
@@ -1,394 +1,398 b''
1 1 Some tests for hgweb in an empty repository
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
6 6 $ cat hg.pid >> $DAEMON_PIDS
7 7 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/shortlog')
8 8 200 Script output follows
9 9
10 10 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
11 11 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
12 12 <head>
13 13 <link rel="icon" href="/static/hgicon.png" type="image/png" />
14 14 <meta name="robots" content="index, nofollow" />
15 15 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
16 16
17 17 <title>test: log</title>
18 18 <link rel="alternate" type="application/atom+xml"
19 19 href="/atom-log" title="Atom feed for test" />
20 20 <link rel="alternate" type="application/rss+xml"
21 21 href="/rss-log" title="RSS feed for test" />
22 22 </head>
23 23 <body>
24 24
25 25 <div class="container">
26 26 <div class="menu">
27 27 <div class="logo">
28 28 <a href="http://mercurial.selenic.com/">
29 29 <img src="/static/hglogo.png" alt="mercurial" /></a>
30 30 </div>
31 31 <ul>
32 32 <li class="active">log</li>
33 33 <li><a href="/graph/000000000000">graph</a></li>
34 34 <li><a href="/tags">tags</a></li>
35 <li><a href="/bookmarks">bookmarks</a></li>
35 36 <li><a href="/branches">branches</a></li>
36 37 </ul>
37 38 <ul>
38 39 <li><a href="/rev/000000000000">changeset</a></li>
39 40 <li><a href="/file/000000000000">browse</a></li>
40 41 </ul>
41 42 <ul>
42 43
43 44 </ul>
44 45 <ul>
45 46 <li><a href="/help">help</a></li>
46 47 </ul>
47 48 </div>
48 49
49 50 <div class="main">
50 51 <h2><a href="/">test</a></h2>
51 52 <h3>log</h3>
52 53
53 54 <form class="search" action="/log">
54 55
55 56 <p><input name="rev" id="search1" type="text" size="30" /></p>
56 57 <div id="hint">find changesets by author, revision,
57 58 files, or words in the commit message</div>
58 59 </form>
59 60
60 61 <div class="navigate">
61 62 <a href="/shortlog/-1?revcount=30">less</a>
62 63 <a href="/shortlog/-1?revcount=120">more</a>
63 64 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
64 65 </div>
65 66
66 67 <table class="bigtable">
67 68 <tr>
68 69 <th class="age">age</th>
69 70 <th class="author">author</th>
70 71 <th class="description">description</th>
71 72 </tr>
72 73
73 74 </table>
74 75
75 76 <div class="navigate">
76 77 <a href="/shortlog/-1?revcount=30">less</a>
77 78 <a href="/shortlog/-1?revcount=120">more</a>
78 79 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
79 80 </div>
80 81
81 82 </div>
82 83 </div>
83 84
84 85
85 86
86 87 </body>
87 88 </html>
88 89
89 90 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log')
90 91 200 Script output follows
91 92
92 93 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
93 94 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
94 95 <head>
95 96 <link rel="icon" href="/static/hgicon.png" type="image/png" />
96 97 <meta name="robots" content="index, nofollow" />
97 98 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
98 99
99 100 <title>test: log</title>
100 101 <link rel="alternate" type="application/atom+xml"
101 102 href="/atom-log" title="Atom feed for test" />
102 103 <link rel="alternate" type="application/rss+xml"
103 104 href="/rss-log" title="RSS feed for test" />
104 105 </head>
105 106 <body>
106 107
107 108 <div class="container">
108 109 <div class="menu">
109 110 <div class="logo">
110 111 <a href="http://mercurial.selenic.com/">
111 112 <img src="/static/hglogo.png" alt="mercurial" /></a>
112 113 </div>
113 114 <ul>
114 115 <li class="active">log</li>
115 116 <li><a href="/graph/000000000000">graph</a></li>
116 117 <li><a href="/tags">tags</a></li>
118 <li><a href="/bookmarks">bookmarks</a></li>
117 119 <li><a href="/branches">branches</a></li>
118 120 </ul>
119 121 <ul>
120 122 <li><a href="/rev/000000000000">changeset</a></li>
121 123 <li><a href="/file/000000000000">browse</a></li>
122 124 </ul>
123 125 <ul>
124 126
125 127 </ul>
126 128 <ul>
127 129 <li><a href="/help">help</a></li>
128 130 </ul>
129 131 </div>
130 132
131 133 <div class="main">
132 134 <h2><a href="/">test</a></h2>
133 135 <h3>log</h3>
134 136
135 137 <form class="search" action="/log">
136 138
137 139 <p><input name="rev" id="search1" type="text" size="30" /></p>
138 140 <div id="hint">find changesets by author, revision,
139 141 files, or words in the commit message</div>
140 142 </form>
141 143
142 144 <div class="navigate">
143 145 <a href="/shortlog/-1?revcount=5">less</a>
144 146 <a href="/shortlog/-1?revcount=20">more</a>
145 147 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
146 148 </div>
147 149
148 150 <table class="bigtable">
149 151 <tr>
150 152 <th class="age">age</th>
151 153 <th class="author">author</th>
152 154 <th class="description">description</th>
153 155 </tr>
154 156
155 157 </table>
156 158
157 159 <div class="navigate">
158 160 <a href="/shortlog/-1?revcount=5">less</a>
159 161 <a href="/shortlog/-1?revcount=20">more</a>
160 162 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
161 163 </div>
162 164
163 165 </div>
164 166 </div>
165 167
166 168
167 169
168 170 </body>
169 171 </html>
170 172
171 173 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/graph')
172 174 200 Script output follows
173 175
174 176 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
175 177 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
176 178 <head>
177 179 <link rel="icon" href="/static/hgicon.png" type="image/png" />
178 180 <meta name="robots" content="index, nofollow" />
179 181 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
180 182
181 183 <title>test: revision graph</title>
182 184 <link rel="alternate" type="application/atom+xml"
183 185 href="/atom-log" title="Atom feed for test: log" />
184 186 <link rel="alternate" type="application/rss+xml"
185 187 href="/rss-log" title="RSS feed for test: log" />
186 188 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
187 189 </head>
188 190 <body>
189 191
190 192 <div class="container">
191 193 <div class="menu">
192 194 <div class="logo">
193 195 <a href="http://mercurial.selenic.com/">
194 196 <img src="/static/hglogo.png" alt="mercurial" /></a>
195 197 </div>
196 198 <ul>
197 199 <li><a href="/shortlog/000000000000">log</a></li>
198 200 <li class="active">graph</li>
199 201 <li><a href="/tags">tags</a></li>
202 <li><a href="/bookmarks">bookmarks</a></li>
200 203 <li><a href="/branches">branches</a></li>
201 204 </ul>
202 205 <ul>
203 206 <li><a href="/rev/000000000000">changeset</a></li>
204 207 <li><a href="/file/000000000000">browse</a></li>
205 208 </ul>
206 209 <ul>
207 210 <li><a href="/help">help</a></li>
208 211 </ul>
209 212 </div>
210 213
211 214 <div class="main">
212 215 <h2><a href="/">test</a></h2>
213 216 <h3>graph</h3>
214 217
215 218 <form class="search" action="/log">
216 219
217 220 <p><input name="rev" id="search1" type="text" size="30" /></p>
218 221 <div id="hint">find changesets by author, revision,
219 222 files, or words in the commit message</div>
220 223 </form>
221 224
222 225 <div class="navigate">
223 226 <a href="/graph/-1?revcount=30">less</a>
224 227 <a href="/graph/-1?revcount=120">more</a>
225 228 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
226 229 </div>
227 230
228 231 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
229 232
230 233 <div id="wrapper">
231 234 <ul id="nodebgs"></ul>
232 235 <canvas id="graph" width="224" height="12"></canvas>
233 236 <ul id="graphnodes"></ul>
234 237 </div>
235 238
236 239 <script type="text/javascript" src="/static/graph.js"></script>
237 240 <script type="text/javascript">
238 241 <!-- hide script content
239 242
240 243 var data = [];
241 244 var graph = new Graph();
242 245 graph.scale(39);
243 246
244 247 graph.edge = function(x0, y0, x1, y1, color) {
245 248
246 249 this.setColor(color, 0.0, 0.65);
247 250 this.ctx.beginPath();
248 251 this.ctx.moveTo(x0, y0);
249 252 this.ctx.lineTo(x1, y1);
250 253 this.ctx.stroke();
251 254
252 255 }
253 256
254 257 var revlink = '<li style="_STYLE"><span class="desc">';
255 258 revlink += '<a href="/rev/_NODEID" title="_NODEID">_DESC</a>';
256 259 revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
257 260
258 261 graph.vertex = function(x, y, color, parity, cur) {
259 262
260 263 this.ctx.beginPath();
261 264 color = this.setColor(color, 0.25, 0.75);
262 265 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
263 266 this.ctx.fill();
264 267
265 268 var bg = '<li class="bg parity' + parity + '"></li>';
266 269 var left = (this.columns + 1) * this.bg_height;
267 270 var nstyle = 'padding-left: ' + left + 'px;';
268 271 var item = revlink.replace(/_STYLE/, nstyle);
269 272 item = item.replace(/_PARITY/, 'parity' + parity);
270 273 item = item.replace(/_NODEID/, cur[0]);
271 274 item = item.replace(/_NODEID/, cur[0]);
272 275 item = item.replace(/_DESC/, cur[3]);
273 276 item = item.replace(/_USER/, cur[4]);
274 277 item = item.replace(/_DATE/, cur[5]);
275 278
276 279 var tagspan = '';
277 280 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
278 281 tagspan = '<span class="logtags">';
279 282 if (cur[6][1]) {
280 283 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
281 284 tagspan += cur[6][0] + '</span> ';
282 285 } else if (!cur[6][1] && cur[6][0] != 'default') {
283 286 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
284 287 tagspan += cur[6][0] + '</span> ';
285 288 }
286 289 if (cur[7].length) {
287 290 for (var t in cur[7]) {
288 291 var tag = cur[7][t];
289 292 tagspan += '<span class="tag">' + tag + '</span> ';
290 293 }
291 294 }
292 295 if (cur[8].length) {
293 296 for (var b in cur[8]) {
294 297 var bookmark = cur[8][b];
295 298 tagspan += '<span class="tag">' + bookmark + '</span> ';
296 299 }
297 300 }
298 301 tagspan += '</span>';
299 302 }
300 303
301 304 item = item.replace(/_TAGS/, tagspan);
302 305 return [bg, item];
303 306
304 307 }
305 308
306 309 graph.render(data);
307 310
308 311 // stop hiding script -->
309 312 </script>
310 313
311 314 <div class="navigate">
312 315 <a href="/graph/-1?revcount=30">less</a>
313 316 <a href="/graph/-1?revcount=120">more</a>
314 317 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
315 318 </div>
316 319
317 320 </div>
318 321 </div>
319 322
320 323
321 324
322 325 </body>
323 326 </html>
324 327
325 328 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file')
326 329 200 Script output follows
327 330
328 331 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
329 332 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
330 333 <head>
331 334 <link rel="icon" href="/static/hgicon.png" type="image/png" />
332 335 <meta name="robots" content="index, nofollow" />
333 336 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
334 337
335 338 <title>test: 000000000000 /</title>
336 339 </head>
337 340 <body>
338 341
339 342 <div class="container">
340 343 <div class="menu">
341 344 <div class="logo">
342 345 <a href="http://mercurial.selenic.com/">
343 346 <img src="/static/hglogo.png" alt="mercurial" /></a>
344 347 </div>
345 348 <ul>
346 349 <li><a href="/shortlog/000000000000">log</a></li>
347 350 <li><a href="/graph/000000000000">graph</a></li>
348 351 <li><a href="/tags">tags</a></li>
352 <li><a href="/bookmarks">bookmarks</a></li>
349 353 <li><a href="/branches">branches</a></li>
350 354 </ul>
351 355 <ul>
352 356 <li><a href="/rev/000000000000">changeset</a></li>
353 357 <li class="active">browse</li>
354 358 </ul>
355 359 <ul>
356 360
357 361 </ul>
358 362 <ul>
359 363 <li><a href="/help">help</a></li>
360 364 </ul>
361 365 </div>
362 366
363 367 <div class="main">
364 368 <h2><a href="/">test</a></h2>
365 369 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
366 370
367 371 <form class="search" action="/log">
368 372
369 373 <p><input name="rev" id="search1" type="text" size="30" /></p>
370 374 <div id="hint">find changesets by author, revision,
371 375 files, or words in the commit message</div>
372 376 </form>
373 377
374 378 <table class="bigtable">
375 379 <tr>
376 380 <th class="name">name</th>
377 381 <th class="size">size</th>
378 382 <th class="permissions">permissions</th>
379 383 </tr>
380 384 <tr class="fileline parity0">
381 385 <td class="name"><a href="/file/000000000000/">[up]</a></td>
382 386 <td class="size"></td>
383 387 <td class="permissions">drwxr-xr-x</td>
384 388 </tr>
385 389
386 390
387 391 </table>
388 392 </div>
389 393 </div>
390 394
391 395
392 396 </body>
393 397 </html>
394 398
@@ -1,739 +1,744 b''
1 1
2 2 $ hg init test
3 3 $ cd test
4 4 $ echo b > b
5 5 $ hg ci -Am "b"
6 6 adding b
7 7 $ echo a > a
8 8 $ hg ci -Am "first a"
9 9 adding a
10 10 $ hg rm a
11 11 $ hg ci -m "del a"
12 12 $ echo b > a
13 13 $ hg ci -Am "second a"
14 14 adding a
15 15 $ hg rm a
16 16 $ hg ci -m "del2 a"
17 17 $ hg mv b c
18 18 $ hg ci -m "mv b"
19 19 $ echo c >> c
20 20 $ hg ci -m "change c"
21 21 $ hg log -p
22 22 changeset: 6:b7682196df1c
23 23 tag: tip
24 24 user: test
25 25 date: Thu Jan 01 00:00:00 1970 +0000
26 26 summary: change c
27 27
28 28 diff -r 1a6696706df2 -r b7682196df1c c
29 29 --- a/c Thu Jan 01 00:00:00 1970 +0000
30 30 +++ b/c Thu Jan 01 00:00:00 1970 +0000
31 31 @@ -1,1 +1,2 @@
32 32 b
33 33 +c
34 34
35 35 changeset: 5:1a6696706df2
36 36 user: test
37 37 date: Thu Jan 01 00:00:00 1970 +0000
38 38 summary: mv b
39 39
40 40 diff -r 52e848cdcd88 -r 1a6696706df2 b
41 41 --- a/b Thu Jan 01 00:00:00 1970 +0000
42 42 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
43 43 @@ -1,1 +0,0 @@
44 44 -b
45 45 diff -r 52e848cdcd88 -r 1a6696706df2 c
46 46 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
47 47 +++ b/c Thu Jan 01 00:00:00 1970 +0000
48 48 @@ -0,0 +1,1 @@
49 49 +b
50 50
51 51 changeset: 4:52e848cdcd88
52 52 user: test
53 53 date: Thu Jan 01 00:00:00 1970 +0000
54 54 summary: del2 a
55 55
56 56 diff -r 01de2d66a28d -r 52e848cdcd88 a
57 57 --- a/a Thu Jan 01 00:00:00 1970 +0000
58 58 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
59 59 @@ -1,1 +0,0 @@
60 60 -b
61 61
62 62 changeset: 3:01de2d66a28d
63 63 user: test
64 64 date: Thu Jan 01 00:00:00 1970 +0000
65 65 summary: second a
66 66
67 67 diff -r be3ebcc91739 -r 01de2d66a28d a
68 68 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
69 69 +++ b/a Thu Jan 01 00:00:00 1970 +0000
70 70 @@ -0,0 +1,1 @@
71 71 +b
72 72
73 73 changeset: 2:be3ebcc91739
74 74 user: test
75 75 date: Thu Jan 01 00:00:00 1970 +0000
76 76 summary: del a
77 77
78 78 diff -r 5ed941583260 -r be3ebcc91739 a
79 79 --- a/a Thu Jan 01 00:00:00 1970 +0000
80 80 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
81 81 @@ -1,1 +0,0 @@
82 82 -a
83 83
84 84 changeset: 1:5ed941583260
85 85 user: test
86 86 date: Thu Jan 01 00:00:00 1970 +0000
87 87 summary: first a
88 88
89 89 diff -r 6563da9dcf87 -r 5ed941583260 a
90 90 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
91 91 +++ b/a Thu Jan 01 00:00:00 1970 +0000
92 92 @@ -0,0 +1,1 @@
93 93 +a
94 94
95 95 changeset: 0:6563da9dcf87
96 96 user: test
97 97 date: Thu Jan 01 00:00:00 1970 +0000
98 98 summary: b
99 99
100 100 diff -r 000000000000 -r 6563da9dcf87 b
101 101 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
102 102 +++ b/b Thu Jan 01 00:00:00 1970 +0000
103 103 @@ -0,0 +1,1 @@
104 104 +b
105 105
106 106 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
107 107 $ cat hg.pid >> $DAEMON_PIDS
108 108
109 109 tip - two revisions
110 110
111 111 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/a')
112 112 200 Script output follows
113 113
114 114 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
115 115 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
116 116 <head>
117 117 <link rel="icon" href="/static/hgicon.png" type="image/png" />
118 118 <meta name="robots" content="index, nofollow" />
119 119 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
120 120
121 121 <title>test: a history</title>
122 122 <link rel="alternate" type="application/atom+xml"
123 123 href="/atom-log/tip/a" title="Atom feed for test:a" />
124 124 <link rel="alternate" type="application/rss+xml"
125 125 href="/rss-log/tip/a" title="RSS feed for test:a" />
126 126 </head>
127 127 <body>
128 128
129 129 <div class="container">
130 130 <div class="menu">
131 131 <div class="logo">
132 132 <a href="http://mercurial.selenic.com/">
133 133 <img src="/static/hglogo.png" alt="mercurial" /></a>
134 134 </div>
135 135 <ul>
136 136 <li><a href="/shortlog/01de2d66a28d">log</a></li>
137 137 <li><a href="/graph/01de2d66a28d">graph</a></li>
138 138 <li><a href="/tags">tags</a></li>
139 <li><a href="/bookmarks">bookmarks</a></li>
139 140 <li><a href="/branches">branches</a></li>
140 141 </ul>
141 142 <ul>
142 143 <li><a href="/rev/01de2d66a28d">changeset</a></li>
143 144 <li><a href="/file/01de2d66a28d">browse</a></li>
144 145 </ul>
145 146 <ul>
146 147 <li><a href="/file/01de2d66a28d/a">file</a></li>
147 148 <li><a href="/diff/01de2d66a28d/a">diff</a></li>
148 149 <li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
149 150 <li class="active">file log</li>
150 151 <li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
151 152 </ul>
152 153 <ul>
153 154 <li><a href="/help">help</a></li>
154 155 </ul>
155 156 </div>
156 157
157 158 <div class="main">
158 159 <h2><a href="/">test</a></h2>
159 160 <h3>log a</h3>
160 161
161 162 <form class="search" action="/log">
162 163
163 164 <p><input name="rev" id="search1" type="text" size="30" /></p>
164 165 <div id="hint">find changesets by author, revision,
165 166 files, or words in the commit message</div>
166 167 </form>
167 168
168 169 <div class="navigate">
169 170 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
170 171 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
171 172 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
172 173
173 174 <table class="bigtable">
174 175 <tr>
175 176 <th class="age">age</th>
176 177 <th class="author">author</th>
177 178 <th class="description">description</th>
178 179 </tr>
179 180 <tr class="parity0">
180 181 <td class="age">1970-01-01</td>
181 182 <td class="author">test</td>
182 183 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
183 184 </tr>
184 185 <tr class="parity1">
185 186 <td class="age">1970-01-01</td>
186 187 <td class="author">test</td>
187 188 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
188 189 </tr>
189 190
190 191 </table>
191 192
192 193 <div class="navigate">
193 194 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
194 195 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
195 196 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
196 197 </div>
197 198
198 199 </div>
199 200 </div>
200 201
201 202
202 203
203 204 </body>
204 205 </html>
205 206
206 207
207 208 second version - two revisions
208 209
209 210 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/3/a')
210 211 200 Script output follows
211 212
212 213 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
213 214 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
214 215 <head>
215 216 <link rel="icon" href="/static/hgicon.png" type="image/png" />
216 217 <meta name="robots" content="index, nofollow" />
217 218 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
218 219
219 220 <title>test: a history</title>
220 221 <link rel="alternate" type="application/atom+xml"
221 222 href="/atom-log/tip/a" title="Atom feed for test:a" />
222 223 <link rel="alternate" type="application/rss+xml"
223 224 href="/rss-log/tip/a" title="RSS feed for test:a" />
224 225 </head>
225 226 <body>
226 227
227 228 <div class="container">
228 229 <div class="menu">
229 230 <div class="logo">
230 231 <a href="http://mercurial.selenic.com/">
231 232 <img src="/static/hglogo.png" alt="mercurial" /></a>
232 233 </div>
233 234 <ul>
234 235 <li><a href="/shortlog/01de2d66a28d">log</a></li>
235 236 <li><a href="/graph/01de2d66a28d">graph</a></li>
236 237 <li><a href="/tags">tags</a></li>
238 <li><a href="/bookmarks">bookmarks</a></li>
237 239 <li><a href="/branches">branches</a></li>
238 240 </ul>
239 241 <ul>
240 242 <li><a href="/rev/01de2d66a28d">changeset</a></li>
241 243 <li><a href="/file/01de2d66a28d">browse</a></li>
242 244 </ul>
243 245 <ul>
244 246 <li><a href="/file/01de2d66a28d/a">file</a></li>
245 247 <li><a href="/diff/01de2d66a28d/a">diff</a></li>
246 248 <li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
247 249 <li class="active">file log</li>
248 250 <li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
249 251 </ul>
250 252 <ul>
251 253 <li><a href="/help">help</a></li>
252 254 </ul>
253 255 </div>
254 256
255 257 <div class="main">
256 258 <h2><a href="/">test</a></h2>
257 259 <h3>log a</h3>
258 260
259 261 <form class="search" action="/log">
260 262
261 263 <p><input name="rev" id="search1" type="text" size="30" /></p>
262 264 <div id="hint">find changesets by author, revision,
263 265 files, or words in the commit message</div>
264 266 </form>
265 267
266 268 <div class="navigate">
267 269 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
268 270 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
269 271 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
270 272
271 273 <table class="bigtable">
272 274 <tr>
273 275 <th class="age">age</th>
274 276 <th class="author">author</th>
275 277 <th class="description">description</th>
276 278 </tr>
277 279 <tr class="parity0">
278 280 <td class="age">1970-01-01</td>
279 281 <td class="author">test</td>
280 282 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
281 283 </tr>
282 284 <tr class="parity1">
283 285 <td class="age">1970-01-01</td>
284 286 <td class="author">test</td>
285 287 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
286 288 </tr>
287 289
288 290 </table>
289 291
290 292 <div class="navigate">
291 293 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
292 294 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
293 295 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
294 296 </div>
295 297
296 298 </div>
297 299 </div>
298 300
299 301
300 302
301 303 </body>
302 304 </html>
303 305
304 306
305 307 first deleted - one revision
306 308
307 309 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/2/a')
308 310 200 Script output follows
309 311
310 312 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
311 313 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
312 314 <head>
313 315 <link rel="icon" href="/static/hgicon.png" type="image/png" />
314 316 <meta name="robots" content="index, nofollow" />
315 317 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
316 318
317 319 <title>test: a history</title>
318 320 <link rel="alternate" type="application/atom+xml"
319 321 href="/atom-log/tip/a" title="Atom feed for test:a" />
320 322 <link rel="alternate" type="application/rss+xml"
321 323 href="/rss-log/tip/a" title="RSS feed for test:a" />
322 324 </head>
323 325 <body>
324 326
325 327 <div class="container">
326 328 <div class="menu">
327 329 <div class="logo">
328 330 <a href="http://mercurial.selenic.com/">
329 331 <img src="/static/hglogo.png" alt="mercurial" /></a>
330 332 </div>
331 333 <ul>
332 334 <li><a href="/shortlog/5ed941583260">log</a></li>
333 335 <li><a href="/graph/5ed941583260">graph</a></li>
334 336 <li><a href="/tags">tags</a></li>
337 <li><a href="/bookmarks">bookmarks</a></li>
335 338 <li><a href="/branches">branches</a></li>
336 339 </ul>
337 340 <ul>
338 341 <li><a href="/rev/5ed941583260">changeset</a></li>
339 342 <li><a href="/file/5ed941583260">browse</a></li>
340 343 </ul>
341 344 <ul>
342 345 <li><a href="/file/5ed941583260/a">file</a></li>
343 346 <li><a href="/diff/5ed941583260/a">diff</a></li>
344 347 <li><a href="/annotate/5ed941583260/a">annotate</a></li>
345 348 <li class="active">file log</li>
346 349 <li><a href="/raw-file/5ed941583260/a">raw</a></li>
347 350 </ul>
348 351 <ul>
349 352 <li><a href="/help">help</a></li>
350 353 </ul>
351 354 </div>
352 355
353 356 <div class="main">
354 357 <h2><a href="/">test</a></h2>
355 358 <h3>log a</h3>
356 359
357 360 <form class="search" action="/log">
358 361
359 362 <p><input name="rev" id="search1" type="text" size="30" /></p>
360 363 <div id="hint">find changesets by author, revision,
361 364 files, or words in the commit message</div>
362 365 </form>
363 366
364 367 <div class="navigate">
365 368 <a href="/log/5ed941583260/a?revcount=30">less</a>
366 369 <a href="/log/5ed941583260/a?revcount=120">more</a>
367 370 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
368 371
369 372 <table class="bigtable">
370 373 <tr>
371 374 <th class="age">age</th>
372 375 <th class="author">author</th>
373 376 <th class="description">description</th>
374 377 </tr>
375 378 <tr class="parity0">
376 379 <td class="age">1970-01-01</td>
377 380 <td class="author">test</td>
378 381 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
379 382 </tr>
380 383
381 384 </table>
382 385
383 386 <div class="navigate">
384 387 <a href="/log/5ed941583260/a?revcount=30">less</a>
385 388 <a href="/log/5ed941583260/a?revcount=120">more</a>
386 389 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
387 390 </div>
388 391
389 392 </div>
390 393 </div>
391 394
392 395
393 396
394 397 </body>
395 398 </html>
396 399
397 400
398 401 first version - one revision
399 402
400 403 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/1/a')
401 404 200 Script output follows
402 405
403 406 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
404 407 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
405 408 <head>
406 409 <link rel="icon" href="/static/hgicon.png" type="image/png" />
407 410 <meta name="robots" content="index, nofollow" />
408 411 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
409 412
410 413 <title>test: a history</title>
411 414 <link rel="alternate" type="application/atom+xml"
412 415 href="/atom-log/tip/a" title="Atom feed for test:a" />
413 416 <link rel="alternate" type="application/rss+xml"
414 417 href="/rss-log/tip/a" title="RSS feed for test:a" />
415 418 </head>
416 419 <body>
417 420
418 421 <div class="container">
419 422 <div class="menu">
420 423 <div class="logo">
421 424 <a href="http://mercurial.selenic.com/">
422 425 <img src="/static/hglogo.png" alt="mercurial" /></a>
423 426 </div>
424 427 <ul>
425 428 <li><a href="/shortlog/5ed941583260">log</a></li>
426 429 <li><a href="/graph/5ed941583260">graph</a></li>
427 430 <li><a href="/tags">tags</a></li>
431 <li><a href="/bookmarks">bookmarks</a></li>
428 432 <li><a href="/branches">branches</a></li>
429 433 </ul>
430 434 <ul>
431 435 <li><a href="/rev/5ed941583260">changeset</a></li>
432 436 <li><a href="/file/5ed941583260">browse</a></li>
433 437 </ul>
434 438 <ul>
435 439 <li><a href="/file/5ed941583260/a">file</a></li>
436 440 <li><a href="/diff/5ed941583260/a">diff</a></li>
437 441 <li><a href="/annotate/5ed941583260/a">annotate</a></li>
438 442 <li class="active">file log</li>
439 443 <li><a href="/raw-file/5ed941583260/a">raw</a></li>
440 444 </ul>
441 445 <ul>
442 446 <li><a href="/help">help</a></li>
443 447 </ul>
444 448 </div>
445 449
446 450 <div class="main">
447 451 <h2><a href="/">test</a></h2>
448 452 <h3>log a</h3>
449 453
450 454 <form class="search" action="/log">
451 455
452 456 <p><input name="rev" id="search1" type="text" size="30" /></p>
453 457 <div id="hint">find changesets by author, revision,
454 458 files, or words in the commit message</div>
455 459 </form>
456 460
457 461 <div class="navigate">
458 462 <a href="/log/5ed941583260/a?revcount=30">less</a>
459 463 <a href="/log/5ed941583260/a?revcount=120">more</a>
460 464 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
461 465
462 466 <table class="bigtable">
463 467 <tr>
464 468 <th class="age">age</th>
465 469 <th class="author">author</th>
466 470 <th class="description">description</th>
467 471 </tr>
468 472 <tr class="parity0">
469 473 <td class="age">1970-01-01</td>
470 474 <td class="author">test</td>
471 475 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
472 476 </tr>
473 477
474 478 </table>
475 479
476 480 <div class="navigate">
477 481 <a href="/log/5ed941583260/a?revcount=30">less</a>
478 482 <a href="/log/5ed941583260/a?revcount=120">more</a>
479 483 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
480 484 </div>
481 485
482 486 </div>
483 487 </div>
484 488
485 489
486 490
487 491 </body>
488 492 </html>
489 493
490 494
491 495 before addition - error
492 496
493 497 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
494 498 404 Not Found
495 499
496 500 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
497 501 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
498 502 <head>
499 503 <link rel="icon" href="/static/hgicon.png" type="image/png" />
500 504 <meta name="robots" content="index, nofollow" />
501 505 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
502 506
503 507 <title>test: error</title>
504 508 </head>
505 509 <body>
506 510
507 511 <div class="container">
508 512 <div class="menu">
509 513 <div class="logo">
510 514 <a href="http://mercurial.selenic.com/">
511 515 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
512 516 </div>
513 517 <ul>
514 518 <li><a href="/shortlog">log</a></li>
515 519 <li><a href="/graph">graph</a></li>
516 520 <li><a href="/tags">tags</a></li>
521 <li><a href="/bookmarks">bookmarks</a></li>
517 522 <li><a href="/branches">branches</a></li>
518 523 <li><a href="/help">help</a></li>
519 524 </ul>
520 525 </div>
521 526
522 527 <div class="main">
523 528
524 529 <h2><a href="/">test</a></h2>
525 530 <h3>error</h3>
526 531
527 532 <form class="search" action="/log">
528 533
529 534 <p><input name="rev" id="search1" type="text" size="30"></p>
530 535 <div id="hint">find changesets by author, revision,
531 536 files, or words in the commit message</div>
532 537 </form>
533 538
534 539 <div class="description">
535 540 <p>
536 541 An error occurred while processing your request:
537 542 </p>
538 543 <p>
539 544 a@6563da9dcf87: not found in manifest
540 545 </p>
541 546 </div>
542 547 </div>
543 548 </div>
544 549
545 550
546 551
547 552 </body>
548 553 </html>
549 554
550 555 [1]
551 556
552 557 should show base link, use spartan because it shows it
553 558
554 559 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/c?style=spartan')
555 560 200 Script output follows
556 561
557 562 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
558 563 <html>
559 564 <head>
560 565 <link rel="icon" href="/static/hgicon.png" type="image/png">
561 566 <meta name="robots" content="index, nofollow" />
562 567 <link rel="stylesheet" href="/static/style.css" type="text/css" />
563 568
564 569 <title>test: c history</title>
565 570 <link rel="alternate" type="application/atom+xml"
566 571 href="/atom-log/tip/c" title="Atom feed for test:c">
567 572 <link rel="alternate" type="application/rss+xml"
568 573 href="/rss-log/tip/c" title="RSS feed for test:c">
569 574 </head>
570 575 <body>
571 576
572 577 <div class="buttons">
573 578 <a href="/log?style=spartan">changelog</a>
574 579 <a href="/shortlog?style=spartan">shortlog</a>
575 580 <a href="/graph?style=spartan">graph</a>
576 581 <a href="/tags?style=spartan">tags</a>
577 582 <a href="/branches?style=spartan">branches</a>
578 583 <a href="/file/b7682196df1c/c?style=spartan">file</a>
579 584 <a href="/annotate/b7682196df1c/c?style=spartan">annotate</a>
580 585 <a href="/help?style=spartan">help</a>
581 586 <a type="application/rss+xml" href="/rss-log/tip/c">rss</a>
582 587 <a type="application/atom+xml" href="/atom-log/tip/c" title="Atom feed for test:c">atom</a>
583 588 </div>
584 589
585 590 <h2>c revision history</h2>
586 591
587 592 <p>navigate: <small class="navigate"><a href="/log/1a6696706df2/c?style=spartan">(0)</a> <a href="/log/tip/c?style=spartan">tip</a> </small></p>
588 593
589 594 <table class="logEntry parity0">
590 595 <tr>
591 596 <th class="age">1970-01-01:</th>
592 597 <th class="firstline"><a href="/rev/b7682196df1c?style=spartan">change c</a></th>
593 598 </tr>
594 599 <tr>
595 600 <th class="revision">revision 1:</td>
596 601 <td class="node">
597 602 <a href="/file/b7682196df1c/c?style=spartan">b7682196df1c</a>
598 603 <a href="/diff/b7682196df1c/c?style=spartan">(diff)</a>
599 604 <a href="/annotate/b7682196df1c/c?style=spartan">(annotate)</a>
600 605 </td>
601 606 </tr>
602 607
603 608 <tr>
604 609 <th class="author">author:</th>
605 610 <td class="author">&#116;&#101;&#115;&#116;</td>
606 611 </tr>
607 612 <tr>
608 613 <th class="date">date:</th>
609 614 <td class="date">Thu Jan 01 00:00:00 1970 +0000</td>
610 615 </tr>
611 616 </table>
612 617
613 618
614 619 <table class="logEntry parity1">
615 620 <tr>
616 621 <th class="age">1970-01-01:</th>
617 622 <th class="firstline"><a href="/rev/1a6696706df2?style=spartan">mv b</a></th>
618 623 </tr>
619 624 <tr>
620 625 <th class="revision">revision 0:</td>
621 626 <td class="node">
622 627 <a href="/file/1a6696706df2/c?style=spartan">1a6696706df2</a>
623 628 <a href="/diff/1a6696706df2/c?style=spartan">(diff)</a>
624 629 <a href="/annotate/1a6696706df2/c?style=spartan">(annotate)</a>
625 630 </td>
626 631 </tr>
627 632
628 633 <tr>
629 634 <th>base:</th>
630 635 <td>
631 636 <a href="/file/1e88685f5dde/b?style=spartan">
632 637 b@1e88685f5dde
633 638 </a>
634 639 </td>
635 640 </tr>
636 641 <tr>
637 642 <th class="author">author:</th>
638 643 <td class="author">&#116;&#101;&#115;&#116;</td>
639 644 </tr>
640 645 <tr>
641 646 <th class="date">date:</th>
642 647 <td class="date">Thu Jan 01 00:00:00 1970 +0000</td>
643 648 </tr>
644 649 </table>
645 650
646 651
647 652
648 653
649 654
650 655 <div class="logo">
651 656 <a href="http://mercurial.selenic.com/">
652 657 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
653 658 </div>
654 659
655 660 </body>
656 661 </html>
657 662
658 663
659 664 rss log
660 665
661 666 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rss-log/tip/a')
662 667 200 Script output follows
663 668
664 669 <?xml version="1.0" encoding="ascii"?>
665 670 <rss version="2.0">
666 671 <channel>
667 672 <link>http://*:$HGPORT/</link> (glob)
668 673 <language>en-us</language>
669 674
670 675 <title>test: a history</title>
671 676 <description>a revision history</description>
672 677 <item>
673 678 <title>second a</title>
674 679 <link>http://*:$HGPORT/log01de2d66a28d/a</link> (glob)
675 680 <description><![CDATA[second a]]></description>
676 681 <author>&#116;&#101;&#115;&#116;</author>
677 682 <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
678 683 </item>
679 684 <item>
680 685 <title>first a</title>
681 686 <link>http://*:$HGPORT/log5ed941583260/a</link> (glob)
682 687 <description><![CDATA[first a]]></description>
683 688 <author>&#116;&#101;&#115;&#116;</author>
684 689 <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
685 690 </item>
686 691
687 692 </channel>
688 693 </rss>
689 694
690 695 atom log
691 696
692 697 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/atom-log/tip/a')
693 698 200 Script output follows
694 699
695 700 <?xml version="1.0" encoding="ascii"?>
696 701 <feed xmlns="http://www.w3.org/2005/Atom">
697 702 <id>http://*:$HGPORT/atom-log/tip/a</id> (glob)
698 703 <link rel="self" href="http://*:$HGPORT/atom-log/tip/a"/> (glob)
699 704 <title>test: a history</title>
700 705 <updated>1970-01-01T00:00:00+00:00</updated>
701 706
702 707 <entry>
703 708 <title>second a</title>
704 709 <id>http://*:$HGPORT/#changeset-01de2d66a28df5549090991dccda788726948517</id> (glob)
705 710 <link href="http://*:$HGPORT/rev/01de2d66a28d"/> (glob)
706 711 <author>
707 712 <name>test</name>
708 713 <email>&#116;&#101;&#115;&#116;</email>
709 714 </author>
710 715 <updated>1970-01-01T00:00:00+00:00</updated>
711 716 <published>1970-01-01T00:00:00+00:00</published>
712 717 <content type="xhtml">
713 718 <div xmlns="http://www.w3.org/1999/xhtml">
714 719 <pre xml:space="preserve">second a</pre>
715 720 </div>
716 721 </content>
717 722 </entry>
718 723 <entry>
719 724 <title>first a</title>
720 725 <id>http://*:$HGPORT/#changeset-5ed941583260248620985524192fdc382ef57c36</id> (glob)
721 726 <link href="http://*:$HGPORT/rev/5ed941583260"/> (glob)
722 727 <author>
723 728 <name>test</name>
724 729 <email>&#116;&#101;&#115;&#116;</email>
725 730 </author>
726 731 <updated>1970-01-01T00:00:00+00:00</updated>
727 732 <published>1970-01-01T00:00:00+00:00</published>
728 733 <content type="xhtml">
729 734 <div xmlns="http://www.w3.org/1999/xhtml">
730 735 <pre xml:space="preserve">first a</pre>
731 736 </div>
732 737 </content>
733 738 </entry>
734 739
735 740 </feed>
736 741
737 742 errors
738 743
739 744 $ cat errors.log
@@ -1,204 +1,206 b''
1 1 setting up repo
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ echo a > a
6 6 $ hg ci -Ama
7 7 adding a
8 8 $ hg rm a
9 9 $ hg ci -mdel
10 10
11 11 set up hgweb
12 12
13 13 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
14 14 $ cat hg.pid >> $DAEMON_PIDS
15 15
16 16 revision
17 17
18 18 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip'
19 19 200 Script output follows
20 20
21 21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
22 22 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
23 23 <head>
24 24 <link rel="icon" href="/static/hgicon.png" type="image/png" />
25 25 <meta name="robots" content="index, nofollow" />
26 26 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
27 27
28 28 <title>test: c78f6c5cbea9</title>
29 29 </head>
30 30 <body>
31 31 <div class="container">
32 32 <div class="menu">
33 33 <div class="logo">
34 34 <a href="http://mercurial.selenic.com/">
35 35 <img src="/static/hglogo.png" alt="mercurial" /></a>
36 36 </div>
37 37 <ul>
38 38 <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
39 39 <li><a href="/graph/c78f6c5cbea9">graph</a></li>
40 40 <li><a href="/tags">tags</a></li>
41 <li><a href="/bookmarks">bookmarks</a></li>
41 42 <li><a href="/branches">branches</a></li>
42 43 </ul>
43 44 <ul>
44 45 <li class="active">changeset</li>
45 46 <li><a href="/raw-rev/c78f6c5cbea9">raw</a></li>
46 47 <li><a href="/file/c78f6c5cbea9">browse</a></li>
47 48 </ul>
48 49 <ul>
49 50
50 51 </ul>
51 52 <ul>
52 53 <li><a href="/help">help</a></li>
53 54 </ul>
54 55 </div>
55 56
56 57 <div class="main">
57 58
58 59 <h2><a href="/">test</a></h2>
59 60 <h3>changeset 1:c78f6c5cbea9 <span class="tag">tip</span> </h3>
60 61
61 62 <form class="search" action="/log">
62 63
63 64 <p><input name="rev" id="search1" type="text" size="30" /></p>
64 65 <div id="hint">find changesets by author, revision,
65 66 files, or words in the commit message</div>
66 67 </form>
67 68
68 69 <div class="description">del</div>
69 70
70 71 <table id="changesetEntry">
71 72 <tr>
72 73 <th class="author">author</th>
73 74 <td class="author">&#116;&#101;&#115;&#116;</td>
74 75 </tr>
75 76 <tr>
76 77 <th class="date">date</th>
77 78 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td></tr>
78 79 <tr>
79 80 <th class="author">parents</th>
80 81 <td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a> </td>
81 82 </tr>
82 83 <tr>
83 84 <th class="author">children</th>
84 85 <td class="author"></td>
85 86 </tr>
86 87 <tr>
87 88 <th class="files">files</th>
88 89 <td class="files">a </td>
89 90 </tr>
90 91 </table>
91 92
92 93 <div class="overflow">
93 94 <div class="sourcefirst"> line diff</div>
94 95
95 96 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
96 97 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
97 98 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
98 99 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
99 100 </span></pre></div>
100 101 </div>
101 102
102 103 </div>
103 104 </div>
104 105
105 106
106 107 </body>
107 108 </html>
108 109
109 110
110 111 diff removed file
111 112
112 113 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
113 114 200 Script output follows
114 115
115 116 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
116 117 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
117 118 <head>
118 119 <link rel="icon" href="/static/hgicon.png" type="image/png" />
119 120 <meta name="robots" content="index, nofollow" />
120 121 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
121 122
122 123 <title>test: a diff</title>
123 124 </head>
124 125 <body>
125 126
126 127 <div class="container">
127 128 <div class="menu">
128 129 <div class="logo">
129 130 <a href="http://mercurial.selenic.com/">
130 131 <img src="/static/hglogo.png" alt="mercurial" /></a>
131 132 </div>
132 133 <ul>
133 134 <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
134 135 <li><a href="/graph/c78f6c5cbea9">graph</a></li>
135 136 <li><a href="/tags">tags</a></li>
137 <li><a href="/bookmarks">bookmarks</a></li>
136 138 <li><a href="/branches">branches</a></li>
137 139 </ul>
138 140 <ul>
139 141 <li><a href="/rev/c78f6c5cbea9">changeset</a></li>
140 142 <li><a href="/file/c78f6c5cbea9">browse</a></li>
141 143 </ul>
142 144 <ul>
143 145 <li><a href="/file/c78f6c5cbea9/a">file</a></li>
144 146 <li><a href="/file/tip/a">latest</a></li>
145 147 <li class="active">diff</li>
146 148 <li><a href="/annotate/c78f6c5cbea9/a">annotate</a></li>
147 149 <li><a href="/log/c78f6c5cbea9/a">file log</a></li>
148 150 <li><a href="/raw-file/c78f6c5cbea9/a">raw</a></li>
149 151 </ul>
150 152 <ul>
151 153 <li><a href="/help">help</a></li>
152 154 </ul>
153 155 </div>
154 156
155 157 <div class="main">
156 158 <h2><a href="/">test</a></h2>
157 159 <h3>diff a @ 1:c78f6c5cbea9</h3>
158 160
159 161 <form class="search" action="/log">
160 162 <p></p>
161 163 <p><input name="rev" id="search1" type="text" size="30" /></p>
162 164 <div id="hint">find changesets by author, revision,
163 165 files, or words in the commit message</div>
164 166 </form>
165 167
166 168 <div class="description">del</div>
167 169
168 170 <table id="changesetEntry">
169 171 <tr>
170 172 <th>author</th>
171 173 <td>&#116;&#101;&#115;&#116;</td>
172 174 </tr>
173 175 <tr>
174 176 <th>date</th>
175 177 <td>Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
176 178 </tr>
177 179 <tr>
178 180 <th>parents</th>
179 181 <td><a href="/file/cb9a9f314b8b/a">cb9a9f314b8b</a> </td>
180 182 </tr>
181 183 <tr>
182 184 <th>children</th>
183 185 <td></td>
184 186 </tr>
185 187
186 188 </table>
187 189
188 190 <div class="overflow">
189 191 <div class="sourcefirst"> line diff</div>
190 192
191 193 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
192 194 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
193 195 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
194 196 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
195 197 </span></pre></div>
196 198 </div>
197 199 </div>
198 200 </div>
199 201
200 202
201 203
202 204 </body>
203 205 </html>
204 206
@@ -1,430 +1,433 b''
1 1 Some tests for hgweb. Tests static files, plain files and different 404's.
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ mkdir da
6 6 $ echo foo > da/foo
7 7 $ echo foo > foo
8 8 $ hg ci -Ambase
9 9 adding da/foo
10 10 adding foo
11 11 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
12 12 $ cat hg.pid >> $DAEMON_PIDS
13 13
14 14 manifest
15 15
16 16 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
17 17 200 Script output follows
18 18
19 19
20 20 drwxr-xr-x da
21 21 -rw-r--r-- 4 foo
22 22
23 23
24 24 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
25 25 200 Script output follows
26 26
27 27
28 28 -rw-r--r-- 4 foo
29 29
30 30
31 31
32 32 plain file
33 33
34 34 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw'
35 35 200 Script output follows
36 36
37 37 foo
38 38
39 39 should give a 404 - static file that does not exist
40 40
41 41 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus'
42 42 404 Not Found
43 43
44 44 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
45 45 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
46 46 <head>
47 47 <link rel="icon" href="/static/hgicon.png" type="image/png" />
48 48 <meta name="robots" content="index, nofollow" />
49 49 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
50 50
51 51 <title>test: error</title>
52 52 </head>
53 53 <body>
54 54
55 55 <div class="container">
56 56 <div class="menu">
57 57 <div class="logo">
58 58 <a href="http://mercurial.selenic.com/">
59 59 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
60 60 </div>
61 61 <ul>
62 62 <li><a href="/shortlog">log</a></li>
63 63 <li><a href="/graph">graph</a></li>
64 64 <li><a href="/tags">tags</a></li>
65 <li><a href="/bookmarks">bookmarks</a></li>
65 66 <li><a href="/branches">branches</a></li>
66 67 <li><a href="/help">help</a></li>
67 68 </ul>
68 69 </div>
69 70
70 71 <div class="main">
71 72
72 73 <h2><a href="/">test</a></h2>
73 74 <h3>error</h3>
74 75
75 76 <form class="search" action="/log">
76 77
77 78 <p><input name="rev" id="search1" type="text" size="30"></p>
78 79 <div id="hint">find changesets by author, revision,
79 80 files, or words in the commit message</div>
80 81 </form>
81 82
82 83 <div class="description">
83 84 <p>
84 85 An error occurred while processing your request:
85 86 </p>
86 87 <p>
87 88 Not Found
88 89 </p>
89 90 </div>
90 91 </div>
91 92 </div>
92 93
93 94
94 95
95 96 </body>
96 97 </html>
97 98
98 99 [1]
99 100
100 101 should give a 404 - bad revision
101 102
102 103 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw'
103 104 404 Not Found
104 105
105 106
106 107 error: revision not found: spam
107 108 [1]
108 109
109 110 should give a 400 - bad command
110 111
111 112 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw'
112 113 400* (glob)
113 114
114 115
115 116 error: no such method: spam
116 117 [1]
117 118
118 119 should give a 404 - file does not exist
119 120
120 121 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
121 122 404 Not Found
122 123
123 124
124 125 error: bork@2ef0ac749a14: not found in manifest
125 126 [1]
126 127 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork'
127 128 404 Not Found
128 129
129 130 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
130 131 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
131 132 <head>
132 133 <link rel="icon" href="/static/hgicon.png" type="image/png" />
133 134 <meta name="robots" content="index, nofollow" />
134 135 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
135 136
136 137 <title>test: error</title>
137 138 </head>
138 139 <body>
139 140
140 141 <div class="container">
141 142 <div class="menu">
142 143 <div class="logo">
143 144 <a href="http://mercurial.selenic.com/">
144 145 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
145 146 </div>
146 147 <ul>
147 148 <li><a href="/shortlog">log</a></li>
148 149 <li><a href="/graph">graph</a></li>
149 150 <li><a href="/tags">tags</a></li>
151 <li><a href="/bookmarks">bookmarks</a></li>
150 152 <li><a href="/branches">branches</a></li>
151 153 <li><a href="/help">help</a></li>
152 154 </ul>
153 155 </div>
154 156
155 157 <div class="main">
156 158
157 159 <h2><a href="/">test</a></h2>
158 160 <h3>error</h3>
159 161
160 162 <form class="search" action="/log">
161 163
162 164 <p><input name="rev" id="search1" type="text" size="30"></p>
163 165 <div id="hint">find changesets by author, revision,
164 166 files, or words in the commit message</div>
165 167 </form>
166 168
167 169 <div class="description">
168 170 <p>
169 171 An error occurred while processing your request:
170 172 </p>
171 173 <p>
172 174 bork@2ef0ac749a14: not found in manifest
173 175 </p>
174 176 </div>
175 177 </div>
176 178 </div>
177 179
178 180
179 181
180 182 </body>
181 183 </html>
182 184
183 185 [1]
184 186 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
185 187 404 Not Found
186 188
187 189
188 190 error: bork@2ef0ac749a14: not found in manifest
189 191 [1]
190 192
191 193 try bad style
192 194
193 195 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=foobar')
194 196 200 Script output follows
195 197
196 198 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
197 199 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
198 200 <head>
199 201 <link rel="icon" href="/static/hgicon.png" type="image/png" />
200 202 <meta name="robots" content="index, nofollow" />
201 203 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
202 204
203 205 <title>test: 2ef0ac749a14 /</title>
204 206 </head>
205 207 <body>
206 208
207 209 <div class="container">
208 210 <div class="menu">
209 211 <div class="logo">
210 212 <a href="http://mercurial.selenic.com/">
211 213 <img src="/static/hglogo.png" alt="mercurial" /></a>
212 214 </div>
213 215 <ul>
214 216 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
215 217 <li><a href="/graph/2ef0ac749a14">graph</a></li>
216 218 <li><a href="/tags">tags</a></li>
219 <li><a href="/bookmarks">bookmarks</a></li>
217 220 <li><a href="/branches">branches</a></li>
218 221 </ul>
219 222 <ul>
220 223 <li><a href="/rev/2ef0ac749a14">changeset</a></li>
221 224 <li class="active">browse</li>
222 225 </ul>
223 226 <ul>
224 227
225 228 </ul>
226 229 <ul>
227 230 <li><a href="/help">help</a></li>
228 231 </ul>
229 232 </div>
230 233
231 234 <div class="main">
232 235 <h2><a href="/">test</a></h2>
233 236 <h3>directory / @ 0:2ef0ac749a14 <span class="tag">tip</span> </h3>
234 237
235 238 <form class="search" action="/log">
236 239
237 240 <p><input name="rev" id="search1" type="text" size="30" /></p>
238 241 <div id="hint">find changesets by author, revision,
239 242 files, or words in the commit message</div>
240 243 </form>
241 244
242 245 <table class="bigtable">
243 246 <tr>
244 247 <th class="name">name</th>
245 248 <th class="size">size</th>
246 249 <th class="permissions">permissions</th>
247 250 </tr>
248 251 <tr class="fileline parity0">
249 252 <td class="name"><a href="/file/2ef0ac749a14/">[up]</a></td>
250 253 <td class="size"></td>
251 254 <td class="permissions">drwxr-xr-x</td>
252 255 </tr>
253 256
254 257 <tr class="fileline parity1">
255 258 <td class="name">
256 259 <a href="/file/2ef0ac749a14/da">
257 260 <img src="/static/coal-folder.png" alt="dir."/> da/
258 261 </a>
259 262 <a href="/file/2ef0ac749a14/da/">
260 263
261 264 </a>
262 265 </td>
263 266 <td class="size"></td>
264 267 <td class="permissions">drwxr-xr-x</td>
265 268 </tr>
266 269
267 270 <tr class="fileline parity0">
268 271 <td class="filename">
269 272 <a href="/file/2ef0ac749a14/foo">
270 273 <img src="/static/coal-file.png" alt="file"/> foo
271 274 </a>
272 275 </td>
273 276 <td class="size">4</td>
274 277 <td class="permissions">-rw-r--r--</td>
275 278 </tr>
276 279 </table>
277 280 </div>
278 281 </div>
279 282
280 283
281 284 </body>
282 285 </html>
283 286
284 287
285 288 stop and restart
286 289
287 290 $ "$TESTDIR/killdaemons.py"
288 291 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
289 292 $ cat hg.pid >> $DAEMON_PIDS
290 293
291 294 Test the access/error files are opened in append mode
292 295
293 296 $ python -c "print len(file('access.log').readlines()), 'log lines written'"
294 297 10 log lines written
295 298
296 299 static file
297 300
298 301 $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT '/static/style-gitweb.css'
299 302 200 Script output follows
300 303
301 304 body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
302 305 a { color:#0000cc; }
303 306 a:hover, a:visited, a:active { color:#880000; }
304 307 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
305 308 div.page_header a:visited { color:#0000cc; }
306 309 div.page_header a:hover { color:#880000; }
307 310 div.page_nav { padding:8px; }
308 311 div.page_nav a:visited { color:#0000cc; }
309 312 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
310 313 div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
311 314 div.page_footer_text { float:left; color:#555555; font-style:italic; }
312 315 div.page_body { padding:8px; }
313 316 div.title, a.title {
314 317 display:block; padding:6px 8px;
315 318 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
316 319 }
317 320 a.title:hover { background-color: #d9d8d1; }
318 321 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
319 322 div.log_body { padding:8px 8px 8px 150px; }
320 323 .age { white-space:nowrap; }
321 324 span.age { position:relative; float:left; width:142px; font-style:italic; }
322 325 div.log_link {
323 326 padding:0px 8px;
324 327 font-size:10px; font-family:sans-serif; font-style:normal;
325 328 position:relative; float:left; width:136px;
326 329 }
327 330 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
328 331 a.list { text-decoration:none; color:#000000; }
329 332 a.list:hover { text-decoration:underline; color:#880000; }
330 333 table { padding:8px 4px; }
331 334 th { padding:2px 5px; font-size:12px; text-align:left; }
332 335 tr.light:hover, .parity0:hover { background-color:#edece6; }
333 336 tr.dark, .parity1 { background-color:#f6f6f0; }
334 337 tr.dark:hover, .parity1:hover { background-color:#edece6; }
335 338 td { padding:2px 5px; font-size:12px; vertical-align:top; }
336 339 td.closed { background-color: #99f; }
337 340 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
338 341 td.indexlinks { white-space: nowrap; }
339 342 td.indexlinks a {
340 343 padding: 2px 5px; line-height: 10px;
341 344 border: 1px solid;
342 345 color: #ffffff; background-color: #7777bb;
343 346 border-color: #aaaadd #333366 #333366 #aaaadd;
344 347 font-weight: bold; text-align: center; text-decoration: none;
345 348 font-size: 10px;
346 349 }
347 350 td.indexlinks a:hover { background-color: #6666aa; }
348 351 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
349 352 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
350 353 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
351 354 div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
352 355 .linenr { color:#999999; text-decoration:none }
353 356 div.rss_logo { float: right; white-space: nowrap; }
354 357 div.rss_logo a {
355 358 padding:3px 6px; line-height:10px;
356 359 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
357 360 color:#ffffff; background-color:#ff6600;
358 361 font-weight:bold; font-family:sans-serif; font-size:10px;
359 362 text-align:center; text-decoration:none;
360 363 }
361 364 div.rss_logo a:hover { background-color:#ee5500; }
362 365 pre { margin: 0; }
363 366 span.logtags span {
364 367 padding: 0px 4px;
365 368 font-size: 10px;
366 369 font-weight: normal;
367 370 border: 1px solid;
368 371 background-color: #ffaaff;
369 372 border-color: #ffccff #ff00ee #ff00ee #ffccff;
370 373 }
371 374 span.logtags span.tagtag {
372 375 background-color: #ffffaa;
373 376 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
374 377 }
375 378 span.logtags span.branchtag {
376 379 background-color: #aaffaa;
377 380 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
378 381 }
379 382 span.logtags span.inbranchtag {
380 383 background-color: #d5dde6;
381 384 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
382 385 }
383 386
384 387 /* Graph */
385 388 div#wrapper {
386 389 position: relative;
387 390 margin: 0;
388 391 padding: 0;
389 392 margin-top: 3px;
390 393 }
391 394
392 395 canvas {
393 396 position: absolute;
394 397 z-index: 5;
395 398 top: -0.9em;
396 399 margin: 0;
397 400 }
398 401
399 402 ul#nodebgs {
400 403 list-style: none inside none;
401 404 padding: 0;
402 405 margin: 0;
403 406 top: -0.7em;
404 407 }
405 408
406 409 ul#graphnodes li, ul#nodebgs li {
407 410 height: 39px;
408 411 }
409 412
410 413 ul#graphnodes {
411 414 position: absolute;
412 415 z-index: 10;
413 416 top: -0.8em;
414 417 list-style: none inside none;
415 418 padding: 0;
416 419 }
417 420
418 421 ul#graphnodes li .info {
419 422 display: block;
420 423 font-size: 100%;
421 424 position: relative;
422 425 top: -3px;
423 426 font-style: italic;
424 427 }
425 428 304 Not Modified
426 429
427 430
428 431 errors
429 432
430 433 $ cat errors.log
General Comments 0
You need to be logged in to leave comments. Login now