##// END OF EJS Templates
revset: add fast path for _list() of integer revisions...
revset: add fast path for _list() of integer revisions This can greatly speed up chained 'or' of integer revisions. 1) reduce nesting of chained 'or' operations 2) optimize to a list 3) fast path for integer revisions (this patch) revset #0: 0 + 1 + 2 + ... + 1000 1) wall 0.483341 comb 0.480000 user 0.480000 sys 0.000000 (best of 20) 2) wall 0.025393 comb 0.020000 user 0.020000 sys 0.000000 (best of 107) 3) wall 0.008371 comb 0.000000 user 0.000000 sys 0.000000 (best of 317) revset #1: sort(0 + 1 + 2 + ... + 1000) 1) wall 0.035240 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) 2) wall 0.026432 comb 0.030000 user 0.030000 sys 0.000000 (best of 102) 3) wall 0.008418 comb 0.000000 user 0.000000 sys 0.000000 (best of 322) revset #2: first(0 + 1 + 2 + ... + 1000) 1) wall 0.028949 comb 0.030000 user 0.030000 sys 0.000000 (best of 100) 2) wall 0.025503 comb 0.030000 user 0.030000 sys 0.000000 (best of 106) 3) wall 0.008423 comb 0.010000 user 0.010000 sys 0.000000 (best of 319) But I admit that it is still slower than the spanset. revset #3: 0:1000 3) wall 0.000132 comb 0.000000 user 0.000000 sys 0.000000 (best of 19010)

File last commit:

r24054:fdf7794b default
r25344:ceaf04bb default
Show More
test-hgweb-descend-empties.t
148 lines | 3.6 KiB | text/troff | Tads3Lexer
/ tests / test-hgweb-descend-empties.t
Matt Mackall
tests: replace exit 80 with #require
r22046 #require serve
Mads Kiilerich
tests: use 'hghave serve' to guard tests that requires serve daemon management
r15446
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 Test chains of near empty directories, terminating 3 different ways:
- a1: file at level 4 (deepest)
- b1: two dirs at level 3
- e1: file at level 2
Set up the repo
$ hg init test
$ cd test
$ mkdir -p a1/a2/a3/a4
$ mkdir -p b1/b2/b3/b4
$ mkdir -p b1/b2/c3/c4
$ mkdir -p d1/d2/d3/d4
$ echo foo > a1/a2/a3/a4/foo
$ echo foo > b1/b2/b3/b4/foo
$ echo foo > b1/b2/c3/c4/foo
$ echo foo > d1/d2/d3/d4/foo
$ echo foo > d1/d2/foo
$ hg ci -Ama
adding a1/a2/a3/a4/foo
adding b1/b2/b3/b4/foo
adding b1/b2/c3/c4/foo
adding d1/d2/d3/d4/foo
adding d1/d2/foo
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
manifest with descending
Mads Kiilerich
tests: prepare get-with-headers.py for MSYS...
r17017 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file'
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
Benoit Allard
web: Made elapsed time calculation dynamic (javascript)....
r14046 <script type="text/javascript" src="/static/mercurial.js"></script>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434
<title>test: 9087c84a0f5d /</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="http://mercurial.selenic.com/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog/9087c84a0f5d">log</a></li>
<li><a href="/graph/9087c84a0f5d">graph</a></li>
<li><a href="/tags">tags</a></li>
Alexander Solovyov
hgweb: add separate page with bookmarks listing
r13597 <li><a href="/bookmarks">bookmarks</a></li>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 <li><a href="/branches">branches</a></li>
</ul>
<ul>
<li><a href="/rev/9087c84a0f5d">changeset</a></li>
<li class="active">browse</li>
</ul>
<ul>
</ul>
Augie Fackler
web: add a help view for getting hg help output
r12666 <ul>
<li><a href="/help">help</a></li>
</ul>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 </div>
<div class="main">
Bryan O'Sullivan
tests: update hgweb tests to include breadcrumbs
r18264 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 <h3>directory / @ 0:9087c84a0f5d <span class="tag">tip</span> </h3>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" /></p>
Alexander Plavin
paper: edit search hint to include new feature description
r19796 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 </form>
<table class="bigtable">
Anton Shestakov
hgweb: replace implicit <tbody> with explicit <thead> where appropriate...
r24054 <thead>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 <tr>
<th class="name">name</th>
<th class="size">size</th>
<th class="permissions">permissions</th>
</tr>
Anton Shestakov
hgweb: replace implicit <tbody> with explicit <thead> where appropriate...
r24054 </thead>
Alexander Plavin
hgweb: make stripes in directory view with CSS
r19447 <tbody class="stripes2">
<tr class="fileline">
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 <td class="name"><a href="/file/9087c84a0f5d/">[up]</a></td>
<td class="size"></td>
<td class="permissions">drwxr-xr-x</td>
</tr>
Alexander Plavin
hgweb: make stripes in directory view with CSS
r19447 <tr class="fileline">
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 <td class="name">
<a href="/file/9087c84a0f5d/a1">
<img src="/static/coal-folder.png" alt="dir."/> a1/
</a>
<a href="/file/9087c84a0f5d/a1/a2/a3/a4">
a2/a3/a4
</a>
</td>
<td class="size"></td>
<td class="permissions">drwxr-xr-x</td>
</tr>
Alexander Plavin
hgweb: make stripes in directory view with CSS
r19447 <tr class="fileline">
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 <td class="name">
<a href="/file/9087c84a0f5d/b1">
<img src="/static/coal-folder.png" alt="dir."/> b1/
</a>
<a href="/file/9087c84a0f5d/b1/b2">
b2
</a>
</td>
<td class="size"></td>
<td class="permissions">drwxr-xr-x</td>
</tr>
Alexander Plavin
hgweb: make stripes in directory view with CSS
r19447 <tr class="fileline">
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 <td class="name">
<a href="/file/9087c84a0f5d/d1">
<img src="/static/coal-folder.png" alt="dir."/> d1/
</a>
<a href="/file/9087c84a0f5d/d1/d2">
d2
</a>
</td>
<td class="size"></td>
<td class="permissions">drwxr-xr-x</td>
</tr>
Alexander Plavin
hgweb: make stripes in directory view with CSS
r19447 </tbody>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434 </table>
</div>
</div>
Benoit Allard
web: Made elapsed time calculation dynamic (javascript)....
r14046 <script type="text/javascript">process_dates()</script>
Matt Mackall
tests: unify test-hgweb-descend-empties
r12434
</body>
</html>
$ cat errors.log
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..