##// END OF EJS Templates
Merge with jeffpc
Matt Mackall -
r1780:8a1f2eae merge default
parent child Browse files
Show More
@@ -0,0 +1,48
1 body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
2 a { color:#0000cc; }
3 a:hover, a:visited, a:active { color:#880000; }
4 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
5 div.page_header a:visited { color:#0000cc; }
6 div.page_header a:hover { color:#880000; }
7 div.page_nav { padding:8px; }
8 div.page_nav a:visited { color:#0000cc; }
9 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
10 div.page_footer { height:17px; padding:4px 8px; background-color: #d9d8d1; }
11 div.page_footer_text { float:left; color:#555555; font-style:italic; }
12 div.page_body { padding:8px; }
13 div.title, a.title {
14 display:block; padding:6px 8px;
15 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
16 }
17 a.title:hover { background-color: #d9d8d1; }
18 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
19 div.log_body { padding:8px 8px 8px 150px; }
20 span.age { position:relative; float:left; width:142px; font-style:italic; }
21 div.log_link {
22 padding:0px 8px;
23 font-size:10px; font-family:sans-serif; font-style:normal;
24 position:relative; float:left; width:136px;
25 }
26 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
27 a.list { text-decoration:none; color:#000000; }
28 a.list:hover { text-decoration:underline; color:#880000; }
29 table { padding:8px 4px; }
30 th { padding:2px 5px; font-size:12px; text-align:left; }
31 tr.light:hover, .parity0:hover { background-color:#edece6; }
32 tr.dark, .parity1 { background-color:#f6f6f0; }
33 tr.dark:hover, .parity1:hover { background-color:#edece6; }
34 td { padding:2px 5px; font-size:12px; vertical-align:top; }
35 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
36 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
37 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
38 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
39 div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
40 .linenr { color:#999999; text-decoration:none }
41 a.rss_logo {
42 float:right; padding:3px 0px; width:35px; line-height:10px;
43 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
44 color:#ffffff; background-color:#ff6600;
45 font-weight:bold; font-family:sans-serif; font-size:10px;
46 text-align:center; text-decoration:none;
47 }
48 a.rss_logo:hover { background-color:#ee5500; }
@@ -0,0 +1,70
1 a { text-decoration:none; }
2 .parity0 { background-color: #dddddd; }
3 .parity1 { background-color: #eeeeee; }
4 .lineno { width: 60px; color: #aaaaaa; font-size: smaller;
5 text-align: right; padding-right:1em; }
6 .plusline { color: green; }
7 .minusline { color: red; }
8 .atline { color: purple; }
9 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
10 .buttons a {
11 background-color: #666666;
12 padding: 2pt;
13 color: white;
14 font-family: sans;
15 font-weight: bold;
16 }
17 .navigate a {
18 background-color: #ccc;
19 padding: 2pt;
20 font-family: sans;
21 color: black;
22 }
23
24 .metatag {
25 background-color: #888888;
26 color: white;
27 text-align: right;
28 }
29
30 /* Common */
31 pre { margin: 0; }
32
33 .logo {
34 background-color: #333;
35 padding: 4pt;
36 margin: 8pt 0 8pt 8pt;
37 font-family: sans;
38 font-size: 60%;
39 color: white;
40 float: right;
41 clear: right;
42 text-align: left;
43 }
44
45 .logo a {
46 font-weight: bold;
47 font-size: 150%;
48 color: #999;
49 }
50
51 /* Changelog entries */
52 .changelogEntry { width: 100%; }
53 .changelogEntry th { font-weight: normal; text-align: right; vertical-align: top; }
54 .changelogEntry th.age, .changelogEntry th.firstline { font-weight: bold; }
55 .changelogEntry th.firstline { text-align: left; width: inherit; }
56
57 /* Tag entries */
58 #tagEntries { list-style: none; margin: 0; padding: 0; }
59 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
60 #tagEntries .tagEntry span.node { font-family: monospace; }
61
62 /* Changeset entry */
63 #changesetEntry { }
64 #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
65 #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
66
67 /* File diff view */
68 #filediffEntry { }
69 #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
70
@@ -7,6 +7,7
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8
8
9 import os, cgi, sys, urllib
9 import os, cgi, sys, urllib
10 import mimetypes
10 from demandload import demandload
11 from demandload import demandload
11 demandload(globals(), "mdiff time re socket zlib errno ui hg ConfigParser")
12 demandload(globals(), "mdiff time re socket zlib errno ui hg ConfigParser")
12 demandload(globals(), "zipfile tempfile StringIO tarfile BaseHTTPServer util")
13 demandload(globals(), "zipfile tempfile StringIO tarfile BaseHTTPServer util")
@@ -845,6 +846,7 class hgweb(object):
845 'ca': [('cmd', ['archive']), ('node', None)],
846 'ca': [('cmd', ['archive']), ('node', None)],
846 'tags': [('cmd', ['tags'])],
847 'tags': [('cmd', ['tags'])],
847 'tip': [('cmd', ['changeset']), ('node', ['tip'])],
848 'tip': [('cmd', ['changeset']), ('node', ['tip'])],
849 'static': [('cmd', ['static']), ('file', None)]
848 }
850 }
849
851
850 for k in shortcuts.iterkeys():
852 for k in shortcuts.iterkeys():
@@ -860,6 +862,7 class hgweb(object):
860 expand_form(req.form)
862 expand_form(req.form)
861
863
862 t = self.repo.ui.config("web", "templates", templatepath())
864 t = self.repo.ui.config("web", "templates", templatepath())
865 static = self.repo.ui.config("web", "static", os.path.join(t,"static"))
863 m = os.path.join(t, "map")
866 m = os.path.join(t, "map")
864 style = self.repo.ui.config("web", "style", "")
867 style = self.repo.ui.config("web", "style", "")
865 if req.form.has_key('style'):
868 if req.form.has_key('style'):
@@ -983,6 +986,38 class hgweb(object):
983
986
984 req.write(self.t("error"))
987 req.write(self.t("error"))
985
988
989 elif req.form['cmd'][0] == 'static':
990 fname = req.form['file'][0]
991
992 fname = os.path.realpath(os.path.join(static, fname))
993
994 try:
995 # the static dir should be a substring in the real
996 # file path, if it is not, we have something strange
997 # going on => security breach attempt?
998 #
999 # This will either:
1000 # 1) find the `static' path at index 0 = success
1001 # 2) find the `static' path at other index = error
1002 # 3) not find the `static' path = ValueError generated
1003 if fname.index(static) != 0:
1004 # generate ValueError manually
1005 raise ValueError()
1006
1007 os.stat(fname)
1008
1009 ct = mimetypes.guess_type(fname)[0]
1010 if ct == None:
1011 ct = "text/plain"
1012
1013 req.write("Content-type: " + ct + "\n\n" + file(fname).read())
1014 except ValueError:
1015 # security breach attempt
1016 req.write(self.t("error"))
1017 except OSError, e:
1018 if e.errno == errno.ENOENT:
1019 req.write(self.t("error"))
1020
986 else:
1021 else:
987 req.write(self.t("error"))
1022 req.write(self.t("error"))
988
1023
@@ -89,7 +89,9 try:
89 data_files=[('mercurial/templates',
89 data_files=[('mercurial/templates',
90 ['templates/map'] +
90 ['templates/map'] +
91 glob.glob('templates/map-*') +
91 glob.glob('templates/map-*') +
92 glob.glob('templates/*.tmpl'))],
92 glob.glob('templates/*.tmpl')),
93 ('mercurial/templates/static',
94 glob.glob('templates/static/*'))],
93 cmdclass=cmdclass,
95 cmdclass=cmdclass,
94 scripts=['hg', 'hgmerge'],
96 scripts=['hg', 'hgmerge'],
95 options=dict(bdist_mpkg=dict(zipdist=True,
97 options=dict(bdist_mpkg=dict(zipdist=True,
@@ -1,11 +1,21
1 #header#
1 #header#
2 <title>#repo|escape#: Error</title>
3 <link rel="alternate" type="application/rss+xml"
4 href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
5 </head>
6 <body>
7
8 <div class="page_header">
9 <a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / error
10 </div>
11
2 <div class="page_nav">
12 <div class="page_nav">
3 <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">log</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
13 <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
4 </div>
14 </div>
5
15
6 <div>
16 <div>
7 <br/>
17 <br/>
8 <i>Error parsing query string</i><br/>
18 <i>An error occured while processing your request</i><br/>
9 <br/>
19 <br/>
10 </div>
20 </div>
11
21
@@ -6,54 +6,5 Content-type: text/html
6 <head>
6 <head>
7 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
7 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
8 <meta name="robots" content="index, nofollow"/>
8 <meta name="robots" content="index, nofollow"/>
9 <style type="text/css">
9 <style type="text/css">/*<![CDATA[*/ @import "?static=style-gitweb.css"; /*]]>*/</style>
10 body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
11 a { color:#0000cc; }
12 a:hover, a:visited, a:active { color:#880000; }
13 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
14 div.page_header a:visited { color:#0000cc; }
15 div.page_header a:hover { color:#880000; }
16 div.page_nav { padding:8px; }
17 div.page_nav a:visited { color:#0000cc; }
18 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
19 div.page_footer { height:17px; padding:4px 8px; background-color: #d9d8d1; }
20 div.page_footer_text { float:left; color:#555555; font-style:italic; }
21 div.page_body { padding:8px; }
22 div.title, a.title {
23 display:block; padding:6px 8px;
24 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
25 }
26 a.title:hover { background-color: #d9d8d1; }
27 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
28 div.log_body { padding:8px 8px 8px 150px; }
29 span.age { position:relative; float:left; width:142px; font-style:italic; }
30 div.log_link {
31 padding:0px 8px;
32 font-size:10px; font-family:sans-serif; font-style:normal;
33 position:relative; float:left; width:136px;
34 }
35 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
36 a.list { text-decoration:none; color:#000000; }
37 a.list:hover { text-decoration:underline; color:#880000; }
38 table { padding:8px 4px; }
39 th { padding:2px 5px; font-size:12px; text-align:left; }
40 tr.light:hover, .parity0:hover { background-color:#edece6; }
41 tr.dark, .parity1 { background-color:#f6f6f0; }
42 tr.dark:hover, .parity1:hover { background-color:#edece6; }
43 td { padding:2px 5px; font-size:12px; vertical-align:top; }
44 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
45 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
46 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
47 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
48 div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
49 .linenr { color:#999999; text-decoration:none }
50 a.rss_logo {
51 float:right; padding:3px 0px; width:35px; line-height:10px;
52 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
53 color:#ffffff; background-color:#ff6600;
54 font-weight:bold; font-family:sans-serif; font-size:10px;
55 text-align:center; text-decoration:none;
56 }
57 a.rss_logo:hover { background-color:#ee5500; }
58 </style>
59
10
@@ -4,77 +4,4 Content-type: text/html
4 <html>
4 <html>
5 <head>
5 <head>
6 <meta name="robots" content="index, nofollow" />
6 <meta name="robots" content="index, nofollow" />
7 <style type="text/css">
7 <style type="text/css">/*<![CDATA[*/ @import "?static=style.css"; /*]]>*/</style>
8 <!--
9 a { text-decoration:none; }
10 .parity0 { background-color: #dddddd; }
11 .parity1 { background-color: #eeeeee; }
12 .lineno { width: 60px; color: #aaaaaa; font-size: smaller;
13 text-align: right; padding-right:1em; }
14 .plusline { color: green; }
15 .minusline { color: red; }
16 .atline { color: purple; }
17 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
18 .buttons a {
19 background-color: #666666;
20 padding: 2pt;
21 color: white;
22 font-family: sans;
23 font-weight: bold;
24 }
25 .navigate a {
26 background-color: #ccc;
27 padding: 2pt;
28 font-family: sans;
29 color: black;
30 }
31
32 .metatag {
33 background-color: #888888;
34 color: white;
35 text-align: right;
36 }
37
38 /* Common */
39 pre { margin: 0; }
40
41 .logo {
42 background-color: #333;
43 padding: 4pt;
44 margin: 8pt 0 8pt 8pt;
45 font-family: sans;
46 font-size: 60%;
47 color: white;
48 float: right;
49 clear: right;
50 text-align: left;
51 }
52
53 .logo a {
54 font-weight: bold;
55 font-size: 150%;
56 color: #999;
57 }
58
59 /* Changelog entries */
60 .changelogEntry { width: 100%; }
61 .changelogEntry th { font-weight: normal; text-align: right; vertical-align: top; }
62 .changelogEntry th.age, .changelogEntry th.firstline { font-weight: bold; }
63 .changelogEntry th.firstline { text-align: left; width: inherit; }
64
65 /* Tag entries */
66 #tagEntries { list-style: none; margin: 0; padding: 0; }
67 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
68 #tagEntries .tagEntry span.node { font-family: monospace; }
69
70 /* Changeset entry */
71 #changesetEntry { }
72 #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
73 #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
74
75 /* File diff view */
76 #filediffEntry { }
77 #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
78
79 -->
80 </style>
General Comments 0
You need to be logged in to leave comments. Login now