##// END OF EJS Templates
hgweb: make graph page size equal to shortlog
Dirkjan Ochtman -
r10245:207b94f6 default
parent child Browse files
Show More
@@ -1,698 +1,698
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, incorporated herein by reference.
7 7
8 8 import os, mimetypes, re, cgi, copy
9 9 import webutil
10 10 from mercurial import error, 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
17 17 # __all__ is populated with the allowed commands. Be sure to add to it if
18 18 # you're adding a new command, or the new command won't work.
19 19
20 20 __all__ = [
21 21 'log', 'rawfile', 'file', 'changelog', 'shortlog', 'changeset', 'rev',
22 22 'manifest', 'tags', 'branches', 'summary', 'filediff', 'diff', 'annotate',
23 23 'filelog', 'archive', 'static', 'graph',
24 24 ]
25 25
26 26 def log(web, req, tmpl):
27 27 if 'file' in req.form and req.form['file'][0]:
28 28 return filelog(web, req, tmpl)
29 29 else:
30 30 return changelog(web, req, tmpl)
31 31
32 32 def rawfile(web, req, tmpl):
33 33 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
34 34 if not path:
35 35 content = manifest(web, req, tmpl)
36 36 req.respond(HTTP_OK, web.ctype)
37 37 return content
38 38
39 39 try:
40 40 fctx = webutil.filectx(web.repo, req)
41 41 except error.LookupError, inst:
42 42 try:
43 43 content = manifest(web, req, tmpl)
44 44 req.respond(HTTP_OK, web.ctype)
45 45 return content
46 46 except ErrorResponse:
47 47 raise inst
48 48
49 49 path = fctx.path()
50 50 text = fctx.data()
51 51 mt = mimetypes.guess_type(path)[0]
52 52 if mt is None:
53 53 mt = binary(text) and 'application/octet-stream' or 'text/plain'
54 54
55 55 req.respond(HTTP_OK, mt, path, len(text))
56 56 return [text]
57 57
58 58 def _filerevision(web, tmpl, fctx):
59 59 f = fctx.path()
60 60 text = fctx.data()
61 61 parity = paritygen(web.stripecount)
62 62
63 63 if binary(text):
64 64 mt = mimetypes.guess_type(f)[0] or 'application/octet-stream'
65 65 text = '(binary:%s)' % mt
66 66
67 67 def lines():
68 68 for lineno, t in enumerate(text.splitlines(True)):
69 69 yield {"line": t,
70 70 "lineid": "l%d" % (lineno + 1),
71 71 "linenumber": "% 6d" % (lineno + 1),
72 72 "parity": parity.next()}
73 73
74 74 return tmpl("filerevision",
75 75 file=f,
76 76 path=webutil.up(f),
77 77 text=lines(),
78 78 rev=fctx.rev(),
79 79 node=hex(fctx.node()),
80 80 author=fctx.user(),
81 81 date=fctx.date(),
82 82 desc=fctx.description(),
83 83 branch=webutil.nodebranchnodefault(fctx),
84 84 parent=webutil.parents(fctx),
85 85 child=webutil.children(fctx),
86 86 rename=webutil.renamelink(fctx),
87 87 permissions=fctx.manifest().flags(f))
88 88
89 89 def file(web, req, tmpl):
90 90 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
91 91 if not path:
92 92 return manifest(web, req, tmpl)
93 93 try:
94 94 return _filerevision(web, tmpl, webutil.filectx(web.repo, req))
95 95 except error.LookupError, inst:
96 96 try:
97 97 return manifest(web, req, tmpl)
98 98 except ErrorResponse:
99 99 raise inst
100 100
101 101 def _search(web, tmpl, query):
102 102
103 103 def changelist(**map):
104 104 cl = web.repo.changelog
105 105 count = 0
106 106 qw = query.lower().split()
107 107
108 108 def revgen():
109 109 for i in xrange(len(cl) - 1, 0, -100):
110 110 l = []
111 111 for j in xrange(max(0, i - 100), i + 1):
112 112 ctx = web.repo[j]
113 113 l.append(ctx)
114 114 l.reverse()
115 115 for e in l:
116 116 yield e
117 117
118 118 for ctx in revgen():
119 119 miss = 0
120 120 for q in qw:
121 121 if not (q in ctx.user().lower() or
122 122 q in ctx.description().lower() or
123 123 q in " ".join(ctx.files()).lower()):
124 124 miss = 1
125 125 break
126 126 if miss:
127 127 continue
128 128
129 129 count += 1
130 130 n = ctx.node()
131 131 showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n)
132 132 files = webutil.listfilediffs(tmpl, ctx.files(), n, web.maxfiles)
133 133
134 134 yield tmpl('searchentry',
135 135 parity=parity.next(),
136 136 author=ctx.user(),
137 137 parent=webutil.parents(ctx),
138 138 child=webutil.children(ctx),
139 139 changelogtag=showtags,
140 140 desc=ctx.description(),
141 141 date=ctx.date(),
142 142 files=files,
143 143 rev=ctx.rev(),
144 144 node=hex(n),
145 145 tags=webutil.nodetagsdict(web.repo, n),
146 146 inbranch=webutil.nodeinbranch(web.repo, ctx),
147 147 branches=webutil.nodebranchdict(web.repo, ctx))
148 148
149 149 if count >= web.maxchanges:
150 150 break
151 151
152 152 cl = web.repo.changelog
153 153 parity = paritygen(web.stripecount)
154 154
155 155 return tmpl('search',
156 156 query=query,
157 157 node=hex(cl.tip()),
158 158 entries=changelist,
159 159 archives=web.archivelist("tip"))
160 160
161 161 def changelog(web, req, tmpl, shortlog = False):
162 162 if 'node' in req.form:
163 163 ctx = webutil.changectx(web.repo, req)
164 164 else:
165 165 if 'rev' in req.form:
166 166 hi = req.form['rev'][0]
167 167 else:
168 168 hi = len(web.repo) - 1
169 169 try:
170 170 ctx = web.repo[hi]
171 171 except error.RepoError:
172 172 return _search(web, tmpl, hi) # XXX redirect to 404 page?
173 173
174 174 def changelist(limit=0, **map):
175 175 l = [] # build a list in forward order for efficiency
176 176 for i in xrange(start, end):
177 177 ctx = web.repo[i]
178 178 n = ctx.node()
179 179 showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n)
180 180 files = webutil.listfilediffs(tmpl, ctx.files(), n, web.maxfiles)
181 181
182 182 l.insert(0, {"parity": parity.next(),
183 183 "author": ctx.user(),
184 184 "parent": webutil.parents(ctx, i - 1),
185 185 "child": webutil.children(ctx, i + 1),
186 186 "changelogtag": showtags,
187 187 "desc": ctx.description(),
188 188 "date": ctx.date(),
189 189 "files": files,
190 190 "rev": i,
191 191 "node": hex(n),
192 192 "tags": webutil.nodetagsdict(web.repo, n),
193 193 "inbranch": webutil.nodeinbranch(web.repo, ctx),
194 194 "branches": webutil.nodebranchdict(web.repo, ctx)
195 195 })
196 196
197 197 if limit > 0:
198 198 l = l[:limit]
199 199
200 200 for e in l:
201 201 yield e
202 202
203 203 maxchanges = shortlog and web.maxshortchanges or web.maxchanges
204 204 cl = web.repo.changelog
205 205 count = len(cl)
206 206 pos = ctx.rev()
207 207 start = max(0, pos - maxchanges + 1)
208 208 end = min(count, start + maxchanges)
209 209 pos = end - 1
210 210 parity = paritygen(web.stripecount, offset=start-end)
211 211
212 212 changenav = webutil.revnavgen(pos, maxchanges, count, web.repo.changectx)
213 213
214 214 return tmpl(shortlog and 'shortlog' or 'changelog',
215 215 changenav=changenav,
216 216 node=hex(ctx.node()),
217 217 rev=pos, changesets=count,
218 218 entries=lambda **x: changelist(limit=0,**x),
219 219 latestentry=lambda **x: changelist(limit=1,**x),
220 220 archives=web.archivelist("tip"))
221 221
222 222 def shortlog(web, req, tmpl):
223 223 return changelog(web, req, tmpl, shortlog = True)
224 224
225 225 def changeset(web, req, tmpl):
226 226 ctx = webutil.changectx(web.repo, req)
227 227 showtags = webutil.showtag(web.repo, tmpl, 'changesettag', ctx.node())
228 228 showbranch = webutil.nodebranchnodefault(ctx)
229 229
230 230 files = []
231 231 parity = paritygen(web.stripecount)
232 232 for f in ctx.files():
233 233 template = f in ctx and 'filenodelink' or 'filenolink'
234 234 files.append(tmpl(template,
235 235 node=ctx.hex(), file=f,
236 236 parity=parity.next()))
237 237
238 238 parity = paritygen(web.stripecount)
239 239 style = web.config('web', 'style', 'paper')
240 240 if 'style' in req.form:
241 241 style = req.form['style'][0]
242 242
243 243 diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style)
244 244 return tmpl('changeset',
245 245 diff=diffs,
246 246 rev=ctx.rev(),
247 247 node=ctx.hex(),
248 248 parent=webutil.parents(ctx),
249 249 child=webutil.children(ctx),
250 250 changesettag=showtags,
251 251 changesetbranch=showbranch,
252 252 author=ctx.user(),
253 253 desc=ctx.description(),
254 254 date=ctx.date(),
255 255 files=files,
256 256 archives=web.archivelist(ctx.hex()),
257 257 tags=webutil.nodetagsdict(web.repo, ctx.node()),
258 258 branch=webutil.nodebranchnodefault(ctx),
259 259 inbranch=webutil.nodeinbranch(web.repo, ctx),
260 260 branches=webutil.nodebranchdict(web.repo, ctx))
261 261
262 262 rev = changeset
263 263
264 264 def manifest(web, req, tmpl):
265 265 ctx = webutil.changectx(web.repo, req)
266 266 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
267 267 mf = ctx.manifest()
268 268 node = ctx.node()
269 269
270 270 files = {}
271 271 dirs = {}
272 272 parity = paritygen(web.stripecount)
273 273
274 274 if path and path[-1] != "/":
275 275 path += "/"
276 276 l = len(path)
277 277 abspath = "/" + path
278 278
279 279 for f, n in mf.iteritems():
280 280 if f[:l] != path:
281 281 continue
282 282 remain = f[l:]
283 283 elements = remain.split('/')
284 284 if len(elements) == 1:
285 285 files[remain] = f
286 286 else:
287 287 h = dirs # need to retain ref to dirs (root)
288 288 for elem in elements[0:-1]:
289 289 if elem not in h:
290 290 h[elem] = {}
291 291 h = h[elem]
292 292 if len(h) > 1:
293 293 break
294 294 h[None] = None # denotes files present
295 295
296 296 if mf and not files and not dirs:
297 297 raise ErrorResponse(HTTP_NOT_FOUND, 'path not found: ' + path)
298 298
299 299 def filelist(**map):
300 300 for f in sorted(files):
301 301 full = files[f]
302 302
303 303 fctx = ctx.filectx(full)
304 304 yield {"file": full,
305 305 "parity": parity.next(),
306 306 "basename": f,
307 307 "date": fctx.date(),
308 308 "size": fctx.size(),
309 309 "permissions": mf.flags(full)}
310 310
311 311 def dirlist(**map):
312 312 for d in sorted(dirs):
313 313
314 314 emptydirs = []
315 315 h = dirs[d]
316 316 while isinstance(h, dict) and len(h) == 1:
317 317 k,v = h.items()[0]
318 318 if v:
319 319 emptydirs.append(k)
320 320 h = v
321 321
322 322 path = "%s%s" % (abspath, d)
323 323 yield {"parity": parity.next(),
324 324 "path": path,
325 325 "emptydirs": "/".join(emptydirs),
326 326 "basename": d}
327 327
328 328 return tmpl("manifest",
329 329 rev=ctx.rev(),
330 330 node=hex(node),
331 331 path=abspath,
332 332 up=webutil.up(abspath),
333 333 upparity=parity.next(),
334 334 fentries=filelist,
335 335 dentries=dirlist,
336 336 archives=web.archivelist(hex(node)),
337 337 tags=webutil.nodetagsdict(web.repo, node),
338 338 inbranch=webutil.nodeinbranch(web.repo, ctx),
339 339 branches=webutil.nodebranchdict(web.repo, ctx))
340 340
341 341 def tags(web, req, tmpl):
342 342 i = web.repo.tagslist()
343 343 i.reverse()
344 344 parity = paritygen(web.stripecount)
345 345
346 346 def entries(notip=False, limit=0, **map):
347 347 count = 0
348 348 for k, n in i:
349 349 if notip and k == "tip":
350 350 continue
351 351 if limit > 0 and count >= limit:
352 352 continue
353 353 count = count + 1
354 354 yield {"parity": parity.next(),
355 355 "tag": k,
356 356 "date": web.repo[n].date(),
357 357 "node": hex(n)}
358 358
359 359 return tmpl("tags",
360 360 node=hex(web.repo.changelog.tip()),
361 361 entries=lambda **x: entries(False,0, **x),
362 362 entriesnotip=lambda **x: entries(True,0, **x),
363 363 latestentry=lambda **x: entries(True,1, **x))
364 364
365 365 def branches(web, req, tmpl):
366 366 b = web.repo.branchtags()
367 367 tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems())
368 368 heads = web.repo.heads()
369 369 parity = paritygen(web.stripecount)
370 370 sortkey = lambda ctx: ('close' not in ctx.extra(), ctx.rev())
371 371
372 372 def entries(limit, **map):
373 373 count = 0
374 374 for ctx in sorted(tips, key=sortkey, reverse=True):
375 375 if limit > 0 and count >= limit:
376 376 return
377 377 count += 1
378 378 if ctx.node() not in heads:
379 379 status = 'inactive'
380 380 elif not web.repo.branchheads(ctx.branch()):
381 381 status = 'closed'
382 382 else:
383 383 status = 'open'
384 384 yield {'parity': parity.next(),
385 385 'branch': ctx.branch(),
386 386 'status': status,
387 387 'node': ctx.hex(),
388 388 'date': ctx.date()}
389 389
390 390 return tmpl('branches', node=hex(web.repo.changelog.tip()),
391 391 entries=lambda **x: entries(0, **x),
392 392 latestentry=lambda **x: entries(1, **x))
393 393
394 394 def summary(web, req, tmpl):
395 395 i = web.repo.tagslist()
396 396 i.reverse()
397 397
398 398 def tagentries(**map):
399 399 parity = paritygen(web.stripecount)
400 400 count = 0
401 401 for k, n in i:
402 402 if k == "tip": # skip tip
403 403 continue
404 404
405 405 count += 1
406 406 if count > 10: # limit to 10 tags
407 407 break
408 408
409 409 yield tmpl("tagentry",
410 410 parity=parity.next(),
411 411 tag=k,
412 412 node=hex(n),
413 413 date=web.repo[n].date())
414 414
415 415 def branches(**map):
416 416 parity = paritygen(web.stripecount)
417 417
418 418 b = web.repo.branchtags()
419 419 l = [(-web.repo.changelog.rev(n), n, t) for t, n in b.iteritems()]
420 420 for r,n,t in sorted(l):
421 421 yield {'parity': parity.next(),
422 422 'branch': t,
423 423 'node': hex(n),
424 424 'date': web.repo[n].date()}
425 425
426 426 def changelist(**map):
427 427 parity = paritygen(web.stripecount, offset=start-end)
428 428 l = [] # build a list in forward order for efficiency
429 429 for i in xrange(start, end):
430 430 ctx = web.repo[i]
431 431 n = ctx.node()
432 432 hn = hex(n)
433 433
434 434 l.insert(0, tmpl(
435 435 'shortlogentry',
436 436 parity=parity.next(),
437 437 author=ctx.user(),
438 438 desc=ctx.description(),
439 439 date=ctx.date(),
440 440 rev=i,
441 441 node=hn,
442 442 tags=webutil.nodetagsdict(web.repo, n),
443 443 inbranch=webutil.nodeinbranch(web.repo, ctx),
444 444 branches=webutil.nodebranchdict(web.repo, ctx)))
445 445
446 446 yield l
447 447
448 448 cl = web.repo.changelog
449 449 count = len(cl)
450 450 start = max(0, count - web.maxchanges)
451 451 end = min(count, start + web.maxchanges)
452 452
453 453 return tmpl("summary",
454 454 desc=web.config("web", "description", "unknown"),
455 455 owner=get_contact(web.config) or "unknown",
456 456 lastchange=cl.read(cl.tip())[2],
457 457 tags=tagentries,
458 458 branches=branches,
459 459 shortlog=changelist,
460 460 node=hex(cl.tip()),
461 461 archives=web.archivelist("tip"))
462 462
463 463 def filediff(web, req, tmpl):
464 464 fctx, ctx = None, None
465 465 try:
466 466 fctx = webutil.filectx(web.repo, req)
467 467 except LookupError:
468 468 ctx = webutil.changectx(web.repo, req)
469 469 path = webutil.cleanpath(web.repo, req.form['file'][0])
470 470 if path not in ctx.files():
471 471 raise
472 472
473 473 if fctx is not None:
474 474 n = fctx.node()
475 475 path = fctx.path()
476 476 else:
477 477 n = ctx.node()
478 478 # path already defined in except clause
479 479
480 480 parity = paritygen(web.stripecount)
481 481 style = web.config('web', 'style', 'paper')
482 482 if 'style' in req.form:
483 483 style = req.form['style'][0]
484 484
485 485 diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity, style)
486 486 rename = fctx and webutil.renamelink(fctx) or []
487 487 ctx = fctx and fctx or ctx
488 488 return tmpl("filediff",
489 489 file=path,
490 490 node=hex(n),
491 491 rev=ctx.rev(),
492 492 date=ctx.date(),
493 493 desc=ctx.description(),
494 494 author=ctx.user(),
495 495 rename=rename,
496 496 branch=webutil.nodebranchnodefault(ctx),
497 497 parent=webutil.parents(ctx),
498 498 child=webutil.children(ctx),
499 499 diff=diffs)
500 500
501 501 diff = filediff
502 502
503 503 def annotate(web, req, tmpl):
504 504 fctx = webutil.filectx(web.repo, req)
505 505 f = fctx.path()
506 506 parity = paritygen(web.stripecount)
507 507
508 508 def annotate(**map):
509 509 last = None
510 510 if binary(fctx.data()):
511 511 mt = (mimetypes.guess_type(fctx.path())[0]
512 512 or 'application/octet-stream')
513 513 lines = enumerate([((fctx.filectx(fctx.filerev()), 1),
514 514 '(binary:%s)' % mt)])
515 515 else:
516 516 lines = enumerate(fctx.annotate(follow=True, linenumber=True))
517 517 for lineno, ((f, targetline), l) in lines:
518 518 fnode = f.filenode()
519 519
520 520 if last != fnode:
521 521 last = fnode
522 522
523 523 yield {"parity": parity.next(),
524 524 "node": hex(f.node()),
525 525 "rev": f.rev(),
526 526 "author": f.user(),
527 527 "desc": f.description(),
528 528 "file": f.path(),
529 529 "targetline": targetline,
530 530 "line": l,
531 531 "lineid": "l%d" % (lineno + 1),
532 532 "linenumber": "% 6d" % (lineno + 1)}
533 533
534 534 return tmpl("fileannotate",
535 535 file=f,
536 536 annotate=annotate,
537 537 path=webutil.up(f),
538 538 rev=fctx.rev(),
539 539 node=hex(fctx.node()),
540 540 author=fctx.user(),
541 541 date=fctx.date(),
542 542 desc=fctx.description(),
543 543 rename=webutil.renamelink(fctx),
544 544 branch=webutil.nodebranchnodefault(fctx),
545 545 parent=webutil.parents(fctx),
546 546 child=webutil.children(fctx),
547 547 permissions=fctx.manifest().flags(f))
548 548
549 549 def filelog(web, req, tmpl):
550 550
551 551 try:
552 552 fctx = webutil.filectx(web.repo, req)
553 553 f = fctx.path()
554 554 fl = fctx.filelog()
555 555 except error.LookupError:
556 556 f = webutil.cleanpath(web.repo, req.form['file'][0])
557 557 fl = web.repo.file(f)
558 558 numrevs = len(fl)
559 559 if not numrevs: # file doesn't exist at all
560 560 raise
561 561 rev = webutil.changectx(web.repo, req).rev()
562 562 first = fl.linkrev(0)
563 563 if rev < first: # current rev is from before file existed
564 564 raise
565 565 frev = numrevs - 1
566 566 while fl.linkrev(frev) > rev:
567 567 frev -= 1
568 568 fctx = web.repo.filectx(f, fl.linkrev(frev))
569 569
570 570 count = fctx.filerev() + 1
571 571 pagelen = web.maxshortchanges
572 572 start = max(0, fctx.filerev() - pagelen + 1) # first rev on this page
573 573 end = min(count, start + pagelen) # last rev on this page
574 574 parity = paritygen(web.stripecount, offset=start-end)
575 575
576 576 def entries(limit=0, **map):
577 577 l = []
578 578
579 579 repo = web.repo
580 580 for i in xrange(start, end):
581 581 iterfctx = fctx.filectx(i)
582 582
583 583 l.insert(0, {"parity": parity.next(),
584 584 "filerev": i,
585 585 "file": f,
586 586 "node": hex(iterfctx.node()),
587 587 "author": iterfctx.user(),
588 588 "date": iterfctx.date(),
589 589 "rename": webutil.renamelink(iterfctx),
590 590 "parent": webutil.parents(iterfctx),
591 591 "child": webutil.children(iterfctx),
592 592 "desc": iterfctx.description(),
593 593 "tags": webutil.nodetagsdict(repo, iterfctx.node()),
594 594 "branch": webutil.nodebranchnodefault(iterfctx),
595 595 "inbranch": webutil.nodeinbranch(repo, iterfctx),
596 596 "branches": webutil.nodebranchdict(repo, iterfctx)})
597 597
598 598 if limit > 0:
599 599 l = l[:limit]
600 600
601 601 for e in l:
602 602 yield e
603 603
604 604 nodefunc = lambda x: fctx.filectx(fileid=x)
605 605 nav = webutil.revnavgen(end - 1, pagelen, count, nodefunc)
606 606 return tmpl("filelog", file=f, node=hex(fctx.node()), nav=nav,
607 607 entries=lambda **x: entries(limit=0, **x),
608 608 latestentry=lambda **x: entries(limit=1, **x))
609 609
610 610
611 611 def archive(web, req, tmpl):
612 612 type_ = req.form.get('type', [None])[0]
613 613 allowed = web.configlist("web", "allow_archive")
614 614 key = req.form['node'][0]
615 615
616 616 if type_ not in web.archives:
617 617 msg = 'Unsupported archive type: %s' % type_
618 618 raise ErrorResponse(HTTP_NOT_FOUND, msg)
619 619
620 620 if not ((type_ in allowed or
621 621 web.configbool("web", "allow" + type_, False))):
622 622 msg = 'Archive type not allowed: %s' % type_
623 623 raise ErrorResponse(HTTP_FORBIDDEN, msg)
624 624
625 625 reponame = re.sub(r"\W+", "-", os.path.basename(web.reponame))
626 626 cnode = web.repo.lookup(key)
627 627 arch_version = key
628 628 if cnode == key or key == 'tip':
629 629 arch_version = short(cnode)
630 630 name = "%s-%s" % (reponame, arch_version)
631 631 mimetype, artype, extension, encoding = web.archive_specs[type_]
632 632 headers = [
633 633 ('Content-Type', mimetype),
634 634 ('Content-Disposition', 'attachment; filename=%s%s' % (name, extension))
635 635 ]
636 636 if encoding:
637 637 headers.append(('Content-Encoding', encoding))
638 638 req.header(headers)
639 639 req.respond(HTTP_OK)
640 640 archival.archive(web.repo, req, cnode, artype, prefix=name)
641 641 return []
642 642
643 643
644 644 def static(web, req, tmpl):
645 645 fname = req.form['file'][0]
646 646 # a repo owner may set web.static in .hg/hgrc to get any file
647 647 # readable by the user running the CGI script
648 648 static = web.config("web", "static", None, untrusted=False)
649 649 if not static:
650 650 tp = web.templatepath or templater.templatepath()
651 651 if isinstance(tp, str):
652 652 tp = [tp]
653 653 static = [os.path.join(p, 'static') for p in tp]
654 654 return [staticfile(static, fname, req)]
655 655
656 656 def graph(web, req, tmpl):
657
657 658 rev = webutil.changectx(web.repo, req).rev()
658 659 bg_height = 39
659
660 revcount = 25
660 revcount = web.maxshortchanges
661 661 if 'revcount' in req.form:
662 662 revcount = int(req.form.get('revcount', [revcount])[0])
663 663 tmpl.defaults['sessionvars']['revcount'] = revcount
664 664
665 665 lessvars = copy.copy(tmpl.defaults['sessionvars'])
666 666 lessvars['revcount'] = revcount / 2
667 667 morevars = copy.copy(tmpl.defaults['sessionvars'])
668 668 morevars['revcount'] = revcount * 2
669 669
670 670 max_rev = len(web.repo) - 1
671 671 revcount = min(max_rev, revcount)
672 672 revnode = web.repo.changelog.node(rev)
673 673 revnode_hex = hex(revnode)
674 674 uprev = min(max_rev, rev + revcount)
675 675 downrev = max(0, rev - revcount)
676 676 count = len(web.repo)
677 677 changenav = webutil.revnavgen(rev, revcount, count, web.repo.changectx)
678 678
679 679 dag = graphmod.revisions(web.repo, rev, downrev)
680 680 tree = list(graphmod.colored(dag))
681 681 canvasheight = (len(tree) + 1) * bg_height - 27;
682 682 data = []
683 683 for (id, type, ctx, vtx, edges) in tree:
684 684 if type != graphmod.CHANGESET:
685 685 continue
686 686 node = short(ctx.node())
687 687 age = templatefilters.age(ctx.date())
688 688 desc = templatefilters.firstline(ctx.description())
689 689 desc = cgi.escape(templatefilters.nonempty(desc))
690 690 user = cgi.escape(templatefilters.person(ctx.user()))
691 691 branch = ctx.branch()
692 692 branch = branch, web.repo.branchtags().get(branch) == ctx.node()
693 693 data.append((node, vtx, edges, desc, user, age, branch, ctx.tags()))
694 694
695 695 return tmpl('graph', rev=rev, revcount=revcount, uprev=uprev,
696 696 lessvars=lessvars, morevars=morevars, downrev=downrev,
697 697 canvasheight=canvasheight, jsdata=data, bg_height=bg_height,
698 698 node=revnode_hex, changenav=changenav)
@@ -1,906 +1,906
1 1 % Set up the repo
2 2 adding da/foo
3 3 adding foo
4 4 marked working directory as branch stable
5 5 % Logs and changes
6 6 200 Script output follows
7 7
8 8 <?xml version="1.0" encoding="ascii"?>
9 9 <feed xmlns="http://127.0.0.1/2005/Atom">
10 10 <!-- Changelog -->
11 11 <id>http://127.0.0.1/</id>
12 12 <link rel="self" href="http://127.0.0.1/atom-log"/>
13 13 <link rel="alternate" href="http://127.0.0.1/"/>
14 14 <title>test Changelog</title>
15 15 <updated>1970-01-01T00:00:00+00:00</updated>
16 16
17 17 <entry>
18 18 <title>branch</title>
19 19 <id>http://127.0.0.1/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id>
20 20 <link href="http://127.0.0.1/rev/1d22e65f027e"/>
21 21 <author>
22 22 <name>test</name>
23 23 <email>&#116;&#101;&#115;&#116;</email>
24 24 </author>
25 25 <updated>1970-01-01T00:00:00+00:00</updated>
26 26 <published>1970-01-01T00:00:00+00:00</published>
27 27 <content type="xhtml">
28 28 <div xmlns="http://127.0.0.1/1999/xhtml">
29 29 <pre xml:space="preserve">branch</pre>
30 30 </div>
31 31 </content>
32 32 </entry>
33 33 <entry>
34 34 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
35 35 <id>http://127.0.0.1/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id>
36 36 <link href="http://127.0.0.1/rev/a4f92ed23982"/>
37 37 <author>
38 38 <name>test</name>
39 39 <email>&#116;&#101;&#115;&#116;</email>
40 40 </author>
41 41 <updated>1970-01-01T00:00:00+00:00</updated>
42 42 <published>1970-01-01T00:00:00+00:00</published>
43 43 <content type="xhtml">
44 44 <div xmlns="http://127.0.0.1/1999/xhtml">
45 45 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
46 46 </div>
47 47 </content>
48 48 </entry>
49 49 <entry>
50 50 <title>base</title>
51 51 <id>http://127.0.0.1/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id>
52 52 <link href="http://127.0.0.1/rev/2ef0ac749a14"/>
53 53 <author>
54 54 <name>test</name>
55 55 <email>&#116;&#101;&#115;&#116;</email>
56 56 </author>
57 57 <updated>1970-01-01T00:00:00+00:00</updated>
58 58 <published>1970-01-01T00:00:00+00:00</published>
59 59 <content type="xhtml">
60 60 <div xmlns="http://127.0.0.1/1999/xhtml">
61 61 <pre xml:space="preserve">base</pre>
62 62 </div>
63 63 </content>
64 64 </entry>
65 65
66 66 </feed>
67 67 200 Script output follows
68 68
69 69 <?xml version="1.0" encoding="ascii"?>
70 70 <feed xmlns="http://127.0.0.1/2005/Atom">
71 71 <!-- Changelog -->
72 72 <id>http://127.0.0.1/</id>
73 73 <link rel="self" href="http://127.0.0.1/atom-log"/>
74 74 <link rel="alternate" href="http://127.0.0.1/"/>
75 75 <title>test Changelog</title>
76 76 <updated>1970-01-01T00:00:00+00:00</updated>
77 77
78 78 <entry>
79 79 <title>branch</title>
80 80 <id>http://127.0.0.1/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id>
81 81 <link href="http://127.0.0.1/rev/1d22e65f027e"/>
82 82 <author>
83 83 <name>test</name>
84 84 <email>&#116;&#101;&#115;&#116;</email>
85 85 </author>
86 86 <updated>1970-01-01T00:00:00+00:00</updated>
87 87 <published>1970-01-01T00:00:00+00:00</published>
88 88 <content type="xhtml">
89 89 <div xmlns="http://127.0.0.1/1999/xhtml">
90 90 <pre xml:space="preserve">branch</pre>
91 91 </div>
92 92 </content>
93 93 </entry>
94 94 <entry>
95 95 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
96 96 <id>http://127.0.0.1/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id>
97 97 <link href="http://127.0.0.1/rev/a4f92ed23982"/>
98 98 <author>
99 99 <name>test</name>
100 100 <email>&#116;&#101;&#115;&#116;</email>
101 101 </author>
102 102 <updated>1970-01-01T00:00:00+00:00</updated>
103 103 <published>1970-01-01T00:00:00+00:00</published>
104 104 <content type="xhtml">
105 105 <div xmlns="http://127.0.0.1/1999/xhtml">
106 106 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
107 107 </div>
108 108 </content>
109 109 </entry>
110 110 <entry>
111 111 <title>base</title>
112 112 <id>http://127.0.0.1/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id>
113 113 <link href="http://127.0.0.1/rev/2ef0ac749a14"/>
114 114 <author>
115 115 <name>test</name>
116 116 <email>&#116;&#101;&#115;&#116;</email>
117 117 </author>
118 118 <updated>1970-01-01T00:00:00+00:00</updated>
119 119 <published>1970-01-01T00:00:00+00:00</published>
120 120 <content type="xhtml">
121 121 <div xmlns="http://127.0.0.1/1999/xhtml">
122 122 <pre xml:space="preserve">base</pre>
123 123 </div>
124 124 </content>
125 125 </entry>
126 126
127 127 </feed>
128 128 200 Script output follows
129 129
130 130 <?xml version="1.0" encoding="ascii"?>
131 131 <feed xmlns="http://127.0.0.1/2005/Atom">
132 132 <id>http://127.0.0.1/atom-log/tip/foo</id>
133 133 <link rel="self" href="http://127.0.0.1/atom-log/tip/foo"/>
134 134 <title>test: foo history</title>
135 135 <updated>1970-01-01T00:00:00+00:00</updated>
136 136
137 137 <entry>
138 138 <title>base</title>
139 139 <id>http://127.0.0.1/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id>
140 140 <link href="http://127.0.0.1/rev/2ef0ac749a14"/>
141 141 <author>
142 142 <name>test</name>
143 143 <email>&#116;&#101;&#115;&#116;</email>
144 144 </author>
145 145 <updated>1970-01-01T00:00:00+00:00</updated>
146 146 <published>1970-01-01T00:00:00+00:00</published>
147 147 <content type="xhtml">
148 148 <div xmlns="http://127.0.0.1/1999/xhtml">
149 149 <pre xml:space="preserve">base</pre>
150 150 </div>
151 151 </content>
152 152 </entry>
153 153
154 154 </feed>
155 155 200 Script output follows
156 156
157 157 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
158 158 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
159 159 <head>
160 160 <link rel="icon" href="/static/hgicon.png" type="image/png" />
161 161 <meta name="robots" content="index, nofollow" />
162 162 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
163 163
164 164 <title>test: log</title>
165 165 <link rel="alternate" type="application/atom+xml"
166 166 href="/atom-log" title="Atom feed for test" />
167 167 <link rel="alternate" type="application/rss+xml"
168 168 href="/rss-log" title="RSS feed for test" />
169 169 </head>
170 170 <body>
171 171
172 172 <div class="container">
173 173 <div class="menu">
174 174 <div class="logo">
175 175 <a href="http://mercurial.selenic.com/">
176 176 <img src="/static/hglogo.png" alt="mercurial" /></a>
177 177 </div>
178 178 <ul>
179 179 <li class="active">log</li>
180 180 <li><a href="/graph/1d22e65f027e">graph</a></li>
181 181 <li><a href="/tags">tags</a></li>
182 182 <li><a href="/branches">branches</a></li>
183 183 </ul>
184 184 <ul>
185 185 <li><a href="/rev/1d22e65f027e">changeset</a></li>
186 186 <li><a href="/file/1d22e65f027e">browse</a></li>
187 187 </ul>
188 188 <ul>
189 189
190 190 </ul>
191 191 </div>
192 192
193 193 <div class="main">
194 194 <h2><a href="/">test</a></h2>
195 195 <h3>log</h3>
196 196
197 197 <form class="search" action="/log">
198 198
199 199 <p><input name="rev" id="search1" type="text" size="30" /></p>
200 200 <div id="hint">find changesets by author, revision,
201 201 files, or words in the commit message</div>
202 202 </form>
203 203
204 204 <div class="navigate">rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> </div>
205 205
206 206 <table class="bigtable">
207 207 <tr>
208 208 <th class="age">age</th>
209 209 <th class="author">author</th>
210 210 <th class="description">description</th>
211 211 </tr>
212 212 <tr class="parity0">
213 213 <td class="age">1970-01-01</td>
214 214 <td class="author">test</td>
215 215 <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> </td>
216 216 </tr>
217 217 <tr class="parity1">
218 218 <td class="age">1970-01-01</td>
219 219 <td class="author">test</td>
220 220 <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
221 221 </tr>
222 222 <tr class="parity0">
223 223 <td class="age">1970-01-01</td>
224 224 <td class="author">test</td>
225 225 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> </td>
226 226 </tr>
227 227
228 228 </table>
229 229
230 230 <div class="navigate">rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> </div>
231 231 </div>
232 232 </div>
233 233
234 234
235 235
236 236 </body>
237 237 </html>
238 238
239 239 200 Script output follows
240 240
241 241 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
242 242 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
243 243 <head>
244 244 <link rel="icon" href="/static/hgicon.png" type="image/png" />
245 245 <meta name="robots" content="index, nofollow" />
246 246 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
247 247
248 248 <title>test: 2ef0ac749a14</title>
249 249 </head>
250 250 <body>
251 251 <div class="container">
252 252 <div class="menu">
253 253 <div class="logo">
254 254 <a href="http://mercurial.selenic.com/">
255 255 <img src="/static/hglogo.png" alt="mercurial" /></a>
256 256 </div>
257 257 <ul>
258 258 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
259 259 <li><a href="/graph/2ef0ac749a14">graph</a></li>
260 260 <li><a href="/tags">tags</a></li>
261 261 <li><a href="/branches">branches</a></li>
262 262 </ul>
263 263 <ul>
264 264 <li class="active">changeset</li>
265 265 <li><a href="/raw-rev/2ef0ac749a14">raw</a></li>
266 266 <li><a href="/file/2ef0ac749a14">browse</a></li>
267 267 </ul>
268 268 <ul>
269 269
270 270 </ul>
271 271 </div>
272 272
273 273 <div class="main">
274 274
275 275 <h2><a href="/">test</a></h2>
276 276 <h3>changeset 0:2ef0ac749a14 <span class="tag">1.0</span> </h3>
277 277
278 278 <form class="search" action="/log">
279 279
280 280 <p><input name="rev" id="search1" type="text" size="30" /></p>
281 281 <div id="hint">find changesets by author, revision,
282 282 files, or words in the commit message</div>
283 283 </form>
284 284
285 285 <div class="description">base</div>
286 286
287 287 <table id="changesetEntry">
288 288 <tr>
289 289 <th class="author">author</th>
290 290 <td class="author">&#116;&#101;&#115;&#116;</td>
291 291 </tr>
292 292 <tr>
293 293 <th class="date">date</th>
294 294 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td></tr>
295 295 <tr>
296 296 <th class="author">parents</th>
297 297 <td class="author"></td>
298 298 </tr>
299 299 <tr>
300 300 <th class="author">children</th>
301 301 <td class="author"> <a href="/rev/a4f92ed23982">a4f92ed23982</a></td>
302 302 </tr>
303 303 <tr>
304 304 <th class="files">files</th>
305 305 <td class="files"><a href="/file/2ef0ac749a14/da/foo">da/foo</a> <a href="/file/2ef0ac749a14/foo">foo</a> </td>
306 306 </tr>
307 307 </table>
308 308
309 309 <div class="overflow">
310 310 <div class="sourcefirst"> line diff</div>
311 311
312 312 <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
313 313 </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
314 314 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
315 315 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+foo
316 316 </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
317 317 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/foo Thu Jan 01 00:00:00 1970 +0000
318 318 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
319 319 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+foo
320 320 </span></pre></div>
321 321 </div>
322 322
323 323 </div>
324 324 </div>
325 325
326 326
327 327 </body>
328 328 </html>
329 329
330 330 200 Script output follows
331 331
332 332
333 333 # HG changeset patch
334 334 # User test
335 335 # Date 0 0
336 336 # Node ID a4f92ed23982be056b9852de5dfe873eaac7f0de
337 337 # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
338 338 Added tag 1.0 for changeset 2ef0ac749a14
339 339
340 340 diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags
341 341 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
342 342 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
343 343 @@ -0,0 +1,1 @@
344 344 +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
345 345
346 346 % File-related
347 347 200 Script output follows
348 348
349 349 foo
350 350 200 Script output follows
351 351
352 352
353 353 test@0: foo
354 354
355 355
356 356
357 357
358 358 200 Script output follows
359 359
360 360
361 361 drwxr-xr-x da
362 362 -rw-r--r-- 45 .hgtags
363 363 -rw-r--r-- 4 foo
364 364
365 365
366 366 200 Script output follows
367 367
368 368 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
369 369 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
370 370 <head>
371 371 <link rel="icon" href="/static/hgicon.png" type="image/png" />
372 372 <meta name="robots" content="index, nofollow" />
373 373 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
374 374
375 375 <title>test: a4f92ed23982 foo</title>
376 376 </head>
377 377 <body>
378 378
379 379 <div class="container">
380 380 <div class="menu">
381 381 <div class="logo">
382 382 <a href="http://mercurial.selenic.com/">
383 383 <img src="/static/hglogo.png" alt="mercurial" /></a>
384 384 </div>
385 385 <ul>
386 386 <li><a href="/shortlog/a4f92ed23982">log</a></li>
387 387 <li><a href="/graph/a4f92ed23982">graph</a></li>
388 388 <li><a href="/tags">tags</a></li>
389 389 <li><a href="/branches">branches</a></li>
390 390 </ul>
391 391 <ul>
392 392 <li><a href="/rev/a4f92ed23982">changeset</a></li>
393 393 <li><a href="/file/a4f92ed23982/">browse</a></li>
394 394 </ul>
395 395 <ul>
396 396 <li class="active">file</li>
397 397 <li><a href="/file/tip/foo">latest</a></li>
398 398 <li><a href="/diff/a4f92ed23982/foo">diff</a></li>
399 399 <li><a href="/annotate/a4f92ed23982/foo">annotate</a></li>
400 400 <li><a href="/log/a4f92ed23982/foo">file log</a></li>
401 401 <li><a href="/raw-file/a4f92ed23982/foo">raw</a></li>
402 402 </ul>
403 403 </div>
404 404
405 405 <div class="main">
406 406 <h2><a href="/">test</a></h2>
407 407 <h3>view foo @ 1:a4f92ed23982</h3>
408 408
409 409 <form class="search" action="/log">
410 410
411 411 <p><input name="rev" id="search1" type="text" size="30" /></p>
412 412 <div id="hint">find changesets by author, revision,
413 413 files, or words in the commit message</div>
414 414 </form>
415 415
416 416 <div class="description">Added tag 1.0 for changeset 2ef0ac749a14</div>
417 417
418 418 <table id="changesetEntry">
419 419 <tr>
420 420 <th class="author">author</th>
421 421 <td class="author">&#116;&#101;&#115;&#116;</td>
422 422 </tr>
423 423 <tr>
424 424 <th class="date">date</th>
425 425 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
426 426 </tr>
427 427 <tr>
428 428 <th class="author">parents</th>
429 429 <td class="author"></td>
430 430 </tr>
431 431 <tr>
432 432 <th class="author">children</th>
433 433 <td class="author"><a href="/file/1d22e65f027e/foo">1d22e65f027e</a> </td>
434 434 </tr>
435 435
436 436 </table>
437 437
438 438 <div class="overflow">
439 439 <div class="sourcefirst"> line source</div>
440 440
441 441 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> foo
442 442 </div>
443 443 <div class="sourcelast"></div>
444 444 </div>
445 445 </div>
446 446 </div>
447 447
448 448
449 449
450 450 </body>
451 451 </html>
452 452
453 453 200 Script output follows
454 454
455 455
456 456 diff -r 000000000000 -r a4f92ed23982 foo
457 457 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
458 458 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
459 459 @@ -0,0 +1,1 @@
460 460 +foo
461 461
462 462
463 463
464 464
465 465 % Overviews
466 466 200 Script output follows
467 467
468 468 tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
469 469 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
470 470 200 Script output follows
471 471
472 472 stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open
473 473 default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive
474 474 200 Script output follows
475 475
476 476 <?xml version="1.0" encoding="ascii"?>
477 477 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
478 478 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
479 479 <head>
480 480 <link rel="icon" href="/static/hgicon.png" type="image/png" />
481 481 <meta name="robots" content="index, nofollow"/>
482 482 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
483 483
484 484
485 485 <title>test: Summary</title>
486 486 <link rel="alternate" type="application/atom+xml"
487 487 href="/atom-log" title="Atom feed for test"/>
488 488 <link rel="alternate" type="application/rss+xml"
489 489 href="/rss-log" title="RSS feed for test"/>
490 490 </head>
491 491 <body>
492 492
493 493 <div class="page_header">
494 494 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / summary
495 495
496 496 <form action="/log">
497 497 <input type="hidden" name="style" value="gitweb" />
498 498 <div class="search">
499 499 <input type="text" name="rev" />
500 500 </div>
501 501 </form>
502 502 </div>
503 503
504 504 <div class="page_nav">
505 505 summary |
506 506 <a href="/shortlog?style=gitweb">shortlog</a> |
507 507 <a href="/log?style=gitweb">changelog</a> |
508 508 <a href="/graph?style=gitweb">graph</a> |
509 509 <a href="/tags?style=gitweb">tags</a> |
510 510 <a href="/branches?style=gitweb">branches</a> |
511 511 <a href="/file/1d22e65f027e?style=gitweb">files</a>
512 512 <br/>
513 513 </div>
514 514
515 515 <div class="title">&nbsp;</div>
516 516 <table cellspacing="0">
517 517 <tr><td>description</td><td>unknown</td></tr>
518 518 <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>
519 519 <tr><td>last change</td><td>Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
520 520 </table>
521 521
522 522 <div><a class="title" href="/shortlog?style=gitweb">changes</a></div>
523 523 <table cellspacing="0">
524 524
525 525 <tr class="parity0">
526 526 <td class="age"><i>1970-01-01</i></td>
527 527 <td><i>test</i></td>
528 528 <td>
529 529 <a class="list" href="/rev/1d22e65f027e?style=gitweb">
530 530 <b>branch</b>
531 531 <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> </span>
532 532 </a>
533 533 </td>
534 534 <td class="link" nowrap>
535 535 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
536 536 <a href="/file/1d22e65f027e?style=gitweb">files</a>
537 537 </td>
538 538 </tr>
539 539 <tr class="parity1">
540 540 <td class="age"><i>1970-01-01</i></td>
541 541 <td><i>test</i></td>
542 542 <td>
543 543 <a class="list" href="/rev/a4f92ed23982?style=gitweb">
544 544 <b>Added tag 1.0 for changeset 2ef0ac749a14</b>
545 545 <span class="logtags"><span class="branchtag" title="default">default</span> </span>
546 546 </a>
547 547 </td>
548 548 <td class="link" nowrap>
549 549 <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> |
550 550 <a href="/file/a4f92ed23982?style=gitweb">files</a>
551 551 </td>
552 552 </tr>
553 553 <tr class="parity0">
554 554 <td class="age"><i>1970-01-01</i></td>
555 555 <td><i>test</i></td>
556 556 <td>
557 557 <a class="list" href="/rev/2ef0ac749a14?style=gitweb">
558 558 <b>base</b>
559 559 <span class="logtags"><span class="tagtag" title="1.0">1.0</span> </span>
560 560 </a>
561 561 </td>
562 562 <td class="link" nowrap>
563 563 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
564 564 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
565 565 </td>
566 566 </tr>
567 567 <tr class="light"><td colspan="4"><a class="list" href="/shortlog?style=gitweb">...</a></td></tr>
568 568 </table>
569 569
570 570 <div><a class="title" href="/tags?style=gitweb">tags</a></div>
571 571 <table cellspacing="0">
572 572
573 573 <tr class="parity0">
574 574 <td class="age"><i>1970-01-01</i></td>
575 575 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td>
576 576 <td class="link">
577 577 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
578 578 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
579 579 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
580 580 </td>
581 581 </tr>
582 582 <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
583 583 </table>
584 584
585 585 <div><a class="title" href="#">branches</a></div>
586 586 <table cellspacing="0">
587 587
588 588 <tr class="parity0">
589 589 <td class="age"><i>1970-01-01</i></td>
590 590 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
591 591 <td class="">stable</td>
592 592 <td class="link">
593 593 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
594 594 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
595 595 <a href="/file/1d22e65f027e?style=gitweb">files</a>
596 596 </td>
597 597 </tr>
598 598 <tr class="parity1">
599 599 <td class="age"><i>1970-01-01</i></td>
600 600 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
601 601 <td class="">default</td>
602 602 <td class="link">
603 603 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
604 604 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
605 605 <a href="/file/a4f92ed23982?style=gitweb">files</a>
606 606 </td>
607 607 </tr>
608 608 <tr class="light">
609 609 <td colspan="4"><a class="list" href="#">...</a></td>
610 610 </tr>
611 611 </table>
612 612 <div class="page_footer">
613 613 <div class="page_footer_text">test</div>
614 614 <div class="rss_logo">
615 615 <a href="/rss-log">RSS</a>
616 616 <a href="/atom-log">Atom</a>
617 617 </div>
618 618 <br />
619 619
620 620 </div>
621 621 </body>
622 622 </html>
623 623
624 624 200 Script output follows
625 625
626 626 <?xml version="1.0" encoding="ascii"?>
627 627 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
628 628 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
629 629 <head>
630 630 <link rel="icon" href="/static/hgicon.png" type="image/png" />
631 631 <meta name="robots" content="index, nofollow"/>
632 632 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
633 633
634 634
635 635 <title>test: Graph</title>
636 636 <link rel="alternate" type="application/atom+xml"
637 637 href="/atom-log" title="Atom feed for test"/>
638 638 <link rel="alternate" type="application/rss+xml"
639 639 href="/rss-log" title="RSS feed for test"/>
640 640 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
641 641 </head>
642 642 <body>
643 643
644 644 <div class="page_header">
645 645 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / graph
646 646 </div>
647 647
648 648 <form action="/log">
649 649 <input type="hidden" name="style" value="gitweb" />
650 650 <div class="search">
651 651 <input type="text" name="rev" />
652 652 </div>
653 653 </form>
654 654 <div class="page_nav">
655 655 <a href="/summary?style=gitweb">summary</a> |
656 656 <a href="/shortlog?style=gitweb">shortlog</a> |
657 657 <a href="/log/2?style=gitweb">changelog</a> |
658 658 graph |
659 659 <a href="/tags?style=gitweb">tags</a> |
660 660 <a href="/branches?style=gitweb">branches</a> |
661 661 <a href="/file/1d22e65f027e?style=gitweb">files</a>
662 662 <br/>
663 <a href="/graph/2?style=gitweb&revcount=12">less</a>
664 <a href="/graph/2?style=gitweb&revcount=50">more</a>
663 <a href="/graph/2?style=gitweb&revcount=30">less</a>
664 <a href="/graph/2?style=gitweb&revcount=120">more</a>
665 665 | <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/>
666 666 </div>
667 667
668 668 <div class="title">&nbsp;</div>
669 669
670 670 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
671 671
672 672 <div id="wrapper">
673 673 <ul id="nodebgs"></ul>
674 674 <canvas id="graph" width="224" height="129"></canvas>
675 675 <ul id="graphnodes"></ul>
676 676 </div>
677 677
678 678 <script type="text/javascript" src="/static/graph.js"></script>
679 679 <script>
680 680 <!-- hide script content
681 681
682 682 var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"]], ["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"]]];
683 683 var graph = new Graph();
684 684 graph.scale(39);
685 685
686 686 graph.edge = function(x0, y0, x1, y1, color) {
687 687
688 688 this.setColor(color, 0.0, 0.65);
689 689 this.ctx.beginPath();
690 690 this.ctx.moveTo(x0, y0);
691 691 this.ctx.lineTo(x1, y1);
692 692 this.ctx.stroke();
693 693
694 694 }
695 695
696 696 var revlink = '<li style="_STYLE"><span class="desc">';
697 697 revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>';
698 698 revlink += '</span> _TAGS';
699 699 revlink += '<span class="info">_DATE ago, by _USER</span></li>';
700 700
701 701 graph.vertex = function(x, y, color, parity, cur) {
702 702
703 703 this.ctx.beginPath();
704 704 color = this.setColor(color, 0.25, 0.75);
705 705 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
706 706 this.ctx.fill();
707 707
708 708 var bg = '<li class="bg parity' + parity + '"></li>';
709 709 var left = (this.columns + 1) * this.bg_height;
710 710 var nstyle = 'padding-left: ' + left + 'px;';
711 711 var item = revlink.replace(/_STYLE/, nstyle);
712 712 item = item.replace(/_PARITY/, 'parity' + parity);
713 713 item = item.replace(/_NODEID/, cur[0]);
714 714 item = item.replace(/_NODEID/, cur[0]);
715 715 item = item.replace(/_DESC/, cur[3]);
716 716 item = item.replace(/_USER/, cur[4]);
717 717 item = item.replace(/_DATE/, cur[5]);
718 718
719 719 var tagspan = '';
720 720 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
721 721 tagspan = '<span class="logtags">';
722 722 if (cur[6][1]) {
723 723 tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
724 724 tagspan += cur[6][0] + '</span> ';
725 725 } else if (!cur[6][1] && cur[6][0] != 'default') {
726 726 tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
727 727 tagspan += cur[6][0] + '</span> ';
728 728 }
729 729 if (cur[7].length) {
730 730 for (var t in cur[7]) {
731 731 var tag = cur[7][t];
732 732 tagspan += '<span class="tagtag">' + tag + '</span> ';
733 733 }
734 734 }
735 735 tagspan += '</span>';
736 736 }
737 737
738 738 item = item.replace(/_TAGS/, tagspan);
739 739 return [bg, item];
740 740
741 741 }
742 742
743 743 graph.render(data);
744 744
745 745 // stop hiding script -->
746 746 </script>
747 747
748 748 <div class="page_nav">
749 <a href="/graph/2?style=gitweb&revcount=12">less</a>
750 <a href="/graph/2?style=gitweb&revcount=50">more</a>
749 <a href="/graph/2?style=gitweb&revcount=30">less</a>
750 <a href="/graph/2?style=gitweb&revcount=120">more</a>
751 751 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a>
752 752 </div>
753 753
754 754 <div class="page_footer">
755 755 <div class="page_footer_text">test</div>
756 756 <div class="rss_logo">
757 757 <a href="/rss-log">RSS</a>
758 758 <a href="/atom-log">Atom</a>
759 759 </div>
760 760 <br />
761 761
762 762 </div>
763 763 </body>
764 764 </html>
765 765
766 766 % capabilities
767 767 200 Script output follows
768 768
769 769 lookup changegroupsubset branchmap unbundle=HG10GZ,HG10BZ,HG10UN% heads
770 770 200 Script output follows
771 771
772 772 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
773 773 % lookup
774 774 200 Script output follows
775 775
776 776 0 'key'
777 777 % branches
778 778 200 Script output follows
779 779
780 780 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe 2ef0ac749a14e4f57a5a822464a0902c6f7f448f 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
781 781 % changegroup
782 782 200 Script output follows
783 783
784 784 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
785 785 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~\
786 786 \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\t\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
787 787 \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3\'\x859
788 788 \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\t_\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
789 789 % stream_out
790 790 200 Script output follows
791 791
792 792 1
793 793 % failing unbundle, requires POST request
794 794 405 push requires POST request
795 795
796 796 0
797 797 push requires POST request
798 798 % Static files
799 799 200 Script output follows
800 800
801 801 a { text-decoration:none; }
802 802 .age { white-space:nowrap; }
803 803 .date { white-space:nowrap; }
804 804 .indexlinks { white-space:nowrap; }
805 805 .parity0 { background-color: #ddd; }
806 806 .parity1 { background-color: #eee; }
807 807 .lineno { width: 60px; color: #aaa; font-size: smaller;
808 808 text-align: right; }
809 809 .plusline { color: green; }
810 810 .minusline { color: red; }
811 811 .atline { color: purple; }
812 812 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
813 813 .buttons a {
814 814 background-color: #666;
815 815 padding: 2pt;
816 816 color: white;
817 817 font-family: sans;
818 818 font-weight: bold;
819 819 }
820 820 .navigate a {
821 821 background-color: #ccc;
822 822 padding: 2pt;
823 823 font-family: sans;
824 824 color: black;
825 825 }
826 826
827 827 .metatag {
828 828 background-color: #888;
829 829 color: white;
830 830 text-align: right;
831 831 }
832 832
833 833 /* Common */
834 834 pre { margin: 0; }
835 835
836 836 .logo {
837 837 float: right;
838 838 clear: right;
839 839 }
840 840
841 841 /* Changelog/Filelog entries */
842 842 .logEntry { width: 100%; }
843 843 .logEntry .age { width: 15%; }
844 844 .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
845 845 .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
846 846 .logEntry th.firstline { text-align: left; width: inherit; }
847 847
848 848 /* Shortlog entries */
849 849 .slogEntry { width: 100%; }
850 850 .slogEntry .age { width: 8em; }
851 851 .slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
852 852 .slogEntry td.author { width: 15em; }
853 853
854 854 /* Tag entries */
855 855 #tagEntries { list-style: none; margin: 0; padding: 0; }
856 856 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
857 857
858 858 /* Changeset entry */
859 859 #changesetEntry { }
860 860 #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
861 861 #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
862 862
863 863 /* File diff view */
864 864 #filediffEntry { }
865 865 #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
866 866
867 867 /* Graph */
868 868 div#wrapper {
869 869 position: relative;
870 870 margin: 0;
871 871 padding: 0;
872 872 }
873 873
874 874 canvas {
875 875 position: absolute;
876 876 z-index: 5;
877 877 top: -0.6em;
878 878 margin: 0;
879 879 }
880 880
881 881 ul#nodebgs {
882 882 list-style: none inside none;
883 883 padding: 0;
884 884 margin: 0;
885 885 top: -0.7em;
886 886 }
887 887
888 888 ul#graphnodes li, ul#nodebgs li {
889 889 height: 39px;
890 890 }
891 891
892 892 ul#graphnodes {
893 893 position: absolute;
894 894 z-index: 10;
895 895 top: -0.85em;
896 896 list-style: none inside none;
897 897 padding: 0;
898 898 }
899 899
900 900 ul#graphnodes li .info {
901 901 display: block;
902 902 font-size: 70%;
903 903 position: relative;
904 904 top: -1px;
905 905 }
906 906 % ERRORS ENCOUNTERED
@@ -1,348 +1,348
1 1 200 Script output follows
2 2
3 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
5 5 <head>
6 6 <link rel="icon" href="/static/hgicon.png" type="image/png" />
7 7 <meta name="robots" content="index, nofollow" />
8 8 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
9 9
10 10 <title>test: log</title>
11 11 <link rel="alternate" type="application/atom+xml"
12 12 href="/atom-log" title="Atom feed for test" />
13 13 <link rel="alternate" type="application/rss+xml"
14 14 href="/rss-log" title="RSS feed for test" />
15 15 </head>
16 16 <body>
17 17
18 18 <div class="container">
19 19 <div class="menu">
20 20 <div class="logo">
21 21 <a href="http://mercurial.selenic.com/">
22 22 <img src="/static/hglogo.png" alt="mercurial" /></a>
23 23 </div>
24 24 <ul>
25 25 <li class="active">log</li>
26 26 <li><a href="/graph/000000000000">graph</a></li>
27 27 <li><a href="/tags">tags</a></li>
28 28 <li><a href="/branches">branches</a></li>
29 29 </ul>
30 30 <ul>
31 31 <li><a href="/rev/000000000000">changeset</a></li>
32 32 <li><a href="/file/000000000000">browse</a></li>
33 33 </ul>
34 34 <ul>
35 35
36 36 </ul>
37 37 </div>
38 38
39 39 <div class="main">
40 40 <h2><a href="/">test</a></h2>
41 41 <h3>log</h3>
42 42
43 43 <form class="search" action="/log">
44 44
45 45 <p><input name="rev" id="search1" type="text" size="30" /></p>
46 46 <div id="hint">find changesets by author, revision,
47 47 files, or words in the commit message</div>
48 48 </form>
49 49
50 50 <div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
51 51
52 52 <table class="bigtable">
53 53 <tr>
54 54 <th class="age">age</th>
55 55 <th class="author">author</th>
56 56 <th class="description">description</th>
57 57 </tr>
58 58
59 59 </table>
60 60
61 61 <div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
62 62 </div>
63 63 </div>
64 64
65 65
66 66
67 67 </body>
68 68 </html>
69 69
70 70 200 Script output follows
71 71
72 72 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
73 73 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
74 74 <head>
75 75 <link rel="icon" href="/static/hgicon.png" type="image/png" />
76 76 <meta name="robots" content="index, nofollow" />
77 77 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
78 78
79 79 <title>test: log</title>
80 80 <link rel="alternate" type="application/atom+xml"
81 81 href="/atom-log" title="Atom feed for test" />
82 82 <link rel="alternate" type="application/rss+xml"
83 83 href="/rss-log" title="RSS feed for test" />
84 84 </head>
85 85 <body>
86 86
87 87 <div class="container">
88 88 <div class="menu">
89 89 <div class="logo">
90 90 <a href="http://mercurial.selenic.com/">
91 91 <img src="/static/hglogo.png" alt="mercurial" /></a>
92 92 </div>
93 93 <ul>
94 94 <li class="active">log</li>
95 95 <li><a href="/graph/000000000000">graph</a></li>
96 96 <li><a href="/tags">tags</a></li>
97 97 <li><a href="/branches">branches</a></li>
98 98 </ul>
99 99 <ul>
100 100 <li><a href="/rev/000000000000">changeset</a></li>
101 101 <li><a href="/file/000000000000">browse</a></li>
102 102 </ul>
103 103 <ul>
104 104
105 105 </ul>
106 106 </div>
107 107
108 108 <div class="main">
109 109 <h2><a href="/">test</a></h2>
110 110 <h3>log</h3>
111 111
112 112 <form class="search" action="/log">
113 113
114 114 <p><input name="rev" id="search1" type="text" size="30" /></p>
115 115 <div id="hint">find changesets by author, revision,
116 116 files, or words in the commit message</div>
117 117 </form>
118 118
119 119 <div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
120 120
121 121 <table class="bigtable">
122 122 <tr>
123 123 <th class="age">age</th>
124 124 <th class="author">author</th>
125 125 <th class="description">description</th>
126 126 </tr>
127 127
128 128 </table>
129 129
130 130 <div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
131 131 </div>
132 132 </div>
133 133
134 134
135 135
136 136 </body>
137 137 </html>
138 138
139 139 200 Script output follows
140 140
141 141 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
142 142 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
143 143 <head>
144 144 <link rel="icon" href="/static/hgicon.png" type="image/png" />
145 145 <meta name="robots" content="index, nofollow" />
146 146 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
147 147
148 148 <title>test: revision graph</title>
149 149 <link rel="alternate" type="application/atom+xml"
150 150 href="/atom-log" title="Atom feed for test: log" />
151 151 <link rel="alternate" type="application/rss+xml"
152 152 href="/rss-log" title="RSS feed for test: log" />
153 153 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
154 154 </head>
155 155 <body>
156 156
157 157 <div class="container">
158 158 <div class="menu">
159 159 <div class="logo">
160 160 <a href="http://mercurial.selenic.com/">
161 161 <img src="/static/hglogo.png" alt="mercurial" /></a>
162 162 </div>
163 163 <ul>
164 164 <li><a href="/shortlog/000000000000">log</a></li>
165 165 <li class="active">graph</li>
166 166 <li><a href="/tags">tags</a></li>
167 167 <li><a href="/branches">branches</a></li>
168 168 </ul>
169 169 <ul>
170 170 <li><a href="/rev/000000000000">changeset</a></li>
171 171 <li><a href="/file/000000000000">browse</a></li>
172 172 </ul>
173 173 </div>
174 174
175 175 <div class="main">
176 176 <h2><a href="/">test</a></h2>
177 177 <h3>graph</h3>
178 178
179 179 <form class="search" action="/log">
180 180
181 181 <p><input name="rev" id="search1" type="text" size="30" /></p>
182 182 <div id="hint">find changesets by author, revision,
183 183 files, or words in the commit message</div>
184 184 </form>
185 185
186 186 <div class="navigate">
187 <a href="/graph/-1?revcount=12">less</a>
188 <a href="/graph/-1?revcount=50">more</a>
187 <a href="/graph/-1?revcount=30">less</a>
188 <a href="/graph/-1?revcount=120">more</a>
189 189 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
190 190 </div>
191 191
192 192 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
193 193
194 194 <div id="wrapper">
195 195 <ul id="nodebgs"></ul>
196 196 <canvas id="graph" width="224" height="12"></canvas>
197 197 <ul id="graphnodes"></ul>
198 198 </div>
199 199
200 200 <script type="text/javascript" src="/static/graph.js"></script>
201 201 <script type="text/javascript">
202 202 <!-- hide script content
203 203
204 204 var data = [];
205 205 var graph = new Graph();
206 206 graph.scale(39);
207 207
208 208 graph.edge = function(x0, y0, x1, y1, color) {
209 209
210 210 this.setColor(color, 0.0, 0.65);
211 211 this.ctx.beginPath();
212 212 this.ctx.moveTo(x0, y0);
213 213 this.ctx.lineTo(x1, y1);
214 214 this.ctx.stroke();
215 215
216 216 }
217 217
218 218 var revlink = '<li style="_STYLE"><span class="desc">';
219 219 revlink += '<a href="/rev/_NODEID" title="_NODEID">_DESC</a>';
220 220 revlink += '</span>_TAGS<span class="info">_DATE ago, by _USER</span></li>';
221 221
222 222 graph.vertex = function(x, y, color, parity, cur) {
223 223
224 224 this.ctx.beginPath();
225 225 color = this.setColor(color, 0.25, 0.75);
226 226 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
227 227 this.ctx.fill();
228 228
229 229 var bg = '<li class="bg parity' + parity + '"></li>';
230 230 var left = (this.columns + 1) * this.bg_height;
231 231 var nstyle = 'padding-left: ' + left + 'px;';
232 232 var item = revlink.replace(/_STYLE/, nstyle);
233 233 item = item.replace(/_PARITY/, 'parity' + parity);
234 234 item = item.replace(/_NODEID/, cur[0]);
235 235 item = item.replace(/_NODEID/, cur[0]);
236 236 item = item.replace(/_DESC/, cur[3]);
237 237 item = item.replace(/_USER/, cur[4]);
238 238 item = item.replace(/_DATE/, cur[5]);
239 239
240 240 var tagspan = '';
241 241 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
242 242 tagspan = '<span class="logtags">';
243 243 if (cur[6][1]) {
244 244 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
245 245 tagspan += cur[6][0] + '</span> ';
246 246 } else if (!cur[6][1] && cur[6][0] != 'default') {
247 247 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
248 248 tagspan += cur[6][0] + '</span> ';
249 249 }
250 250 if (cur[7].length) {
251 251 for (var t in cur[7]) {
252 252 var tag = cur[7][t];
253 253 tagspan += '<span class="tag">' + tag + '</span> ';
254 254 }
255 255 }
256 256 tagspan += '</span>';
257 257 }
258 258
259 259 item = item.replace(/_TAGS/, tagspan);
260 260 return [bg, item];
261 261
262 262 }
263 263
264 264 graph.render(data);
265 265
266 266 // stop hiding script -->
267 267 </script>
268 268
269 269 <div class="navigate">
270 <a href="/graph/-1?revcount=12">less</a>
271 <a href="/graph/-1?revcount=50">more</a>
270 <a href="/graph/-1?revcount=30">less</a>
271 <a href="/graph/-1?revcount=120">more</a>
272 272 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
273 273 </div>
274 274
275 275 </div>
276 276 </div>
277 277
278 278
279 279
280 280 </body>
281 281 </html>
282 282
283 283 200 Script output follows
284 284
285 285 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
286 286 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
287 287 <head>
288 288 <link rel="icon" href="/static/hgicon.png" type="image/png" />
289 289 <meta name="robots" content="index, nofollow" />
290 290 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
291 291
292 292 <title>test: 000000000000 /</title>
293 293 </head>
294 294 <body>
295 295
296 296 <div class="container">
297 297 <div class="menu">
298 298 <div class="logo">
299 299 <a href="http://mercurial.selenic.com/">
300 300 <img src="/static/hglogo.png" alt="mercurial" /></a>
301 301 </div>
302 302 <ul>
303 303 <li><a href="/shortlog/000000000000">log</a></li>
304 304 <li><a href="/graph/000000000000">graph</a></li>
305 305 <li><a href="/tags">tags</a></li>
306 306 <li><a href="/branches">branches</a></li>
307 307 </ul>
308 308 <ul>
309 309 <li><a href="/rev/000000000000">changeset</a></li>
310 310 <li class="active">browse</li>
311 311 </ul>
312 312 <ul>
313 313
314 314 </ul>
315 315 </div>
316 316
317 317 <div class="main">
318 318 <h2><a href="/">test</a></h2>
319 319 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
320 320
321 321 <form class="search" action="/log">
322 322
323 323 <p><input name="rev" id="search1" type="text" size="30" /></p>
324 324 <div id="hint">find changesets by author, revision,
325 325 files, or words in the commit message</div>
326 326 </form>
327 327
328 328 <table class="bigtable">
329 329 <tr>
330 330 <th class="name">name</th>
331 331 <th class="size">size</th>
332 332 <th class="permissions">permissions</th>
333 333 </tr>
334 334 <tr class="fileline parity0">
335 335 <td class="name"><a href="/file/000000000000/">[up]</a></td>
336 336 <td class="size"></td>
337 337 <td class="permissions">drwxr-xr-x</td>
338 338 </tr>
339 339
340 340
341 341 </table>
342 342 </div>
343 343 </div>
344 344
345 345
346 346 </body>
347 347 </html>
348 348
General Comments 0
You need to be logged in to leave comments. Login now