• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

Revisiónc9bbc48128d44548ae9375555f791ca7fd3227b1 (tree)
Tiempo2012-07-10 00:22:30
AutorJenny Steele <jsteele@geek...>
CommiterTim Van Steenburgh

Log Message

[#4382] Added scm getting started help

Cambiar Resumen

Diferencia incremental

--- a/ForgeGit/forgegit/templates/git/index.html
+++ b/ForgeGit/forgegit/templates/git/index.html
@@ -20,6 +20,40 @@
2020 <a href="log?page=1">More</a>
2121 {% endif %}
2222 {% else %}
23+ {% if h.has_access(c.app, 'write')() %}
24+ <div class="message warning scm-learn-basics">
25+ <div class="content">
26+ Are you new to Git? <a href="http://git-scm.com/doc">Learn the basics</a>.
27+ </div>
28+ </div>
29+
30+ <p>It looks like this Git repository doesn't have any files in it. Let's commit your project code now.</p>
31+
32+ <h2>First time using Git</h2>
33+
34+ <div class="codehilite">
35+ <pre>cd {{c.app.repo.suggested_clone_dest_path()}}
36+git init
37+git commit -a -m 'Initial commit'
38+git remote add origin {{c.app.repo.clone_url('rw', c.user.username)}}
39+git push origin master</pre>
40+ </div>
41+
42+ <h2>Existing Repository</h2>
43+
44+ <div class="codehilite">
45+ <pre>cd {{c.app.repo.suggested_clone_dest_path()}}
46+git remote add origin {{c.app.repo.clone_url('rw', c.user.username)}}
47+git push origin master</pre>
48+ </div>
49+ &nbsp;
50+ <div class="message info scm-ssh-key">
51+ <div class="content">
52+ Did you get asked for your SourceForge password during this process? You can securely use your Git repository and avoid having to re-enter your password by <a href="https://sourceforge.net/account/ssh">setting up an ssh-key</a>.
53+ </div>
54+ </div>
55+ {% else %}
2356 <p><b>No (more) commits</b></p>
57+ {% endif %}
2458 {% endif %}
2559 {% endblock %}
--- a/ForgeHg/forgehg/templates/hg/index.html
+++ b/ForgeHg/forgehg/templates/hg/index.html
@@ -21,6 +21,46 @@
2121 <a href="log?page=1">More</a>
2222 {% endif %}
2323 {% else %}
24+ {% if h.has_access(c.app, 'write')() %}
25+ <div class="message warning scm-learn-basics">
26+ <div class="content">
27+ Are you new to Mercurial? <a href="http://mercurial.selenic.com/guide/">Learn the basics</a>.
28+ </div>
29+ </div>
30+
31+ <p>It looks like this Mercurial repository doesn't have any files in it. Let's commit your project code now.</p>
32+
33+ <h2>First time using Mercurial</h2>
34+
35+ <div class="codehilite">
36+ <pre>{{c.app.repo.clone_command('rw')}}
37+cd {{c.app.repo.suggested_clone_dest_path()}}
38+touch README
39+hg add
40+hg commit -m 'Initial commit'
41+hg push</pre>
42+ </div>
43+
44+ <h2>Existing Repository</h2>
45+
46+ <p>Add the new repository as a remote in .hg/hgrc like this:</p>
47+ <div class="codehilite">
48+ <pre>[paths]
49+default = {{c.app.repo.clone_url('rw', c.user.username)}}</pre>
50+ </div>
51+ <p>Now you can push your code to the repository.</p>
52+ <div class="codehilite">
53+ <pre>cd {{c.app.repo.suggested_clone_dest_path()}}
54+hg push</pre>
55+ </div>
56+ &nbsp;
57+ <div class="message info scm-ssh-key">
58+ <div class="content">
59+ Did you get asked for your SourceForge password during this process? You can securely use your Git repository and avoid having to re-enter your password by <a href="https://sourceforge.net/account/ssh">setting up an ssh-key</a>.
60+ </div>
61+ </div>
62+ {% else %}
2463 <p><b>No (more) commits</b></p>
64+ {% endif %}
2565 {% endif %}
2666 {% endblock %}
--- a/ForgeSVN/forgesvn/controllers.py
+++ b/ForgeSVN/forgesvn/controllers.py
@@ -3,6 +3,7 @@ from tg.decorators import with_trailing_slash
33 from pylons import c
44
55 from allura.controllers import repository
6+from allura.lib import helpers as h
67
78 class BranchBrowser(repository.BranchBrowser):
89
@@ -13,7 +14,7 @@ class BranchBrowser(repository.BranchBrowser):
1314 @with_trailing_slash
1415 def index(self, limit=None, page=0, count=0, **kw):
1516 latest = c.app.repo.latest(branch=self._branch)
16- if not latest:
17+ if not latest or (latest.object_id.split(':')[1] == '1' and h.has_access(c.app, 'write')()):
1718 return dict(allow_fork=False, log=[])
1819 redirect(latest.url() + 'tree/')
1920
--- a/ForgeSVN/forgesvn/templates/svn/index.html
+++ b/ForgeSVN/forgesvn/templates/svn/index.html
@@ -20,6 +20,35 @@
2020 <a href="{{c.app.url}}log?page=1">More</a>
2121 {% endif %}
2222 {% else %}
23+ {% if h.has_access(c.app, 'write')() %}
24+ <div class="message warning scm-learn-basics">
25+ <div class="content">
26+ Are you new to Subversion? <a href="http://svnbook.red-bean.com/">Learn the basics</a>.
27+ </div>
28+ </div>
29+
30+ <p>It looks like this Subversion repository doesn't have any files in it. Let's commit your project code now.</p>
31+
32+ <h2>Import project to Subversion</h2>
33+
34+ <div class="codehilite">
35+ <pre>cd existing-{{c.app.repo.suggested_clone_dest_path()}}
36+svn import {{c.app.repo.clone_url('rw', c.user.username)}} -m "Initial commit"</pre>
37+ </div>
38+
39+ <h2>Check out a working directory</h2>
40+
41+ <div class="codehilite">
42+ <pre>{{c.app.repo.clone_command('rw')}}</pre>
43+ </div>
44+ &nbsp;
45+ <div class="message info scm-ssh-key">
46+ <div class="content">
47+ Did you get asked for your SourceForge password during this process? You can securely use your Subversion repository and avoid having to re-enter your password by <a href="https://sourceforge.net/account/ssh">setting up an ssh-key</a>.
48+ </div>
49+ </div>
50+ {% else %}
2351 <p><b>No (more) commits</b></p>
52+ {% endif %}
2453 {% endif %}
2554 {% endblock %}