| 1 |
#require serve |
| 2 |
|
| 3 |
setting up repo |
| 4 |
|
| 5 |
$ hg init test |
| 6 |
$ cd test |
| 7 |
$ echo a > a |
| 8 |
$ hg ci -Ama |
| 9 |
adding a |
| 10 |
$ hg rm a |
| 11 |
$ hg ci -mdel |
| 12 |
|
| 13 |
set up hgweb |
| 14 |
|
| 15 |
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
| 16 |
$ cat hg.pid >> $DAEMON_PIDS |
| 17 |
|
| 18 |
revision |
| 19 |
|
| 20 |
$ get-with-headers.py localhost:$HGPORT 'rev/tip' |
| 21 |
200 Script output follows |
| 22 |
|
| 23 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 24 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
| 25 |
<head> |
| 26 |
<link rel="icon" href="/static/hgicon.png" type="image/png" /> |
| 27 |
<meta name="robots" content="index, nofollow" /> |
| 28 |
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
| 29 |
<script type="text/javascript" src="/static/mercurial.js"></script> |
| 30 |
|
| 31 |
<title>test: c78f6c5cbea9</title> |
| 32 |
</head> |
| 33 |
<body> |
| 34 |
<div class="container"> |
| 35 |
<div class="menu"> |
| 36 |
<div class="logo"> |
| 37 |
<a href="https://mercurial-scm.org/"> |
| 38 |
<img src="/static/hglogo.png" alt="mercurial" /></a> |
| 39 |
</div> |
| 40 |
<ul> |
| 41 |
<li><a href="/shortlog/tip">log</a></li> |
| 42 |
<li><a href="/graph/tip">graph</a></li> |
| 43 |
<li><a href="/tags">tags</a></li> |
| 44 |
<li><a href="/bookmarks">bookmarks</a></li> |
| 45 |
<li><a href="/branches">branches</a></li> |
| 46 |
</ul> |
| 47 |
<ul> |
| 48 |
<li class="active">changeset</li> |
| 49 |
<li><a href="/raw-rev/tip">raw</a></li> |
| 50 |
<li><a href="/file/tip">browse</a></li> |
| 51 |
</ul> |
| 52 |
<ul> |
| 53 |
|
| 54 |
</ul> |
| 55 |
<ul> |
| 56 |
<li><a href="/help">help</a></li> |
| 57 |
</ul> |
| 58 |
</div> |
| 59 |
|
| 60 |
<div class="main"> |
| 61 |
|
| 62 |
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
| 63 |
<h3> |
| 64 |
changeset 1:<a href="/rev/c78f6c5cbea9">c78f6c5cbea9</a> |
| 65 |
<span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> |
| 66 |
</h3> |
| 67 |
|
| 68 |
|
| 69 |
<form class="search" action="/log"> |
| 70 |
|
| 71 |
<p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
| 72 |
<div id="hint">Find changesets by keywords (author, files, the commit message), revision |
| 73 |
number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
| 74 |
</form> |
| 75 |
|
| 76 |
<div class="description">del</div> |
| 77 |
|
| 78 |
<table id="changesetEntry"> |
| 79 |
<tr> |
| 80 |
<th class="author">author</th> |
| 81 |
<td class="author">test</td> |
| 82 |
</tr> |
| 83 |
<tr> |
| 84 |
<th class="date">date</th> |
| 85 |
<td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> |
| 86 |
</tr> |
| 87 |
|
| 88 |
|
| 89 |
<tr> |
| 90 |
<th class="author">parents</th> |
| 91 |
<td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a> </td> |
| 92 |
</tr> |
| 93 |
<tr> |
| 94 |
<th class="author">children</th> |
| 95 |
<td class="author"></td> |
| 96 |
</tr> |
| 97 |
<tr> |
| 98 |
<th class="files">files</th> |
| 99 |
<td class="files">a </td> |
| 100 |
</tr> |
| 101 |
<tr> |
| 102 |
<th class="diffstat">diffstat</th> |
| 103 |
<td class="diffstat"> |
| 104 |
1 files changed, 0 insertions(+), 1 deletions(-) |
| 105 |
|
| 106 |
<a id="diffstatexpand" class="diffstattoggle" href="#">[<tt>+</tt>]</a> |
| 107 |
<div id="diffstatdetails" style="display:none;"> |
| 108 |
<a class="diffstattoggle" href="#">[<tt>-</tt>]</a> |
| 109 |
<table class="diffstat-table stripes2"> <tr> |
| 110 |
<td class="diffstat-file"><a href="#l1.1">a</a></td> |
| 111 |
<td class="diffstat-total" align="right">1</td> |
| 112 |
<td class="diffstat-graph"> |
| 113 |
<span class="diffstat-add" style="width:0.0%;"> </span> |
| 114 |
<span class="diffstat-remove" style="width:100.0%;"> </span> |
| 115 |
</td> |
| 116 |
</tr> |
| 117 |
</table> |
| 118 |
</div> |
| 119 |
</td> |
| 120 |
</tr> |
| 121 |
</table> |
| 122 |
|
| 123 |
<div class="overflow"> |
| 124 |
<div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="#">on</a></div> |
| 125 |
<div class="sourcefirst"> line diff</div> |
| 126 |
<div class="stripes2 diffblocks"> |
| 127 |
<div class="bottomline inc-lineno"><pre class="sourcelines wrap"> |
| 128 |
<span id="l1.1" class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000</span><a href="#l1.1"></a> |
| 129 |
<span id="l1.2" class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000</span><a href="#l1.2"></a> |
| 130 |
<span id="l1.3" class="atline">@@ -1,1 +0,0 @@</span><a href="#l1.3"></a> |
| 131 |
<span id="l1.4" class="minusline">-a</span><a href="#l1.4"></a></pre></div> |
| 132 |
</div> |
| 133 |
</div> |
| 134 |
|
| 135 |
</div> |
| 136 |
</div> |
| 137 |
|
| 138 |
|
| 139 |
</body> |
| 140 |
</html> |
| 141 |
|
| 142 |
|
| 143 |
diff removed file |
| 144 |
|
| 145 |
$ get-with-headers.py localhost:$HGPORT 'diff/tip/a' |
| 146 |
200 Script output follows |
| 147 |
|
| 148 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 149 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
| 150 |
<head> |
| 151 |
<link rel="icon" href="/static/hgicon.png" type="image/png" /> |
| 152 |
<meta name="robots" content="index, nofollow" /> |
| 153 |
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
| 154 |
<script type="text/javascript" src="/static/mercurial.js"></script> |
| 155 |
|
| 156 |
<title>test: a diff</title> |
| 157 |
</head> |
| 158 |
<body> |
| 159 |
|
| 160 |
<div class="container"> |
| 161 |
<div class="menu"> |
| 162 |
<div class="logo"> |
| 163 |
<a href="https://mercurial-scm.org/"> |
| 164 |
<img src="/static/hglogo.png" alt="mercurial" /></a> |
| 165 |
</div> |
| 166 |
<ul> |
| 167 |
<li><a href="/shortlog/tip">log</a></li> |
| 168 |
<li><a href="/graph/tip">graph</a></li> |
| 169 |
<li><a href="/tags">tags</a></li> |
| 170 |
<li><a href="/bookmarks">bookmarks</a></li> |
| 171 |
<li><a href="/branches">branches</a></li> |
| 172 |
</ul> |
| 173 |
<ul> |
| 174 |
<li><a href="/rev/tip">changeset</a></li> |
| 175 |
<li><a href="/file/tip">browse</a></li> |
| 176 |
</ul> |
| 177 |
<ul> |
| 178 |
<li><a href="/file/tip/a">file</a></li> |
| 179 |
<li><a href="/file/tip/a">latest</a></li> |
| 180 |
<li class="active">diff</li> |
| 181 |
<li><a href="/comparison/tip/a">comparison</a></li> |
| 182 |
<li><a href="/annotate/tip/a">annotate</a></li> |
| 183 |
<li><a href="/log/tip/a">file log</a></li> |
| 184 |
<li><a href="/raw-file/tip/a">raw</a></li> |
| 185 |
</ul> |
| 186 |
<ul> |
| 187 |
<li><a href="/help">help</a></li> |
| 188 |
</ul> |
| 189 |
</div> |
| 190 |
|
| 191 |
<div class="main"> |
| 192 |
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
| 193 |
<h3> |
| 194 |
diff a @ 1:<a href="/rev/c78f6c5cbea9">c78f6c5cbea9</a> |
| 195 |
<span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> |
| 196 |
</h3> |
| 197 |
|
| 198 |
|
| 199 |
<form class="search" action="/log"> |
| 200 |
|
| 201 |
<p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
| 202 |
<div id="hint">Find changesets by keywords (author, files, the commit message), revision |
| 203 |
number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
| 204 |
</form> |
| 205 |
|
| 206 |
<div class="description">del</div> |
| 207 |
|
| 208 |
<table id="changesetEntry"> |
| 209 |
<tr> |
| 210 |
<th>author</th> |
| 211 |
<td>test</td> |
| 212 |
</tr> |
| 213 |
<tr> |
| 214 |
<th>date</th> |
| 215 |
<td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> |
| 216 |
</tr> |
| 217 |
<tr> |
| 218 |
<th>parents</th> |
| 219 |
<td><a href="/file/cb9a9f314b8b/a">cb9a9f314b8b</a> </td> |
| 220 |
</tr> |
| 221 |
<tr> |
| 222 |
<th>children</th> |
| 223 |
<td></td> |
| 224 |
</tr> |
| 225 |
</table> |
| 226 |
|
| 227 |
<div class="overflow"> |
| 228 |
<div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="#">on</a></div> |
| 229 |
<div class="sourcefirst"> line diff</div> |
| 230 |
<div class="stripes2 diffblocks"> |
| 231 |
<div class="bottomline inc-lineno"><pre class="sourcelines wrap"> |
| 232 |
<span id="l1.1" class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000</span><a href="#l1.1"></a> |
| 233 |
<span id="l1.2" class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000</span><a href="#l1.2"></a> |
| 234 |
<span id="l1.3" class="atline">@@ -1,1 +0,0 @@</span><a href="#l1.3"></a> |
| 235 |
<span id="l1.4" class="minusline">-a</span><a href="#l1.4"></a></pre></div> |
| 236 |
</div> |
| 237 |
</div> |
| 238 |
</div> |
| 239 |
</div> |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
</body> |
| 244 |
</html> |
| 245 |
|
| 246 |
|
| 247 |
$ cd .. |