Matthew Marshall avatar Matthew Marshall committed e1cfbf4

Added short help for pushing for the first time.

Comments (0)

Files changed (6)


-<div class="page_header">
-<form action="{url}log">
-    {sessionvars%hiddenformentry}
-    <div class="search">
-        Search: <input type="text" name="rev"  />
-    </div>
-    </form>
-    <h2><a href="{url}">#repo|escape#</a> / summary</h2>
-<div class="page_nav">
-    summary |
-    <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-    <a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-    <a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-    <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a>#archives%archiveentry#
-     | <a href="{url}edit/">edit</a><br/>


 div.page_body .linenr {color:#555; padding-right:2px;}
 .box {background-color:#d9d9d9;} {width:390px;}
+code {color:#555}
 dd p {margin:0pt;}
 def summary(request, username, reponame):
     repo = get_object_or_404(Repo, name=reponame, owner__username=username)
     hgrepo = hg.repository(ui.ui(), repo.file_path)
+    has_tip = hgrepo.changelog.tip() != '\x00'*20
     from mercurial.hgweb.hgweb_mod import hgweb
     from mercurial.hgweb.common import style_map
     from mercurial import templater
     return render_to_response('repos/summary.html',
+            has_tip=has_tip,
         ), context_instance=RequestContext(request)


 <p>I sit down to write an About page and get stage fright.  (I'll never make it as a concert pianist!)</p>
 <p>If you have any questions, comments, or suggestions about this site, I would love to hear from you. <a href="">My email address etc. is here.</a></p>
+<p>No quack.</p>
 {% endblock %}


             var elem = $('<a href="#" class="showmore" style="display:block;margin-bottom:12px;>Show more options</'+'a>').click(function(){
+                return false;
             if ($(this).children('.more-options-placeholder')){


 {% block title %}{{repo.get_long_name}} summary{% endblock %}
 {% block content %}
+<div class="page_header">
+<form action="{{repo.get_absolute_url}}log">
+    <div class="search">
+        Search: <input type="text" name="rev"  />
+    </div>
+    </form>
+    <h2><a href="{{repo.get_absolute_url}}">{{repo.get_long_name}}</a> / summary</h2>
+<div class="page_nav">
+    summary |
+    <a href="{{repo.get_absolute_url}}shortlog{sessionvars%urlparameter}">shortlog</a> |
+    <a href="{{repo.get_absolute_url}}log{sessionvars%urlparameter}">changelog</a> |
+    <a href="{{repo.get_absolute_url}}tags{sessionvars%urlparameter}">tags</a> |
+    <a href="{{repo.get_absolute_url}}file/#node|short#{sessionvars%urlparameter}">manifest</a>{% comment %}FIXME: put links to archives here.{% endcomment %}
+     | <a href="{{repo.get_absolute_url}}edit/">edit</a><br/>
+    {% if not has_tip %}
+        <p class="box">
+            This repository doesn't have any changesets.  You can push changes from your local repository like this:<br />
+            <code>
+hg push{{repo.get_absolute_url}}</code>
+        </p>
+    {% endif %}
+    {{content|safe}}
 {% comment %}<div class="page-nav">
 summary |
 <a href="{{repo.get_absolute_url}}shortlog/">shortlog</a> |
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.