mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
merge with -stable
This commit is contained in:
commit
c79382f326
@ -3,7 +3,7 @@
|
||||
__doc__ = """This does HTTP get requests given a host:port and path and returns
|
||||
a subset of the headers plus the body of the result."""
|
||||
|
||||
import httplib, sys
|
||||
import httplib, sys, re
|
||||
|
||||
try:
|
||||
import msvcrt, os
|
||||
@ -21,7 +21,9 @@ for h in headers:
|
||||
if response.getheader(h, None) is not None:
|
||||
print "%s: %s" % (h, response.getheader(h))
|
||||
print
|
||||
sys.stdout.write(response.read())
|
||||
data = response.read()
|
||||
data = re.sub('\d+ years', 'many years', data)
|
||||
sys.stdout.write(data)
|
||||
|
||||
if 200 <= response.status <= 299:
|
||||
sys.exit(0)
|
||||
|
@ -20,21 +20,21 @@ echo % Logs and changes
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' | sed "s/[0-9]* years/many years/"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' | sed "s/[0-9]* years ago/long ago/g"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
|
||||
|
||||
echo % File-related
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' | sed "s/[0-9]* years/many years/"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
|
||||
|
||||
echo % Overviews
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/tags/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' | sed "s/[0-9]* years ago/long ago/g"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' | sed "s/[0-9]* years/long/g"
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
|
||||
|
||||
echo % capabilities
|
||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'
|
||||
|
@ -253,7 +253,7 @@ files, or words in the commit message</span>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="date">date</th>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (long ago)</td></tr>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td></tr>
|
||||
<tr>
|
||||
<th class="author">parents</th>
|
||||
<td class="author"></td>
|
||||
@ -492,19 +492,19 @@ summary |
|
||||
|
||||
<div><a class="title" href="/shortlog?style=gitweb">changes</a></div>
|
||||
<table cellspacing="0">
|
||||
<tr class="parity0"><td class="age"><i>long ago</i></td><td><i>test</i></td><td><a class="list" href="/rev/a4f92ed23982?style=gitweb"><b>Added tag 1.0 for changeset 2ef0ac749a14</b> <span class="logtags"><span class="branchtag" title="default">default</span> <span class="tagtag" title="tip">tip</span> </span></a></td><td class="link" nowrap><a href="/rev/a4f92ed23982?style=gitweb">changeset</a> | <a href="/file/a4f92ed23982?style=gitweb">files</a></td></tr><tr class="parity1"><td class="age"><i>long ago</i></td><td><i>test</i></td><td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>base</b> <span class="logtags"><span class="tagtag" title="1.0">1.0</span> </span></a></td><td class="link" nowrap><a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> | <a href="/file/2ef0ac749a14?style=gitweb">files</a></td></tr>
|
||||
<tr class="parity0"><td class="age"><i>many years ago</i></td><td><i>test</i></td><td><a class="list" href="/rev/a4f92ed23982?style=gitweb"><b>Added tag 1.0 for changeset 2ef0ac749a14</b> <span class="logtags"><span class="branchtag" title="default">default</span> <span class="tagtag" title="tip">tip</span> </span></a></td><td class="link" nowrap><a href="/rev/a4f92ed23982?style=gitweb">changeset</a> | <a href="/file/a4f92ed23982?style=gitweb">files</a></td></tr><tr class="parity1"><td class="age"><i>many years ago</i></td><td><i>test</i></td><td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>base</b> <span class="logtags"><span class="tagtag" title="1.0">1.0</span> </span></a></td><td class="link" nowrap><a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> | <a href="/file/2ef0ac749a14?style=gitweb">files</a></td></tr>
|
||||
<tr class="light"><td colspan="4"><a class="list" href="/shortlog?style=gitweb">...</a></td></tr>
|
||||
</table>
|
||||
|
||||
<div><a class="title" href="/tags?style=gitweb">tags</a></div>
|
||||
<table cellspacing="0">
|
||||
<tr class="parity0"><td class="age"><i>long ago</i></td><td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td><td class="link"><a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> | <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> | <a href="/file/2ef0ac749a14?style=gitweb">files</a></td></tr>
|
||||
<tr class="parity0"><td class="age"><i>many years ago</i></td><td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td><td class="link"><a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> | <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> | <a href="/file/2ef0ac749a14?style=gitweb">files</a></td></tr>
|
||||
<tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
|
||||
</table>
|
||||
|
||||
<div><a class="title" href="#">branches</a></div>
|
||||
<table cellspacing="0">
|
||||
<tr class="parity0"><td class="age"><i>long ago</i></td><td><a class="list" href="/rev/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td><td>default</td><td class="link"><a href="/rev/a4f92ed23982?style=gitweb">changeset</a> | <a href="/log/a4f92ed23982?style=gitweb">changelog</a> | <a href="/file/a4f92ed23982?style=gitweb">files</a></td></tr>
|
||||
<tr class="parity0"><td class="age"><i>many years ago</i></td><td><a class="list" href="/rev/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td><td>default</td><td class="link"><a href="/rev/a4f92ed23982?style=gitweb">changeset</a> | <a href="/log/a4f92ed23982?style=gitweb">changelog</a> | <a href="/file/a4f92ed23982?style=gitweb">files</a></td></tr>
|
||||
<tr class="light">
|
||||
<td colspan="4"><a class="list" href="#">...</a></td>
|
||||
</tr>
|
||||
@ -578,7 +578,7 @@ graph |
|
||||
<script>
|
||||
<!-- hide script content
|
||||
|
||||
var data = [["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "long", ["default", true], ["tip"]], ["2ef0ac749a14", [0, 1], [], "base", "test", "long", ["default", false], ["1.0"]]];
|
||||
var data = [["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "many years", ["default", true], ["tip"]], ["2ef0ac749a14", [0, 1], [], "base", "test", "many years", ["default", false], ["1.0"]]];
|
||||
var graph = new Graph();
|
||||
graph.scale(39);
|
||||
|
||||
|
@ -59,7 +59,7 @@ files, or words in the commit message</span>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="date">date</th>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td></tr>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td></tr>
|
||||
<tr>
|
||||
<th class="author">parents</th>
|
||||
<td class="author"></td>
|
||||
@ -154,7 +154,7 @@ files, or words in the commit message</span>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>date</th>
|
||||
<td>Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td>
|
||||
<td>Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>parents</th>
|
||||
@ -241,7 +241,7 @@ files, or words in the commit message</span>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="date">date</th>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td></tr>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td></tr>
|
||||
<tr>
|
||||
<th class="author">parents</th>
|
||||
<td class="author"></td>
|
||||
@ -338,7 +338,7 @@ files, or words in the commit message</span>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>date</th>
|
||||
<td>Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td>
|
||||
<td>Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>parents</th>
|
||||
|
@ -120,12 +120,12 @@ files, or words in the commit message</span>
|
||||
<th class="description">description</th>
|
||||
</tr>
|
||||
<tr class="parity0">
|
||||
<td class="age">38 years</td>
|
||||
<td class="age">many years</td>
|
||||
<td class="author">test</td>
|
||||
<td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
|
||||
</tr>
|
||||
<tr class="parity1">
|
||||
<td class="age">38 years</td>
|
||||
<td class="age">many years</td>
|
||||
<td class="author">test</td>
|
||||
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
|
||||
</tr>
|
||||
@ -203,12 +203,12 @@ files, or words in the commit message</span>
|
||||
<th class="description">description</th>
|
||||
</tr>
|
||||
<tr class="parity0">
|
||||
<td class="age">38 years</td>
|
||||
<td class="age">many years</td>
|
||||
<td class="author">test</td>
|
||||
<td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
|
||||
</tr>
|
||||
<tr class="parity1">
|
||||
<td class="age">38 years</td>
|
||||
<td class="age">many years</td>
|
||||
<td class="author">test</td>
|
||||
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
|
||||
</tr>
|
||||
@ -286,7 +286,7 @@ files, or words in the commit message</span>
|
||||
<th class="description">description</th>
|
||||
</tr>
|
||||
<tr class="parity0">
|
||||
<td class="age">38 years</td>
|
||||
<td class="age">many years</td>
|
||||
<td class="author">test</td>
|
||||
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
|
||||
</tr>
|
||||
@ -364,7 +364,7 @@ files, or words in the commit message</span>
|
||||
<th class="description">description</th>
|
||||
</tr>
|
||||
<tr class="parity0">
|
||||
<td class="age">38 years</td>
|
||||
<td class="age">many years</td>
|
||||
<td class="author">test</td>
|
||||
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
|
||||
</tr>
|
||||
|
@ -57,7 +57,7 @@ files, or words in the commit message</span>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="date">date</th>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td></tr>
|
||||
<td class="date">Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td></tr>
|
||||
<tr>
|
||||
<th class="author">parents</th>
|
||||
<td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a> </td>
|
||||
@ -148,7 +148,7 @@ files, or words in the commit message</span>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>date</th>
|
||||
<td>Thu Jan 01 00:00:00 1970 +0000 (38 years ago)</td>
|
||||
<td>Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>parents</th>
|
||||
|
@ -24,15 +24,15 @@ cat hg.pid >> $DAEMON_PIDS
|
||||
|
||||
echo % hgweb filerevision, html
|
||||
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/get-with-headers.py') \
|
||||
| sed "s/[0-9]* years ago/long ago/g" | sed "s/class=\"k\"/class=\"kn\"/g"
|
||||
| sed "s/class=\"k\"/class=\"kn\"/g"
|
||||
|
||||
echo % hgweb filerevision, html
|
||||
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/isolatin') \
|
||||
| sed "s/[0-9]* years ago/long ago/g" | sed "s/class=\"k\"/class=\"kn\"/g"
|
||||
| sed "s/class=\"k\"/class=\"kn\"/g"
|
||||
|
||||
echo % hgweb fileannotate, html
|
||||
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/get-with-headers.py') \
|
||||
| sed "s/[0-9]* years ago/long ago/g" | sed "s/class=\"k\"/class=\"kn\"/g"
|
||||
| sed "s/class=\"k\"/class=\"kn\"/g"
|
||||
|
||||
echo % hgweb fileannotate, raw
|
||||
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/get-with-headers.py?style=raw') \
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user