565c27ab7688be22e6d7c49c4b80dafb09ccca11

Author: gwoo

Date: 2009-10-10 11:40:18 -0700

some updates, adding rebase

diff --git a/.gitignore b/.gitignore index b3abd9b..5f6f01b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store config/* content/* tmp/* diff --git a/config/routes.php b/config/routes.php index 8f3747e..f6d1e1e 100755 --- a/config/routes.php +++ b/config/routes.php @@ -60,7 +60,7 @@ Router::connect('/forks/:fork/:project/:controller', array('action' => 'index'), array('action' => 'index')); Router::connect('/forks/:fork/:project/:controller/:action/*', array(), array( 'controller' => 'source|wiki|commits|tickets|comments|timeline|versions|users|projects|repo', - 'action' => 'branches|history|branch|logs|fast_forward|view|add|edit|modify|delete|remove|parent') + 'action' => 'branches|history|branch|logs|fast_forward|rebase|view|add|edit|modify|delete|remove|parent') ); Router::connect('/forks/:fork/:project/:controller/*', array(), array( 'controller' => 'source|wiki|commits|tickets|comments|timeline|versions|users|projects', @@ -73,7 +73,7 @@ Router::connect('/:project/:controller', array('action' => 'index'), array('action' => 'index')); Router::connect('/:project/:controller/:action/*', array(), array( 'controller' => 'source|wiki|commits|tickets|comments|timeline|versions|users|projects|repo', - 'action' => 'branches|history|branch|logs|merge|view|add|edit|modify|delete|remove|forks') + 'action' => 'branches|history|branch|logs|merge|rebase|view|add|edit|modify|delete|remove|forks') ); Router::connect('/:project/:controller/*', array(), array( 'controller' => 'source|wiki|commits|tickets|comments|timeline|versions|users|projects', diff --git a/config/sql/i18n.php b/config/sql/i18n.php deleted file mode 100755 index 02e9f0e..0000000 --- a/config/sql/i18n.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/* SVN FILE: $Id: i18n.php 6354 2008-01-10 07:02:33Z nate $ */ -/*i18n schema generated on: 2007-11-25 07:11:25 : 1196004805*/ -/** - * This is i18n Schema file - * - * Use it to configure database for i18n - * - * PHP versions 4 and 5 - * - * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> - * Copyright 2005-2008, Cake Software Foundation, Inc. - * 1785 E. Sahara Avenue, Suite 490-204 - * Las Vegas, Nevada 89104 - * - * Licensed under The MIT License - * Redistributions of files must retain the above copyright notice. - * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project - * @package cake - * @subpackage cake.app.config.sql - * @since CakePHP(tm) v 0.2.9 - * @version $Revision: 6354 $ - * @modifiedby $LastChangedBy: nate $ - * @lastmodified $Date: 2008-01-09 23:02:33 -0800 (Wed, 09 Jan 2008) $ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License - */ -/* - * - * Using the Schema command line utility - * cake schema run create i18n - * - */ -class i18nSchema extends CakeSchema { - - var $name = 'i18n'; - - function before($event = array()) { - return true; - } - - function after($event = array()) { - } - - var $i18n = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'), - 'model' => array('type'=>'string', 'null' => false, 'key' => 'index'), - 'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), - 'field' => array('type'=>'string', 'null' => false, 'key' => 'index'), - 'content' => array('type'=>'text', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) - ); - -} -?> \ No newline at end of file diff --git a/config/sql/i18n.sql b/config/sql/i18n.sql deleted file mode 100755 index 64f7a8e..0000000 --- a/config/sql/i18n.sql +++ /dev/null @@ -1,28 +0,0 @@ -# $Id: i18n.sql 6314 2008-01-02 21:33:51Z phpnut $ -# -# Copyright 2005-2008, Cake Software Foundation, Inc. -# 1785 E. Sahara Avenue, Suite 490-204 -# Las Vegas, Nevada 89104 -# -# Licensed under The MIT License -# Redistributions of files must retain the above copyright notice. -# http://www.opensource.org/licenses/mit-license.php The MIT License - -CREATE TABLE i18n ( - id int(10) NOT NULL auto_increment, - locale varchar(6) NOT NULL, - model varchar(255) NOT NULL, - foreign_key int(10) NOT NULL, - field varchar(255) NOT NULL, - content mediumtext, - PRIMARY KEY (id), -# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field), -# INDEX I18N_LOCALE_ROW(locale, model, foreign_key), -# INDEX I18N_LOCALE_MODEL(locale, model), -# INDEX I18N_FIELD(model, foreign_key, field), -# INDEX I18N_ROW(model, foreign_key), - INDEX locale (locale), - INDEX model (model), - INDEX row_id (foreign_key), - INDEX field (field) -); \ No newline at end of file diff --git a/config/sql/schema.php b/config/sql/schema.php deleted file mode 100644 index e59f2a2..0000000 --- a/config/sql/schema.php +++ /dev/null @@ -1,159 +0,0 @@ -<?php -/* SVN FILE: $Id$ */ -/* Chaw schema generated on: 2009-02-07 09:02:00 : 1234015860*/ -class ChawSchema extends CakeSchema { - var $name = 'Chaw'; - - function before($event = array()) { - return true; - } - - function after($event = array()) { - } - - var $comments = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'model' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 40), - 'foreign_key' => array('type' => 'integer', 'null' => false, 'default' => '0'), - 'user_id' => array('type' => 'integer', 'null' => false, 'default' => '0'), - 'reason' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 100), - 'changes' => array('type' => 'text', 'null' => true, 'default' => NULL), - 'body' => array('type' => 'text', 'null' => true, 'default' => NULL), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $commits = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'project_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'user_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'branch' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'revision' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 40), - 'author' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'committer' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'commit_date' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'message' => array('type' => 'string', 'null' => true, 'default' => NULL), - 'changes' => array('type' => 'text', 'null' => true, 'default' => NULL), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $permissions = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'project_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'user_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'group' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $projects = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'url' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 200), - 'approved' => array('type' => 'boolean', 'null' => false, 'default' => '0'), - 'private' => array('type' => 'boolean', 'null' => false, 'default' => '0'), - 'active' => array('type' => 'boolean', 'null' => false, 'default' => '1'), - 'user_id' => array('type' => 'integer', 'null' => false, 'default' => '0'), - 'fork' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'project_id' => array('type' => 'integer', 'null' => false, 'default' => '0'), - 'name' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 200), - 'repo_type' => array('type' => 'string', 'null' => false, 'default' => 'git', 'length' => 10), - 'config' => array('type' => 'text', 'null' => false, 'default' => NULL), - 'users_count' => array('type' => 'integer', 'null' => false, 'default' => '0'), - 'ohloh_project' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'description' => array('type' => 'text', 'null' => true, 'default' => NULL), - 'created' => array('type' => 'date', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'date', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $queues = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'project_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'name' => array('type' => 'string', 'null' => true, 'default' => NULL), - 'slug' => array('type' => 'string', 'null' => true, 'default' => NULL), - 'tickets_count' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $tags = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'key' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100), - 'name' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $tags_tickets = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'tag_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'ticket_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $tickets = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'number' => array('type' => 'integer', 'null' => false, 'default' => NULL), - 'project_id' => array('type' => 'integer', 'null' => false, 'default' => 0), - 'version_id' => array('type' => 'integer', 'null' => false, 'default' => 0), - 'reporter' => array('type' => 'integer', 'null' => false, 'default' => 0), - 'owner' => array('type' => 'integer', 'null' => false, 'default' => 0), - 'type' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'status' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'resolution' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'priority' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'title' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 200), - 'description' => array('type' => 'text', 'null' => true, 'default' => NULL), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $timeline = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'project_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'user_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'model' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'event' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50), - 'data' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $users = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'username' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 40), - 'password' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 40), - 'email' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 200), - 'ohloh_account' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200), - 'last_login' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'tmp_pass' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 40), - 'token' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 40), - 'token_expires' => array('type' => 'date', 'null' => true, 'default' => NULL), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'active' => array('type' => 'boolean', 'null' => false, 'default' => '0'), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $versions = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'project_id' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'slug' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 200), - 'title' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100), - 'description' => array('type' => 'text', 'null' => true, 'default' => NULL), - 'due_date' => array('type' => 'date', 'null' => true, 'default' => NULL), - 'completed' => array('type' => 'boolean', 'null' => true, 'default' => NULL), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - var $wiki = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'project_id' => array('type' => 'integer', 'null' => false, 'default' => '0'), - 'path' => array('type' => 'string', 'null' => false, 'default' => '/', 'length' => 200), - 'slug' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 200), - 'active' => array('type' => 'boolean', 'null' => false, 'default' => '0'), - 'read_only' => array('type' => 'boolean', 'null' => false, 'default' => '0'), - 'last_changed_by' => array('type' => 'integer', 'null' => true, 'default' => NULL), - 'content' => array('type' => 'text', 'null' => true, 'default' => NULL), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); -} -?> \ No newline at end of file diff --git a/config/sql/sessions.php b/config/sql/sessions.php deleted file mode 100755 index 76bfd3c..0000000 --- a/config/sql/sessions.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/* SVN FILE: $Id: sessions.php 6296 2008-01-01 22:18:17Z phpnut $ */ -/*Sessions schema generated on: 2007-11-25 07:11:54 : 1196004714*/ -/** - * This is Sessions Schema file - * - * Use it to configure database for Sessions - * - * PHP versions 4 and 5 - * - * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> - * Copyright 2005-2008, Cake Software Foundation, Inc. - * 1785 E. Sahara Avenue, Suite 490-204 - * Las Vegas, Nevada 89104 - * - * Licensed under The MIT License - * Redistributions of files must retain the above copyright notice. - * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project - * @package cake - * @subpackage cake.app.config.sql - * @since CakePHP(tm) v 0.2.9 - * @version $Revision: 6296 $ - * @modifiedby $LastChangedBy: phpnut $ - * @lastmodified $Date: 2008-01-01 14:18:17 -0800 (Tue, 01 Jan 2008) $ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License - */ -/* - * - * Using the Schema command line utility - * cake schema run create Sessions - * - */ -class SessionsSchema extends CakeSchema { - - var $name = 'Sessions'; - - function before($event = array()) { - return true; - } - - function after($event = array()) { - } - - var $cake_sessions = array( - 'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'), - 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), - 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); - -} -?> \ No newline at end of file diff --git a/config/sql/sessions.sql b/config/sql/sessions.sql deleted file mode 100755 index 5d124d4..0000000 --- a/config/sql/sessions.sql +++ /dev/null @@ -1,16 +0,0 @@ -# $Id: sessions.sql 6314 2008-01-02 21:33:51Z phpnut $ -# -# Copyright 2005-2008, Cake Software Foundation, Inc. -# 1785 E. Sahara Avenue, Suite 490-204 -# Las Vegas, Nevada 89104 -# -# Licensed under The MIT License -# Redistributions of files must retain the above copyright notice. -# http://www.opensource.org/licenses/mit-license.php The MIT License - -CREATE TABLE cake_sessions ( - id varchar(255) NOT NULL default '', - data text, - expires int(11) default NULL, - PRIMARY KEY (id) -); \ No newline at end of file diff --git a/controllers/repo_controller.php b/controllers/repo_controller.php index e62a491..9f9b58b 100644 --- a/controllers/repo_controller.php +++ b/controllers/repo_controller.php @@ -61,6 +61,17 @@ class RepoController extends AppController { $this->redirect($this->referer()); } + function rebase() { + if (!empty($this->params['isAdmin'])) { + if ($this->Project->Repo->rebase()) { + $this->Session->setFlash(__('You should have a nice clean working copy',true)); + } else { + $this->Session->setFlash(__('Oops, rebuild failed try again',true)); + } + } + $this->redirect(array('controller' => 'source', 'action' => 'index')); + } + function fork_it() { if ($this->Project->Repo->type != 'git') { $this->Session->setFlash(__('You cannot fork an svn project',true)); @@ -68,7 +79,7 @@ class RepoController extends AppController { } if (!empty($this->params['form']['cancel'])) { - $this->redirect(array('controller' => 'source')); + $this->redirect(array('controller' => 'source', 'action' => 'index')); } if (!empty($this->data)) { diff --git a/controllers/source_controller.php b/controllers/source_controller.php index 52bf68b..990ab0f 100644 --- a/controllers/source_controller.php +++ b/controllers/source_controller.php @@ -84,22 +84,6 @@ class SourceController extends AppController { $this->render('index'); } -/** - * undocumented function - * - * @return void - * - **/ - function rebase() { - if (!empty($this->params['isAdmin'])) { - if ($this->Source->rebase()) { - $this->Session->setFlash(__('You should have a nice clean working copy',true)); - } else { - $this->Session->setFlash(__('Oops, rebuild failed try again',true)); - } - } - $this->redirect($this->referer()); - } /** * undocumented function diff --git a/locale/default.pot b/locale/default.pot index 0179e6a..1495af5 100755 --- a/locale/default.pot +++ b/locale/default.pot @@ -2,15 +2,13 @@ # Copyright YEAR NAME <EMAIL@ADDRESS> # Generated from files: # Revision: 6296 /chaw/views/layouts/default.ctp -# Revision: 6296 /chaw/views/layouts/email/html/default.ctp -# Revision: 6296 /chaw/views/layouts/email/text/default.ctp # Revision: 7214 /chaw/webroot/test.php # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2009-05-01 15:11-0700\n" +"POT-Creation-Date: 2009-08-25 09:56-0700\n" "PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" "Last-Translator: NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" @@ -39,15 +37,15 @@ msgstr "" msgid "The comment was removed from timeline" msgstr "" -#: /controllers/commits_controller.php:79 +#: /controllers/commits_controller.php:101 msgid "The commit was deleted" msgstr "" -#: /controllers/commits_controller.php:81 +#: /controllers/commits_controller.php:103 msgid "The commit was NOT deleted" msgstr "" -#: /controllers/commits_controller.php:84 +#: /controllers/commits_controller.php:106 msgid "The commit was removed from timeline" msgstr "" @@ -71,56 +69,56 @@ msgstr "" msgid "Project is awaiting approval" msgstr "" -#: /controllers/projects_controller.php:119;265 +#: /controllers/projects_controller.php:119;266 msgid "Project was created" msgstr "" -#: /controllers/projects_controller.php:126;271 -#: /controllers/repo_controller.php:99 +#: /controllers/projects_controller.php:126;272 +#: /controllers/repo_controller.php:110 msgid "Project was NOT created" msgstr "" -#: /controllers/projects_controller.php:160;303 +#: /controllers/projects_controller.php:161;305 msgid "Project was updated" msgstr "" -#: /controllers/projects_controller.php:162;306 +#: /controllers/projects_controller.php:163;308 msgid "Project was NOT updated" msgstr "" -#: /controllers/projects_controller.php:180;199 +#: /controllers/projects_controller.php:181;200 msgid "Invalid Project" msgstr "" -#: /controllers/projects_controller.php:183 +#: /controllers/projects_controller.php:184 msgid "%s was removed " msgstr "" -#: /controllers/projects_controller.php:206 +#: /controllers/projects_controller.php:207 msgid "%s was deleted " msgstr "" -#: /controllers/projects_controller.php:208 +#: /controllers/projects_controller.php:209 msgid "%s was NOT deleted " msgstr "" -#: /controllers/projects_controller.php:211 +#: /controllers/projects_controller.php:212 msgid "%s could not be found" msgstr "" -#: /controllers/projects_controller.php:289;379;382 +#: /controllers/projects_controller.php:291;382;385 msgid "The project was invalid" msgstr "" -#: /controllers/projects_controller.php:293 +#: /controllers/projects_controller.php:295 msgid "Project Admin" msgstr "" -#: /controllers/projects_controller.php:352 +#: /controllers/projects_controller.php:355 msgid "The project was %s" msgstr "" -#: /controllers/projects_controller.php:376 +#: /controllers/projects_controller.php:379 msgid "The project was NOT %s" msgstr "" @@ -148,31 +146,31 @@ msgstr "" msgid "Merge failed. Time to merge manually?" msgstr "" -#: /controllers/repo_controller.php:66 -msgid "You cannot fork an svn project" +#: /controllers/repo_controller.php:67 +msgid "You should have a nice clean working copy" msgstr "" -#: /controllers/repo_controller.php:84 -msgid "Fork was created" +#: /controllers/repo_controller.php:69 +msgid "Oops, rebuild failed try again" msgstr "" -#: /controllers/repo_controller.php:92;109 -msgid "You already have a fork" +#: /controllers/repo_controller.php:77 +msgid "You cannot fork an svn project" msgstr "" -#: /controllers/source_controller.php:93 -msgid "You should have a nice clean working copy" +#: /controllers/repo_controller.php:95 +msgid "Fork was created" msgstr "" -#: /controllers/source_controller.php:95 -msgid "Oops, rebuild failed try again" +#: /controllers/repo_controller.php:103;120 +msgid "You already have a fork" msgstr "" -#: /controllers/source_controller.php:112 +#: /controllers/source_controller.php:99 msgid "%s was deleted" msgstr "" -#: /controllers/source_controller.php:114 +#: /controllers/source_controller.php:101 msgid "Oops, delete failed try again" msgstr "" @@ -200,11 +198,11 @@ msgstr "" msgid "Ticket was NOT updated" msgstr "" -#: /controllers/timeline_controller.php:82 +#: /controllers/timeline_controller.php:80 msgid "The timeline event was deleted" msgstr "" -#: /controllers/timeline_controller.php:84 +#: /controllers/timeline_controller.php:82 msgid "The timeline event was NOT deleted" msgstr "" @@ -224,11 +222,11 @@ msgstr "" msgid "User NOT added" msgstr "" -#: /controllers/users_controller.php:166 +#: /controllers/users_controller.php:167 msgid "User updated" msgstr "" -#: /controllers/users_controller.php:168 +#: /controllers/users_controller.php:169 msgid "User NOT updated" msgstr "" @@ -289,7 +287,7 @@ msgid "Invalid Version." msgstr "" #: /controllers/versions_controller.php:54 -#: /views/versions/index.ctp:13 +#: /views/versions/index.ctp:6 msgid "New Version" msgstr "" @@ -345,22 +343,27 @@ msgstr "" msgid "Select a Project" msgstr "" -#: /models/project.php:289 +#: /models/project.php:290 msgid "##The home page for %s" msgstr "" -#: /views/commits/history.ctp:14 -msgid "History" +#: /views/commits/branch.ctp:24 +#: /views/commits/history.ctp:12 +msgid "Commits for" msgstr "" +#: /views/commits/branch.ctp:55 #: /views/commits/history.ctp:43 -#: /views/commits/view.ctp:17 +#: /views/commits/logs.ctp:25 +#: /views/commits/view.ctp:31 #: /views/source/index.ctp:32 msgid "Author" msgstr "" +#: /views/commits/branch.ctp:59 #: /views/commits/history.ctp:47 -#: /views/commits/view.ctp:21 +#: /views/commits/logs.ctp:29 +#: /views/commits/view.ctp:35 #: /views/source/index.ctp:34 msgid "Date" msgstr "" @@ -372,11 +375,11 @@ msgstr "" msgid "Commits" msgstr "" -#: /views/commits/view.ctp:7 +#: /views/commits/view.ctp:13 msgid "All Commits" msgstr "" -#: /views/commits/view.ctp:30 +#: /views/commits/view.ctp:44 msgid "Changes" msgstr "" @@ -391,8 +394,8 @@ msgstr "" #: /views/dashboard/admin_index.ctp:15 #: /views/dashboard/index.ctp:21 -#: /views/layouts/default.ctp:107 -#: /views/projects/add.ctp:36 +#: /views/layouts/default.ctp:116 +#: /views/projects/add.ctp:37 #: /views/projects/admin_add.ctp:37 #: /views/projects/edit.ctp:42 #: /views/timeline/index.ctp:30 @@ -407,7 +410,7 @@ msgstr "" #: /views/dashboard/admin_index.ctp:23 #: /views/dashboard/index.ctp:29 -#: /views/layouts/default.ctp:100 +#: /views/layouts/default.ctp:109 #: /views/timeline/index.ctp:38 msgid "Wiki" msgstr "" @@ -422,7 +425,7 @@ msgid "My Account" msgstr "" #: /views/elements/admin_navigation.ctp:2 -#: /views/layouts/default.ctp:123 +#: /views/layouts/default.ctp:132 msgid "Admin" msgstr "" @@ -441,9 +444,8 @@ msgstr "" #: /views/elements/admin_navigation.ctp:22 #: /views/elements/current_projects.ctp:37 -#: /views/layouts/default.ctp:134 +#: /views/layouts/default.ctp:73 #: /views/projects/admin_index.ctp:2 -#: /views/projects/index.ctp:14 msgid "Projects" msgstr "" @@ -518,48 +520,52 @@ msgstr "" msgid "unordered list 2" msgstr "" -#: /views/elements/project_details.ctp:5 +#: /views/elements/project_details.ctp:8 msgid "Awaiting Approval" msgstr "" -#: /views/elements/project_details.ctp:9 +#: /views/elements/project_details.ctp:12 #: /views/tickets/view.ctp:108 #: /views/versions/admin_add.ctp:18 -#: /views/versions/admin_edit.ctp:24 +#: /views/versions/admin_edit.ctp:25 msgid "Description" msgstr "" -#: /views/elements/project_details.ctp:23 -msgid "fork it" +#: /views/elements/project_details.ctp:27;89 +msgid "view commits" +msgstr "" + +#: /views/elements/project_details.ctp:35 +msgid "view forks" msgstr "" -#: /views/elements/project_details.ctp:30 +#: /views/elements/project_details.ctp:40 +msgid "view parent" +msgstr "" + +#: /views/elements/project_details.ctp:50 +msgid "rebase" +msgstr "" + +#: /views/elements/project_details.ctp:56 #: /views/permissions/admin_index.ctp:32 #: /views/users/edit.ctp:47 #: /views/wiki/index.ctp:162 msgid "delete" msgstr "" -#: /views/elements/project_details.ctp:35 +#: /views/elements/project_details.ctp:61 msgid "fast forward" msgstr "" -#: /views/elements/project_details.ctp:43 -msgid "view forks" -msgstr "" - -#: /views/elements/project_details.ctp:48 -msgid "view parent" +#: /views/elements/project_details.ctp:70 +msgid "fork it" msgstr "" -#: /views/elements/project_details.ctp:56 +#: /views/elements/project_details.ctp:79 msgid "remove branch" msgstr "" -#: /views/elements/project_details.ctp:73 -msgid "view history" -msgstr "" - #: /views/elements/recent/comments.ctp:29 msgid "Recent Comments" msgstr "" @@ -581,40 +587,53 @@ msgstr "" msgid "modified" msgstr "" -#: /views/elements/timeline/comment.ctp:64 -#: /views/elements/timeline/commit.ctp:82;84 +#: /views/elements/timeline/comment.ctp:62 +#: /views/elements/timeline/commit.ctp:90;92 #: /views/elements/timeline/ticket.ctp:53 #: /views/elements/timeline/wiki.ctp:55 #: /views/users/admin_index.ctp:80;82 msgid "remove" msgstr "" -#: /views/elements/timeline/commit.ctp:29 +#: /views/elements/timeline/commit.ctp:31 msgid "merged" msgstr "" -#: /views/elements/timeline/commit.ctp:31 +#: /views/elements/timeline/commit.ctp:33 msgid "pushed" msgstr "" -#: /views/elements/timeline/commit.ctp:34 -msgid "committed" +#: /views/elements/timeline/commit.ctp:36 +msgid "commits" msgstr "" +#: /views/elements/timeline/commit.ctp:45 #: /views/elements/timeline/ticket.ctp:26 #: /views/elements/timeline/wiki.ctp:30 msgid "created" msgstr "" -#: /views/layouts/default.ctp:86 +#: /views/elements/timeline/commit.ctp:49 +msgid "committed" +msgstr "" + +#: /views/elements/timeline/commit.ctp:60 +msgid "to" +msgstr "" + +#: /views/elements/timeline/commit.ctp:69 +msgid "in" +msgstr "" + +#: /views/layouts/default.ctp:95 msgid "Source" msgstr "" -#: /views/layouts/default.ctp:93 +#: /views/layouts/default.ctp:102 msgid "Timeline" msgstr "" -#: /views/layouts/default.ctp:114 +#: /views/layouts/default.ctp:123 msgid "Versions" msgstr "" @@ -626,14 +645,6 @@ msgstr "" msgid "CakePHP: the rapid development php framework" msgstr "" -#: /views/layouts/email/html/default.ctp:37 -msgid "This email was sent using the <a href=\"http://cakephp.org\">CakePHP Framework</a>" -msgstr "" - -#: /views/layouts/email/text/default.ctp:30 -msgid "This email was sent using the CakePHP Framework, http://cakephp.org." -msgstr "" - #: /views/pages/start.ctp:6 msgid "Your database configuration file is NOT present." msgstr "" @@ -684,7 +695,7 @@ msgstr "" #: /views/users/forgotten.ctp:23 #: /views/users/login.ctp:18 #: /views/versions/admin_add.ctp:31 -#: /views/versions/admin_edit.ctp:37 +#: /views/versions/admin_edit.ctp:38 #: /views/wiki/add.ctp:59 msgid "Submit" msgstr "" @@ -751,16 +762,14 @@ msgstr "" msgid "The project name must be unique." msgstr "" -#: /views/projects/add.ctp:29 +#: /views/projects/add.ctp:30 #: /views/projects/admin_add.ctp:30 -#: /views/projects/config.ctp:9 #: /views/projects/edit.ctp:35 msgid "Groups" msgstr "" -#: /views/projects/add.ctp:33;42 +#: /views/projects/add.ctp:34;43 #: /views/projects/admin_add.ctp:34;43 -#: /views/projects/config.ctp:14 #: /views/projects/edit.ctp:39;48 msgid "Comma seperated" msgstr "" @@ -770,7 +779,7 @@ msgid "Page %page% of %pages%, showing %current% records out of %count% total, s msgstr "" #: /views/projects/admin_index.ctp:94 -#: /views/projects/index.ctp:93 +#: /views/projects/index.ctp:89 #: /views/tickets/view.ctp:55 #: /views/users/admin_index.ctp:79 msgid "edit" @@ -790,22 +799,6 @@ msgstr "" msgid "next" msgstr "" -#: /views/projects/config.ctp:7 -msgid "Options" -msgstr "" - -#: /views/projects/config.ctp:10 -msgid "Ticket Types" -msgstr "" - -#: /views/projects/config.ctp:11 -msgid "Ticket Priorities" -msgstr "" - -#: /views/projects/config.ctp:12 -msgid "Ticket Statuses" -msgstr "" - #: /views/projects/delete.ctp:5 msgid "Delete %s" msgstr "" @@ -832,50 +825,50 @@ msgstr "" msgid "Sorry, no projects are available" msgstr "" -#: /views/projects/index.ctp:20 +#: /views/projects/index.ctp:16 msgid "Mine" msgstr "" -#: /views/projects/index.ctp:23 +#: /views/projects/index.ctp:19 msgid "All" msgstr "" -#: /views/projects/index.ctp:27 +#: /views/projects/index.ctp:23 #: /views/projects/start.ctp:41 msgid "Public" msgstr "" -#: /views/projects/index.ctp:31;47 +#: /views/projects/index.ctp:27;43 #: /views/timeline/index.ctp:20 msgid "Forks" msgstr "" -#: /views/projects/index.ctp:40 +#: /views/projects/index.ctp:36 msgid "Projects Feed" msgstr "" -#: /views/projects/index.ctp:88 +#: /views/projects/index.ctp:84 #: /views/wiki/index.ctp:159 msgid "view" msgstr "" -#: /views/projects/index.ctp:98 +#: /views/projects/index.ctp:94 msgid "admin" msgstr "" -#: /views/projects/index.ctp:119 +#: /views/projects/index.ctp:115 msgid "timeline" msgstr "" -#: /views/projects/index.ctp:124 +#: /views/projects/index.ctp:120 msgid "wiki" msgstr "" -#: /views/projects/index.ctp:129 +#: /views/projects/index.ctp:125 msgid "tickets" msgstr "" -#: /views/projects/index.ctp:134 +#: /views/projects/index.ctp:130 msgid "versions" msgstr "" @@ -919,7 +912,7 @@ msgstr "" msgid "Commit" msgstr "" -#: /views/source/view.ctp:13 +#: /views/source/view.ctp:12 msgid "history" msgstr "" @@ -931,7 +924,7 @@ msgstr "" #: /views/tickets/index.ctp:94 #: /views/tickets/view.ctp:107 #: /views/versions/admin_add.ctp:17 -#: /views/versions/admin_edit.ctp:23 +#: /views/versions/admin_edit.ctp:24 msgid "Title" msgstr "" @@ -998,8 +991,8 @@ msgid "Version" msgstr "" #: /views/tickets/index.ctp:96 -#: /views/versions/index.ctp:30 -#: /views/versions/view.ctp:10 +#: /views/versions/index.ctp:23 +#: /views/versions/view.ctp:13 msgid "Created" msgstr "" @@ -1044,7 +1037,7 @@ msgid "Or close as" msgstr "" #: /views/timeline/index.ctp:14 -#: /views/versions/admin_edit.ctp:20 +#: /views/versions/admin_edit.ctp:21 msgid "Project" msgstr "" @@ -1119,22 +1112,18 @@ msgstr "" msgid "Remember me for 2 weeks" msgstr "" -#: /views/users/view.ctp:4 -msgid "Will soon have a profile to share with you" -msgstr "" - #: /views/versions/admin_add.ctp:19 -#: /views/versions/admin_edit.ctp:25 +#: /views/versions/admin_edit.ctp:26 msgid "Due Date" msgstr "" #: /views/versions/admin_add.ctp:20 -#: /views/versions/admin_edit.ctp:26 +#: /views/versions/admin_edit.ctp:27 msgid "Completed" msgstr "" -#: /views/versions/index.ctp:33 -#: /views/versions/view.ctp:13 +#: /views/versions/index.ctp:26 +#: /views/versions/view.ctp:16 msgid "Due by" msgstr "" diff --git a/plugins/repo/models/repo.php b/plugins/repo/models/repo.php index 202dac7..ab1c7f6 100644 --- a/plugins/repo/models/repo.php +++ b/plugins/repo/models/repo.php @@ -325,6 +325,19 @@ class Repo extends Overloadable { return false; } /** + * Deletes branch are resets + * + * @return void + * + **/ + function _rebase() { + $Cleanup = new Folder($this->working); + if ($Cleanup->pwd() == $this->working) { + $Cleanup->delete(); + } + return $this->pull(); + } +/** * Creates a hook * * @param string $name diff --git a/tests/cases/models/permission.test.php b/tests/cases/models/permission.test.php index df3429a..11be6e3 100644 --- a/tests/cases/models/permission.test.php +++ b/tests/cases/models/permission.test.php @@ -498,7 +498,11 @@ class PermissionTest extends CakeTestCase { gwoo = r [versions] - gwoo = crud"; + gwoo = crud + + [refs/heads/master] + @admin = rw + @team = r"; $Permission->saveFile($data); @@ -506,6 +510,11 @@ class PermissionTest extends CakeTestCase { $this->assertFalse($Permission->check("tickets", array('group' => 'team', 'access' => 'rw', 'default' => false))); $this->assertFalse($Permission->check("tickets", array('user' => 'gwoo', 'group' => 'team', 'access' => 'rw', 'default' => false))); + + $this->assertFalse($Permission->check("refs/heads/master", array( + 'user' => 'bob', 'group' => 'user', 'access' => 'w', 'default' => false + ))); + } function testPermissionGroup() { diff --git a/tmp/cache/models/empty b/tmp/cache/models/empty deleted file mode 100755 index e69de29..0000000 diff --git a/tmp/cache/persistent/empty b/tmp/cache/persistent/empty deleted file mode 100755 index e69de29..0000000 diff --git a/tmp/cache/projects/empty b/tmp/cache/projects/empty deleted file mode 100755 index e69de29..0000000 diff --git a/views/elements/project_details.ctp b/views/elements/project_details.ctp index 3c5cb73..f7adadc 100755 --- a/views/elements/project_details.ctp +++ b/views/elements/project_details.ctp @@ -15,32 +15,21 @@ <p class="path"> <?php $remote = null; - if (!empty($CurrentProject->fork)) { - $remote = "forks/{$CurrentProject->fork}/"; - } if ($CurrentProject->repo->type == 'git'): - echo '<strong>git clone</strong> '; - echo "{$CurrentProject->remote->git}:$remote{$CurrentProject->url}.git"; - - if (empty($CurrentProject->fork) && !empty($CurrentUser->id)): - echo $html->tag('span', $html->link(__('fork it',true), array( - 'admin' => false, 'fork' => false, - 'controller' => 'repo', 'action' => 'fork_it' - ), array('class' => 'detail'))); - endif; - if (!empty($CurrentProject->fork) && !empty($this->params['isAdmin'])): - echo $html->tag('span', $html->link(__('delete',true), array( - 'admin' => false, - 'controller' => 'projects', 'action' => 'delete' - ), array('class' => 'detail'))); + if (!empty($CurrentProject->fork)) { + $remote = "forks/{$CurrentProject->fork}/"; + } - echo $html->tag('span', $html->link(__('fast forward',true), array( - 'admin' => false, - 'controller' => 'repo', 'action' => 'fast_forward' - ), array('class' => 'detail'))); - endif; + echo '<strong>git clone</strong> '; + echo "{$CurrentProject->remote->git}:$remote{$CurrentProject->url}.git"; + echo $html->tag('span', $html->link(__('view commits',true), $chaw->url((array)$CurrentProject, array( + 'admin' => false, + 'controller' => 'commits', 'action' => 'branch', $branch + )), array('class' => 'history'))); + + if ($this->action !== 'forks'): if (empty($this->params['fork'])): $link = $html->link(__('view forks',true), array( @@ -55,27 +44,53 @@ endif; echo $html->tag('span', $link); endif; + + if(!empty($this->params['isAdmin'])) { + + echo $html->tag('span', $html->link(__('rebase',true), array( + 'admin' => false, + 'controller' => 'repo', 'action' => 'rebase' + ), array('class' => 'detail'))); + + if (!empty($CurrentProject->fork)): + echo $html->tag('span', $html->link(__('delete',true), array( + 'admin' => false, + 'controller' => 'projects', 'action' => 'delete' + ), array('class' => 'detail'))); + + echo $html->tag('span', $html->link(__('fast forward',true), array( + 'admin' => false, + 'controller' => 'repo', 'action' => 'fast_forward' + ), array('class' => 'detail'))); + endif; + + } else { + + if (empty($CurrentProject->fork) && !empty($CurrentUser->id)): + echo $html->tag('span', $html->link(__('fork it',true), array( + 'admin' => false, 'fork' => false, + 'controller' => 'repo', 'action' => 'fork_it' + ), array('class' => 'detail'))); + endif; + + } + if (!empty($this->params['isAdmin'])): echo $html->tag('span', $html->link(__('remove branch',true), array( 'admin' => false, 'controller' => 'source', 'action' => 'delete', $branch ), array('class' => 'detail'))); endif; - - echo $html->tag('span', $html->link(__('view commits',true), $chaw->url((array)$CurrentProject, array( - 'admin' => false, - 'controller' => 'commits', 'action' => 'branch', $branch - )), array('class' => 'history'))); - + else: echo '<strong>svn checkout</strong> '; echo "{$CurrentProject->remote->svn}/$remote{$CurrentProject->url}"; - + echo $html->tag('span', $html->link(__('view commits',true), $chaw->url((array)$CurrentProject, array( 'admin' => false, 'controller' => 'commits', 'action' => 'index' )), array('class' => 'history'))); - + endif; /* diff --git a/views/layouts/default.ctp b/views/layouts/default.ctp index 593573a..9c61c32 100755 --- a/views/layouts/default.ctp +++ b/views/layouts/default.ctp @@ -175,7 +175,7 @@ </script> <script type="text/javascript"> try { - var pageTracker = _gat._getTracker("UA-743287-5"); + var pageTracker = _gat._getTracker("UA-11048547-1"); pageTracker._trackPageview(); } catch(err) {} </script> <?php endif;?>