Mercurial > kallithea
changeset 1560:a682eda60840 beta
Merged in herrmann/rhodecode (pull request #10)
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 13 Oct 2011 04:36:08 +0200 |
parents | ad6f892f3134 (diff) a9fef2e6c1ff (current diff) |
children | 4d841e565237 |
files | |
diffstat | 7 files changed, 57 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/utils.py Wed Oct 12 22:45:04 2011 -0300 +++ b/rhodecode/lib/utils.py Thu Oct 13 04:36:08 2011 +0200 @@ -395,7 +395,7 @@ g.group_name = g.get_new_name(g.name) sa.add(g) for name, repo in initial_repo_list.items(): - group = map_groups(name.split(os.sep)) + group = map_groups(name.split(Repository.url_sep())) if not rm.get_by_repo_name(name, cache=False): log.info('repository %s not found creating default', name) added.append(name)
--- a/rhodecode/model/db.py Wed Oct 12 22:45:04 2011 -0300 +++ b/rhodecode/model/db.py Thu Oct 13 04:36:08 2011 +0200 @@ -503,12 +503,16 @@ self.repo_id, self.repo_name) @classmethod + def url_sep(cls): + return '/' + + @classmethod def get_by_repo_name(cls, repo_name): q = Session.query(cls).filter(cls.repo_name == repo_name) q = q.options(joinedload(Repository.fork))\ - .options(joinedload(Repository.user))\ - .options(joinedload(Repository.group))\ + .options(joinedload(Repository.user))\ + .options(joinedload(Repository.group))\ return q.one() @@ -523,13 +527,14 @@ :param cls: """ - q = Session.query(RhodeCodeUi).filter(RhodeCodeUi.ui_key == '/') + q = Session.query(RhodeCodeUi).filter(RhodeCodeUi.ui_key == + cls.url_sep()) q.options(FromCache("sql_cache_short", "repository_repo_path")) return q.one().ui_value @property def just_name(self): - return self.repo_name.split(os.sep)[-1] + return self.repo_name.split(Repository.url_sep())[-1] @property def groups_with_parents(self): @@ -558,7 +563,8 @@ Returns base full path for that repository means where it actually exists on a filesystem """ - q = Session.query(RhodeCodeUi).filter(RhodeCodeUi.ui_key == '/') + q = Session.query(RhodeCodeUi).filter(RhodeCodeUi.ui_key == + Repository.url_sep()) q.options(FromCache("sql_cache_short", "repository_repo_path")) return q.one().ui_value @@ -568,7 +574,7 @@ # we need to split the name by / since this is how we store the # names in the database, but that eventually needs to be converted # into a valid system path - p += self.repo_name.split('/') + p += self.repo_name.split(Repository.url_sep()) return os.path.join(*p) def get_new_name(self, repo_name): @@ -578,7 +584,7 @@ :param group_name: """ path_prefix = self.group.full_path_splitted if self.group else [] - return '/'.join(path_prefix + [repo_name]) + return Repository.url_sep().join(path_prefix + [repo_name]) @property def _ui(self):
--- a/rhodecode/model/scm.py Wed Oct 12 22:45:04 2011 -0300 +++ b/rhodecode/model/scm.py Thu Oct 13 04:36:08 2011 +0200 @@ -22,6 +22,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +import os import time import traceback import logging @@ -146,10 +147,15 @@ repos_list = {} for name, path in get_filesystem_repos(repos_path, recursive=True): + + # name need to be decomposed and put back together using the / + # since this is internal storage separator for rhodecode + name = Repository.url_sep().join(name.split(os.sep)) + try: if name in repos_list: raise RepositoryError('Duplicate repository name %s ' - 'found in %s' % (name, path)) + 'found in %s' % (name, path)) else: klass = get_backend(path[0])
--- a/rhodecode/public/css/style.css Wed Oct 12 22:45:04 2011 -0300 +++ b/rhodecode/public/css/style.css Thu Oct 13 04:36:08 2011 +0200 @@ -246,12 +246,13 @@ } #header #header-inner { -height:40px; +min-height:40px; clear:both; position:relative; background:#003367 url("../images/header_inner.png") repeat-x; margin:0; padding:0; +display:block; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6); -webkit-border-radius: 4px 4px 4px 4px; -khtml-border-radius: 4px 4px 4px 4px; @@ -272,7 +273,10 @@ #header #header-inner #home a:hover { background-position:0 -40px; } - +#header #header-inner #logo { + float: left; + position: absolute; +} #header #header-inner #logo h1 { color:#FFF; font-size:18px; @@ -348,7 +352,7 @@ left:0; border-left:none; border-right:1px solid #2e5c89; -padding:8px 8px 4px; +padding:8px 6px 4px; } #header #header-inner #quick li span.icon_short { @@ -356,7 +360,10 @@ left:0; border-left:none; border-right:1px solid #2e5c89; -padding:9px 4px 4px; +padding:8px 6px 4px; +} +#header #header-inner #quick li span.icon img, #header #header-inner #quick li span.icon_short img { + margin: 0px -2px 0px 0px; } #header #header-inner #quick li a:hover { @@ -1903,19 +1910,6 @@ padding-left: 5px; } -div.browserblock .search_activate #filter_activate,div.browserblock .add_node a{ - vertical-align: sub; - border: 1px solid; - padding:2px; - -webkit-border-radius: 4px 4px 4px 4px; - -khtml-border-radius: 4px 4px 4px 4px; - -moz-border-radius: 4px 4px 4px 4px; - border-radius: 4px 4px 4px 4px; - background: url("../images/button.png") repeat-x scroll 0 0 #E5E3E3; - border-color: #DDDDDD #DDDDDD #C6C6C6 #C6C6C6; - color: #515151; -} - div.browserblock .search_activate a:hover,div.browserblock .add_node a:hover{ text-decoration: none !important; } @@ -2379,8 +2373,10 @@ border:1px solid #316293; } - -input.ui-button-small { +.ui-button-small a:hover { + +} +input.ui-button-small,.ui-button-small { background:#e5e3e3 url("../images/button.png") repeat-x !important; border-top:1px solid #DDD !important; border-left:1px solid #c6c6c6 !important; @@ -2395,17 +2391,19 @@ border-radius: 4px 4px 4px 4px !important; box-shadow: 0 1px 0 #ececec !important; cursor: pointer !important; -} - -input.ui-button-small:hover { +padding:0px 2px 1px 2px; +} + +input.ui-button-small:hover,.ui-button-small:hover { background:#b4b4b4 url("../images/button_selected.png") repeat-x !important; border-top:1px solid #ccc !important; border-left:1px solid #bebebe !important; border-right:1px solid #b1b1b1 !important; -border-bottom:1px solid #afafaf !important; -} - -input.ui-button-small-blue { +border-bottom:1px solid #afafaf !important; +text-decoration: none; +} + +input.ui-button-small-blue,.ui-button-small-blue { background:#4e85bb url("../images/button_highlight.png") repeat-x; border-top:1px solid #5c91a4; border-left:1px solid #2a6f89; @@ -2418,6 +2416,7 @@ border-radius: 4px 4px 4px 4px; box-shadow: 0 1px 0 #ececec; cursor: pointer; +padding:0px 2px 1px 2px; } input.ui-button-small-blue:hover {
--- a/rhodecode/templates/files/files_browser.html Wed Oct 12 22:45:04 2011 -0300 +++ b/rhodecode/templates/files/files_browser.html Thu Oct 13 04:36:08 2011 +0200 @@ -11,9 +11,9 @@ ${h.form(h.url.current())} <div class="info_box"> <span class="rev">${_('view')}@rev</span> - <a class="rev" href="${c.url_prev}" title="${_('previous revision')}">«</a> + <a class="ui-button-small" href="${c.url_prev}" title="${_('previous revision')}">«</a> ${h.text('at_rev',value=c.changeset.revision,size=5)} - <a class="rev" href="${c.url_next}" title="${_('next revision')}">»</a> + <a class="ui-button-small" href="${c.url_next}" title="${_('next revision')}">»</a> ## ${h.submit('view',_('view'),class_="ui-button-small")} </div> ${h.end_form()} @@ -24,11 +24,11 @@ </div> <div class="browser-search"> <div id="search_activate_id" class="search_activate"> - <a id="filter_activate" href="#">${_('search file list')}</a> + <a class="ui-button-small" id="filter_activate" href="#">${_('search file list')}</a> </div> % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): - <div id="add_node_id" class="add_node"> - <a href="${h.url('files_add_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path)}">${_('add new file')}</a> + <div id="add_node_id" class="add_node"> + <a class="ui-button-small" href="${h.url('files_add_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path)}">${_('add new file')}</a> </div> % endif <div>
--- a/rhodecode/templates/summary/summary.html Wed Oct 12 22:45:04 2011 -0300 +++ b/rhodecode/templates/summary/summary.html Thu Oct 13 04:36:08 2011 +0200 @@ -151,7 +151,7 @@ %elif c.enable_downloads is False: ${_('Downloads are disabled for this repository')} %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): - [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}] + ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-button-small")} %endif %else: ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} @@ -317,7 +317,7 @@ %if c.no_data: ${c.no_data_msg} %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): - [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}] + ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-button-small")} %endif %else:
--- a/setup.py Wed Oct 12 22:45:04 2011 -0300 +++ b/setup.py Thu Oct 13 04:36:08 2011 +0200 @@ -11,6 +11,7 @@ requirements = [ "Pylons==1.0.0", + "Beaker==1.5.4", "WebHelpers>=1.2", "formencode==1.2.4", "SQLAlchemy>=0.7.2,<0.8", @@ -21,9 +22,9 @@ "celery>=2.2.5,<2.3", "babel", "python-dateutil>=1.5.0,<2.0.0", - "dulwich>=0.8.0", - "vcs>=0.2.1.dev", - "webob==1.0.8" + "dulwich>=0.8.0,<0.9.0", + "vcs>=0.2.2.dev", + "webob==1.1.1" ] dependency_links = [