Mercurial > hg-website
changeset 207:c1c9a4f809ba
integrated quick_start and learn_mercurial into the django project (with links).
Only missing parts: A wiki-page for links to learning resources and autodetection of the most current version.
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Thu, 02 Jul 2009 15:35:27 +0200 |
parents | d3c0ba7f5284 |
children | 98606f130c4e |
files | Todo.txt hgscm/apps/www/urls.py hgscm/apps/www/views.py hgscm/media/css/styles.css hgscm/templates/frontpage.html hgscm/templates/learn_mercurial.html hgscm/templates/quick_start.html |
diffstat | 7 files changed, 69 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/Todo.txt Thu Jul 02 14:50:04 2009 +0200 +++ b/Todo.txt Thu Jul 02 15:35:27 2009 +0200 @@ -2,20 +2,19 @@ Until the site can go official: -* testimonials: "It just works" (with a random quote at the beginning) * Automatic detection of the current version for downloads. Possibly via PyPI. Longterm: +* testimonials: "It just works" (with a random quote at the beginning) -> (re-)add as link for "just works" on the frontpage. * Some pages for links which currently point to the wiki but are suboptimal (for example an extension site with only the most used/useful extensions). - Currently in the works: -* quick_start - bab, concept written in text/ -* learn_mercurial (links to different resources with short descriptions) - bab, concept written in text/ +* learn_mercurial (links to different resources with short descriptions) - bab, Only missing part: A wiki page which links to learning resources Done: * who_uses_mercurial (Only 6 relevant projects, ideally with link to their repos and a text with their experience) - done by dsop +* quick_start - bab
--- a/hgscm/apps/www/urls.py Thu Jul 02 14:50:04 2009 +0200 +++ b/hgscm/apps/www/urls.py Thu Jul 02 15:35:27 2009 +0200 @@ -4,6 +4,8 @@ url(r'^$', 'frontpage', name='frontpage'), url(r'^about$', 'about', name='about'), url(r'^workflow-guide$', 'workflow_guide', name='workflow_guide'), + url(r'^learn-mercurial$', 'learn_mercurial', name='learn_mercurial'), + url(r'^quick-start$', 'quick_start', name='quick_start'), url(r'^who-uses-mercurial$', 'who_uses', name='who_uses'), url(r'^thepage$', 'thepage', name='thepage'), url(r'^downloads$', 'downloads', name='downloads'),
--- a/hgscm/apps/www/views.py Thu Jul 02 14:50:04 2009 +0200 +++ b/hgscm/apps/www/views.py Thu Jul 02 15:35:27 2009 +0200 @@ -18,6 +18,12 @@ def workflow_guide(request): return render_to_response("workflow_guide.html", { }, RequestContext(request)) +def quick_start(request): + return render_to_response("quick_start.html", { }, + RequestContext(request)) +def learn_mercurial(request): + return render_to_response("learn_mercurial.html", { }, + RequestContext(request)) def thepage(request): return render_to_response("thepage.html", { }, RequestContext(request))
--- a/hgscm/media/css/styles.css Thu Jul 02 14:50:04 2009 +0200 +++ b/hgscm/media/css/styles.css Thu Jul 02 15:35:27 2009 +0200 @@ -147,4 +147,10 @@ * Mercurial commands interspersed in text */ -hg { text-decoration: italic; } +#home hg { text-decoration: italic; } + +/* + * Lists without big bullet type... + */ + +#home .undecorated_list li { list-style:decimal outside; background: none; padding-left: 0px; min-height: 0px; margin-bottom: 1.7em} #home .undecorated_list li li { list-style: circle outside } \ No newline at end of file
--- a/hgscm/templates/frontpage.html Thu Jul 02 14:50:04 2009 +0200 +++ b/hgscm/templates/frontpage.html Thu Jul 02 15:35:27 2009 +0200 @@ -23,11 +23,11 @@ <p>Mercurial offers you the power and speed to efficiently handle <a href="{% url who_uses %}">projects of any size and kind</a><!--Reference: http://www.selenic.com/mercurial/wiki/ProjectsUsingMercurial -->. Every clone contains the whole project history, so committing, branching, tagging and merging are local operations which makes them fast and convenient. You can use a multitude of <a href="http://www.selenic.com/mercurial/wiki/Workflows">workflows</a> and easily enhance its functionality with <a href="http://www.selenic.com/mercurial/wiki/UsingExtensions">extensions</a>.</p> </li> <li class="i-2"> - <h4>It is <a href="./learn_mercurial">easy to learn</a></h4> <!-- point to a site which begins with a random "easy to learn" testimonial and then shows ways to learn Mercurial, from quick start to indepth --> - <p>You can follow our simple <a href="{% url workflow_guide %}">guide</a> to learn how to revision your documents with Mercurial, or just use the <a href="./quick_start">quick start</a> to get going instantly. <!--If you already know Subversion, please see <a href="mercurial_for_svn_users">Mercurial for svn users</a>.--></p> + <h4>It is <a href="{% url learn_mercurial %}">easy to learn</a></h4> <!-- point to a site which begins with a random "easy to learn" testimonial and then shows ways to learn Mercurial, from quick start to indepth --> + <p>You can follow our simple <a href="{% url workflow_guide %}">guide</a> to learn how to revision your documents with Mercurial, or just use the <a href="{% url quick_start %}">quick start</a> to get going instantly. <!--If you already know Subversion, please see <a href="mercurial_for_svn_users">Mercurial for svn users</a>.--></p> </li> <li class="i-3"> - <h4>And it <a href="./testimonies">just works</a></h4> + <h4>And it just works</h4> <!--<p><em>Random quote about usability.</em></p>--> <p>Mercurial strives to deliver on each of its promises. Most tasks simply work on the first try and without requiring arcane knowledge. <!--(If one doesn't, that's most likely no feature but a <a href="http://selenic.com/mercurial/bugs/">bug</a>. Please <a href="http://selenic.com/mercurial/bugs/">tell us about it</a>!) commented out because it feels awkward.--></p>
--- a/hgscm/templates/learn_mercurial.html Thu Jul 02 14:50:04 2009 +0200 +++ b/hgscm/templates/learn_mercurial.html Thu Jul 02 15:35:27 2009 +0200 @@ -1,8 +1,15 @@ +{% extends "base.html" %} + +{% load extras %} +{% block content %} + +<div class="row"> + <div class="col big"> <h1>Learn Mercurial</h1> -<p><em>Here you can find links to resources for learning Mercurial</em></p> +<p><em>Some links to resources for learning Mercurial</em></p> <ul> <li> -<p><a href="/quick_start.html">Quick_Start</a><br /> +<p><a href="{% url quick_start %}">Quick_Start</a><br /> Get started using Mercurial and understanding its basic concepts.</p> </li> <li> @@ -12,7 +19,7 @@ <!--(* TortoiseHG basics (For the Mercurial GUI) - when acessed from a windows box)--> <li> -<p><a href="/workflow_guide">workflow_guide</a><br /> +<p><a href="{% url workflow_guide %}">workflow_guide</a><br /> Learn using Mercurial step by step in workflows. This guide skips the conceptual explanations to focus only on the practical usage. </p> </li> <li> @@ -21,4 +28,12 @@ </li> <li><p><em>Further resources<br />A wiki-page with links. If you wrote some guide yourself, maybe for your team or for friends of yours, please add it! (it might be useful to have such a page in the wiki!)</em></p></li> -</ul> \ No newline at end of file +</ul> +</div> + <div class="col"> + {% download_button %} + {% mercurial_tricks %} + </div> +</div> + +{% endblock %}
--- a/hgscm/templates/quick_start.html Thu Jul 02 14:50:04 2009 +0200 +++ b/hgscm/templates/quick_start.html Thu Jul 02 15:35:27 2009 +0200 @@ -1,3 +1,10 @@ +{% extends "base.html" %} + +{% load extras %} +{% block content %} + +<div class="row"> + <div class="col big"> <h1>Quick Start</h1> <p><em>How to get going at once.</em></p> <h2>Part 0: Instant usage</h2> @@ -9,6 +16,7 @@ $ hg add (new files) $ hg commit -m 'My changes' $ hg export tip > patch.diff + </code></pre> <p>Create a project and commit </p> <pre><code>$ hg init (project-directory) @@ -31,8 +39,9 @@ </li><li>hg merge: join different lines of history </li> </ul> -<p>If you want to see a nice graph of the history, just do "hg serve" in your repository and then direct your browser to </p> +<p>If you want to see a nice graph of the history, just do <hg>hg serve</hg> in your repository and then direct your browser to </p> <pre><code> http://127.0.0.1:8000 + </code></pre> <p>This also helps getting a feeling for what the commands do. </p> <p>(you can also do a lot of finegrained stuff by using different command options. Just call "hg help <command>" to see them). </p> @@ -40,11 +49,12 @@ <p>For this you can configure a proper name and email address in ~/.hgrc (or on a Windows system in %USERPROFILE%Mercurial.ini) by adding lines such as the following: </p> <pre><code>[ui] username = John Doe <john@example.com> + </code></pre> <p>I you want more than this quick overview, please have a look at our longer <a href="{% url workflow_guide %}">practical guide</a>. </p> <h2>Part 2: Understanding Mercurial in 6 steps</h2> <p>Now we'll look at some of the basic concepts of Mercurial to get a better understanding of its internals: </p> -<ol> +<ol class="undecorated_list"> <li> <p>Like in Subversion, history consists of a number of commits. They're called changesets in Mercurial.</p> @@ -58,13 +68,16 @@ </li><li> <p>Mercurial generalizes this by letting each changeset have multiple children. If I work alone and make commits I'll make</p> -<p>C1 --> C2 --> C3</p> +<pre><code>C1 --> C2 --> C3 + +</code></pre> <p>by making three commits. </p> <p>The commit C3 with no children is a "head". It is also the newest changeset in the repository -- called "tip". If I shared C1 with you and you started your work from that, your commits will build a repository like this:</p> <pre><code>C1 --> C2' --> C3' + </code></pre> <p>Here C3' is a head in your repository and I don't know anything about C2' and C3' yet.</p> @@ -77,6 +90,7 @@ <pre><code> /-> C2 --> C3 C1 -< \-> C2' --> C3' + </code></pre> <p>Here C1 has two child changesets, and the repository has two heads since the development has diverged.</p> @@ -95,6 +109,7 @@ <pre><code> /-> C2 --> C3 -\ C1 -< >-> M \-> C2' --> C3' -/ + </code></pre> <p>Note that the merge changeset M has two parents.</p> <p>If you do not merge C3 and C3' and try to push, you get the 'new @@ -122,4 +137,14 @@ </ol> <p>And if you want to quickly look up something, you can use one of the <a href="http://www.selenic.com/mercurial/wiki/index.cgi/QuickReferenceCardsAndCheatSheets">Mercurial cheatsheets</a>. </p> -<p><em>Compiled from a great email by Martin Geisler.</em></p> \ No newline at end of file +<p><em>Compiled from a great email by Martin Geisler.</em></p> + +</div> + <div class="col"> + {% download_button %} + {% mercurial_tricks %} + {% mercurial_tricks_advanced %} + </div> +</div> + +{% endblock %}