summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@dev.spline.de>2008-08-28 18:13:33 +0200
committerroot <root@dev.spline.de>2008-08-28 18:13:33 +0200
commit77372fbbf321bc0f4085f5003283e8c6127036bf (patch)
treea023175d4925184b7811594a45778267d15ce0c0
parent43cad154aaa7778b51b884b24147b51656ae3596 (diff)
downloaddev-scripts-77372fbbf321bc0f4085f5003283e8c6127036bf.tar.gz
dev-scripts-77372fbbf321bc0f4085f5003283e8c6127036bf.tar.xz
dev-scripts-77372fbbf321bc0f4085f5003283e8c6127036bf.zip
added the index page for the users' trac-wiki and a useful getting started page.
database connection funtion for add/del project add initial project members in addproject to database
-rw-r--r--bin/GettingStarted.txt111
-rw-r--r--bin/WikiStart.txt33
-rwxr-xr-xbin/addproject12
-rwxr-xr-xbin/delproject4
4 files changed, 158 insertions, 2 deletions
diff --git a/bin/GettingStarted.txt b/bin/GettingStarted.txt
new file mode 100644
index 0000000..1e672d7
--- /dev/null
+++ b/bin/GettingStarted.txt
@@ -0,0 +1,111 @@
+
+== Some help on Subversion ==
+
+{{{
+#!div style="text-align:justify; width:50%;"
+ * '''Checkout''': a checkout is a local working copy of a repository. This is the set of files that you will be working with when making modifications to your project.
+
+ * '''Repository''': this is the logical grouping of project-related files on the server. A subversion server may host multiple repositories, but your changes will be constrained to a only single repository with your project's name.
+
+ * '''Checkin''': transmitting a set of changes from your local checkout to the server. Your changes will then be available to everyone else who has a checkout of that repository when they update their view.
+
+ * '''Head''': (also called the "main line") the most up-to-date version of the source control tree. Most of your checkins will be to the head of the tree, although in some more complex situations, you may be checking in to a branch.
+
+ * '''Branch''': a clone of the source control repository from some point in time which contains a set of changes which are not shared with the head (or "main line"). Branches are one way for a developer to work on a particular feature (usually a large feature) and have intermediate changes versioned without having to worry about whether or not his or her changes will break someone else's code. Changes can then be "merged" back back to the main line when the developer thinks they are stable.
+
+ * '''Merge''': merging is the process of taking several versions of a single file and turning them into one authoritative version. Merging in is often an automated process with Subversion, but you may at times be called upon to merge a set of files manually if the server encounters a conflict (when the server cannot automatically take care of it).
+}}}
+'' this short docu is taken from [http://dojo.jot.com/Getting%20Started%20With%20Subversion] ''
+{{{
+#!div style="text-align:justify; width:50%;"
+=== Checkout your new project ===
+
+Before you type this command, create a new directory for your checkout.
+}}}
+{{{
+#!div style="text-align:justify; width:65%;"
+{{{
+svn checkout --username <your username> https://dev.spline.de/svn/<your projectname>
+}}}
+''short: svn co''
+}}}
+{{{
+#!div style="text-align:justify; width:50%;"
+Checking out the code creates a local copy for you to edit. Go ahead and make some minor edits now and in the next step we'll let Subversion show you the changes.
+
+=== Adding a new file ===
+
+After you've imported your project, you might want to add a new file. One word of caution though. Unlike CVS, Subversion adds are recursive! If you add a directory with Subversion, it will add everything in the directory as well.
+
+{{{
+svn add <file name>
+svn add <directory name>
+}}}
+
+=== See your changes ===
+
+Once you've made changes to your local files, you can see those changes very easily. It's also a good idea to review your changes before you push them back up to the server, just to be sure you remember everything you changed!
+
+{{{
+svn diff
+svn diff <file name>
+svn diff <directory name>
+}}}
+
+=== Put your changes back in the server ===
+
+Once you've made some improvements to the local code that you checked out, you'll want to put that code back on the server. The server will keep a complete record of your changes, including the date and time of the change, who made the change and the changed code itself. After issuing this command, an editor (the one you specified in your environment variable $EDITOR) will be opened and you will be asked to write a commit message. '''It is very important to always write a commit message'''! Also, you will be shown a list of all files that will be committed.
+
+{{{
+svn commit
+svn commit <file name>
+svn commit <directory name>
+}}}
+''short: svn ci''
+
+if you want to skip the editor, your can also type
+{{{
+svn commit -m '<your commit message>'
+}}}
+
+=== Get everyone else's changes ===
+
+When someone uses the commit command to push their changes up to the server, you'll want to pull those changes down to your local machine. You do with the update command. As you're probably noticing by now, the commands are pretty similar. Once you get the hang of one or two of them, the rest start to make sense.
+
+{{{
+svn update
+svn update <file name>
+svn update <directory name>
+}}}
+''short: svn up''
+
+=== See a file's history ===
+
+If you want to see whose edited a certain file, or a directory tree, the log command is what you need.
+
+{{{
+svn log
+svn log <file name>
+svn log <directory nam>
+}}}
+}}}
+''this short docu has been taken from http://www.jaredrichardson.net/articles/svn-cheat-sheet.html''
+{{{
+#!div style="text-align:justify; width:50%;"
+=== See the current status of your working copy ===
+
+If you want to see possible conflicts, added files, deleted files, modified files, etc, you can use the following command.
+
+{{{
+svn status
+svn status <file name>
+svn status <directory name>
+}}}
+
+=== Read the manual page ===
+
+{{{
+man svn
+}}}
+
+}}}
diff --git a/bin/WikiStart.txt b/bin/WikiStart.txt
new file mode 100644
index 0000000..a506c9a
--- /dev/null
+++ b/bin/WikiStart.txt
@@ -0,0 +1,33 @@
+= Welcome to dev.spline.de =
+
+{{{
+#!div style="text-align:justify; width:50%;"
+spline now offers Trac, which is (in their own words) a '''minimalistic'''
+approach to '''web-based''' management of '''software projects'''. Its goal
+is to simplify effective tracking and handling of software issues, enhancements
+and overall progress.
+
+If you need help with your new project, check out GettingStarted.
+}}}
+
+=== Trac offers ===
+
+ * a repository for your code
+ * a bugtracker
+ * a wiki
+ * a timeline showing all changes
+ * a commit-mailinglist
+
+You can contact us at [mailto:dev@spline.de dev@spline.de]
+
+=== Learn more about Trac ===
+
+ * TracGuide -- Built-in Documentation
+ * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project
+ * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions
+ * TracSupport -- Trac Support
+
+=== Learn more about Subversion ===
+
+ * [http://svnbook.red-bean.com Version Control with Subversion] -- The official Subversion Documentation
+ * [http://ariejan.net/upload/svncheatsheet-1.0.1.pdf Subversion Cheat Sheet]
diff --git a/bin/addproject b/bin/addproject
index f40e3ae..4ece360 100755
--- a/bin/addproject
+++ b/bin/addproject
@@ -1,7 +1,7 @@
#!/bin/bash
dbquery() {
- mysql -s -s -e "$@" trac
+ mysql -s -s -e "$*" trac
}
# main function
@@ -72,6 +72,8 @@ main() {
done
eexec trac-admin ${trac_home} permission add authenticated TRAC_ADMIN
+ eexec trac-admin ${trac_home} wiki import WikiStart WikiStart.txt
+ eexec trac-admin ${trac_home} wiki import GettingStarted GettingStarted.txt
eheading "setting up apache2"
eexec sed -i -e "\$a\\# ${project_name} (added on $(date -R))\\" ${APACHE_PROJECT_CONF}
@@ -80,7 +82,7 @@ main() {
if [[ ${project_closed} == y ]]
then
eexec sed -i -e "\$a\\Use SVNProjectClosed ${project_name}\\" ${APACHE_PROJECT_CONF}
- else
+ else
eexec sed -i -e "\$a\\Use SVNProject ${project_name}\\" ${APACHE_PROJECT_CONF}
fi
@@ -93,6 +95,12 @@ main() {
eexec git commit -m "added new project ${project_name}"
popd > /dev/null
+ eheading "adding initial project member to the database"
+ eexec dbquery "INSERT INTO project (project_name) VALUES ('${project_name}')"
+ eexec dbquery "INSERT INTO member (user_id, project_id) VALUES (" \
+ "(SELECT id FROM user WHERE login = '${user_name}')," \
+ "(SELECT id FROM project WHERE project_name = '${project_name}'))"
+
eheading "requesting new mailinglist for the project"
# register mailinglist (owner is user_email) for the new project
eexec wget -q -O /dev/null --no-check-certificate --post-data "name=commit-${project_name}&email=${user_email}" \
diff --git a/bin/delproject b/bin/delproject
index 4852276..c53bb00 100755
--- a/bin/delproject
+++ b/bin/delproject
@@ -1,5 +1,9 @@
#!/bin/bash
+dbquery() {
+ mysql -s -s -e "$*" trac
+}
+
# main function
main() {
echo