Mercurial > hg-website
annotate templates/downloads/index.html @ 479:4b88b3c4fc80
downloads: initialize downloader from sources.js earlier
c65b81353b8f inadvertently broke the /downloads page by moving the call
to Downloader.init(sources) later in the rendering process, after the
downloads list has already been written. As a stopgap, we introduce an
earlier call to initialize the versions before attempting to render the
list. Future changes will move this inline script into an onload
function.
author | Kevin Bullock <kbullock+mercurial@ringworld.org> |
---|---|
date | Sun, 14 May 2017 21:47:27 -0500 |
parents | 68ea82e8ff7c |
children | 6f3cfd6dcc28 |
rev | line source |
---|---|
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
1 {% extends "base.html" %} |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
2 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
3 {% block content %} |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
4 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
5 <h1>Mercurial downloads</h1> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
6 <script language="javascript"> |
479
4b88b3c4fc80
downloads: initialize downloader from sources.js earlier
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
474
diff
changeset
|
7 Downloader.init(sources); |
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
8 var versions = Downloader.versions(); |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
9 var more = Downloader.maxversions && |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
10 versions.length > Downloader.maxversions; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
11 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
12 // Show tables for Downloader.maxversions versions |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
13 for (i in versions) { |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
14 if (more && i >= Downloader.maxversions) |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
15 break; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
16 // Need to localize this variable to closure it correctly |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
17 var current = versions[i]; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
18 document.write(Downloader.table(versions[i], function (o) { |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
19 return o.version == current; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
20 })); |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
21 } |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
22 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
23 function exposeversions (node) { |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
24 // Emit but do not render tables for remaining versions |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
25 var html = '' |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
26 for (i in versions) { |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
27 if (i < Downloader.maxversions) |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
28 continue; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
29 // Need to localize this variable to closure it correctly |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
30 var current = versions[i]; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
31 html += Downloader.table(versions[i], function (o) { |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
32 return o.version == current; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
33 }); |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
34 } |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
35 node.innerHTML = html; |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
36 } |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
37 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
38 if (more) { |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
39 document.write('\ |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
40 <div onclick="exposeversions(this);">\ |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
41 <center id="more">[more versions]</center>\ |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
42 </div>\ |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
43 <br/>\ |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
44 '); |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
45 } |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
46 </script> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
47 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
48 <h5>Development Repositories</h5> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
49 <dl> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
50 <dt>Main</dt> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
51 <dd>The main development repository of the Mercurial maintainer |
436 | 52 <a href="https://www.mercurial-scm.org/wiki/mpm">Matt Mackall</a> |
467
8a0dad3adbf7
downloads: link to new main repo
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
456
diff
changeset
|
53 can be found at <a href="https://www.mercurial-scm.org/repo/hg"> |
8a0dad3adbf7
downloads: link to new main repo
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
456
diff
changeset
|
54 https://www.mercurial-scm.org/repo/hg</a>.</dd> |
455
f6d8312a5c48
downloads: crew -> committed
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
442
diff
changeset
|
55 <dt>Committers</dt> |
f6d8312a5c48
downloads: crew -> committed
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
442
diff
changeset
|
56 <dd>The development repository of the Mercurial core contributors |
f6d8312a5c48
downloads: crew -> committed
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
442
diff
changeset
|
57 can be found at |
f6d8312a5c48
downloads: crew -> committed
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
442
diff
changeset
|
58 <a href="https://www.mercurial-scm.org/repo/hg-committed/"> |
f6d8312a5c48
downloads: crew -> committed
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
442
diff
changeset
|
59 https://www.mercurial-scm.org/repo/hg-committed/</a>.</dd> |
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
60 </dl> |
456
c3c50748a20b
downloads: add link to DeveloperRepos on wiki
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
455
diff
changeset
|
61 <p class="dl-note">See |
c3c50748a20b
downloads: add link to DeveloperRepos on wiki
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
455
diff
changeset
|
62 <a href="https://www.mercurial-scm.org/wiki/DeveloperRepos">Developer |
c3c50748a20b
downloads: add link to DeveloperRepos on wiki
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
455
diff
changeset
|
63 Repositories</a> on the wiki for a full list.</p> |
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
64 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
65 <h5>Requirements</h5> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
66 <dl> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
67 <dt>Python</dt> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
68 <dd>Mercurial uses <a href="http://www.python.org">Python</a> |
438 | 69 (versions <em>2.6</em> through <em>2.7</em>). Most |
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
70 ready-to-run Mercurial distributions include Python or use |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
71 the Python that comes with your operating system. When |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
72 building from source you should confirm that an appropriate |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
73 Python version is available.</dd> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
74 </dl> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
75 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
76 <h5>Older Releases</h5> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
77 <dl> |
438 | 78 <dt>Python versions<dt> |
79 <dd>For more information about version support, see | |
80 <a href="https://www.mercurial-scm.org/wiki/SupportedPythonVersions">Supported | |
81 Python Versions</a> on the wiki.</dd> | |
82 <dt>Python 2.5</dt> | |
83 <dd><a href="/release/mercurial-3.4.2.tar.gz">Mercurial 3.4.2</a> | |
84 is the last release to support Python 2.5. Use this if you | |
85 need to run Mercurial on very old platforms and you cannot update | |
86 your Python installation.</dd> | |
87 <dt>Python 2.4</dt> | |
88 <dd><a href="/release/mercurial-3.4.2.tar.gz">Mercurial 3.4.2</a> | |
89 is the last release to support Python 2.4. Use this if you | |
90 need to run Mercurial on very old platforms and you cannot update | |
91 your Python installation.</dd> | |
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
92 <dt>Python 2.3</dt> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
93 <dd><a href="/release/mercurial-1.2.1.tar.gz">Mercurial 1.2.1</a> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
94 is the last release to support Python 2.3. Use this if you |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
95 need to run Mercurial on very old platforms and you cannot update |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
96 your Python installation.</dd> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
97 <dt>Older source releases</dt> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
98 <dd><a href="/release/">All previous source releases</a> are available |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
99 to download.</dd> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
100 </dl> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
101 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
102 {% endblock %} |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
103 {% block sidebar %} |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
104 <h3>Get started</h3> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
105 <p>Mercurial is written in Python with platform independence in mind. |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
106 As a result, Mercurial is available on |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
107 <a href="http://www.microsoft.com/windows">Microsoft Windows</a>, |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
108 <a href="http://kernel.org">GNU/Linux</a>, |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
109 <a href="http://www.apple.com">Mac OS X</a>, |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
110 <a href="http://oracle.com/solaris">Solaris 11 Express</a> and others. |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
111 You can either download a binary package for the system of your choice or |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
112 build it from sources.</p> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
113 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
114 <p>Windows users are likely to enjoy the <a href="http://tortoisehg.org">TortoiseHg</a> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
115 GUI the most. It integrates Mercurial directly into your explorer.</p> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
116 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
117 <p>Packages for common Linux, BSD and Solaris distributions can be |
474
68ea82e8ff7c
downloads: add link to PPA for ubuntu/debian
heatherboo <heather.j.booker@gmail.com>
parents:
467
diff
changeset
|
118 installed from the system specific repositories:</p> |
68ea82e8ff7c
downloads: add link to PPA for ubuntu/debian
heatherboo <heather.j.booker@gmail.com>
parents:
467
diff
changeset
|
119 <p>(Ubuntu: If you need a more recent version than what is available through apt-get, you can <a href="https://launchpad.net/~mercurial-ppa/+archive/ubuntu/releases">try the PPA</a>.) |
68ea82e8ff7c
downloads: add link to PPA for ubuntu/debian
heatherboo <heather.j.booker@gmail.com>
parents:
467
diff
changeset
|
120 </p> |
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
121 <p> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
122 <pre> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
123 # Debian/Ubuntu |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
124 $ apt-get install mercurial |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
125 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
126 # Fedora |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
127 $ yum install mercurial |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
128 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
129 # Gentoo |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
130 $ emerge mercurial |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
131 |
414
3d0f1f7cee05
downloads: add macos homebrew install instructions
David Soria Parra <davidsp@fb.com>
parents:
397
diff
changeset
|
132 # Mac OS (homebrew) |
3d0f1f7cee05
downloads: add macos homebrew install instructions
David Soria Parra <davidsp@fb.com>
parents:
397
diff
changeset
|
133 $ brew install mercurial |
3d0f1f7cee05
downloads: add macos homebrew install instructions
David Soria Parra <davidsp@fb.com>
parents:
397
diff
changeset
|
134 |
397
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
135 # FreeBSD |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
136 $ cd /usr/ports/devel/mercurial |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
137 $ make install |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
138 |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
139 # Solaris 11 Express |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
140 $ pkg install SUNWmercurial |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
141 </pre> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
142 </p> |
29d4b5e45423
Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff
changeset
|
143 {% endblock %} |