diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,6 @@ [bumpversion] -current_version = 4.0.0 +current_version = 4.0.1 message = release: Bump version {current_version} to {new_version} [bumpversion:file:rhodecode/VERSION] + diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -5,10 +5,17 @@ NODE_PATH=./node_modules FLAKE8=flake8 setup.py pytest_pylons/ rhodecode/ --select=E124 --ignore=E711,E712,E510,E121,E122,E126,E127,E128,E501,F401 --max-line-length=100 --exclude=*rhodecode/lib/dbmigrate/*,*rhodecode/tests/*,*rhodecode/lib/vcs/utils/* CI_PREFIX=enterprise -.PHONY: help clean test test-clean test-lint test-only +.PHONY: docs docs-clean ci-docs clean test test-clean test-lint test-only + + +docs: + (cd docs; nix-build default.nix -o result; make clean html) -help: - @echo "TODO: describe Makefile" +docs-clean: + (cd docs; make clean) + +ci-docs: docs; + clean: test-clean find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' \) -exec rm '{}' ';' @@ -37,3 +44,4 @@ web-test: docs-bootstrap: (cd docs; nix-build default.nix -o result) @echo "Please go to docs folder and run make html" + diff --git a/configs/development.ini b/configs/development.ini --- a/configs/development.ini +++ b/configs/development.ini @@ -65,6 +65,8 @@ asyncore_use_poll = true ## type of worker class, one of sync, gevent ## recommended for bigger setup is using of of other than sync one #worker_class = sync +## The maximum number of simultaneous clients. Valid only for Gevent +#worker_connections = 10 ## max number of requests that worker will handle before being gracefully ## restarted, could prevent memory leaks #max_requests = 1000 diff --git a/configs/production.ini b/configs/production.ini --- a/configs/production.ini +++ b/configs/production.ini @@ -65,6 +65,8 @@ asyncore_use_poll = true ## type of worker class, one of sync, gevent ## recommended for bigger setup is using of of other than sync one #worker_class = sync +## The maximum number of simultaneous clients. Valid only for Gevent +#worker_connections = 10 ## max number of requests that worker will handle before being gracefully ## restarted, could prevent memory leaks #max_requests = 1000 @@ -288,12 +290,12 @@ beaker.cache.repo_cache_long.expire = 25 #################################### ## .session.type is type of storage options for the session, current allowed -## types are file(default), ext:memcached, ext:database, and memory. -#beaker.session.type = file +## types are file, ext:memcached, ext:database, and memory(default). +beaker.session.type = file +beaker.session.data_dir = %(here)s/data/sessions/data ## db based session, fast, and allows easy management over logged in users ## #beaker.session.type = ext:database -#beaker.session.lock_dir = %(here)s/data/cache/session_db_lock #beaker.session.table_name = db_session #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode @@ -302,6 +304,7 @@ beaker.cache.repo_cache_long.expire = 25 beaker.session.key = rhodecode beaker.session.secret = production-rc-uytcxaz +#beaker.session.lock_dir = %(here)s/data/sessions/lock ## Secure encrypted cookie. Requires AES and AES python libraries ## you must disable beaker.session.secret to use this @@ -435,6 +438,13 @@ vcs.server.enable = true vcs.server = localhost:9900 # Available protocols: pyro4, http vcs.server.protocol = pyro4 + +# available impl: +# vcsserver.scm_app (EE only, for testing), +# rhodecode.lib.middleware.utils.scm_app_http +# pyro4 +#vcs.scm_app_implementation = rhodecode.lib.middleware.utils.scm_app_http + vcs.server.log_level = info vcs.start_server = false vcs.backends = hg, git, svn diff --git a/docs/release-notes/release-notes-4.0.1.rst b/docs/release-notes/release-notes-4.0.1.rst new file mode 100644 --- /dev/null +++ b/docs/release-notes/release-notes-4.0.1.rst @@ -0,0 +1,17 @@ +|RCE| 4.0.1 |RNS| +----------------- + +Release Date +^^^^^^^^^^^^ + +- 2016-05-25 + +Fixes +^^^^^ + +- fixed default session to be file based instead of memory which causes + problems in multi-worker setup +- ui: fixing forks table #3959 +- ui: fixed gravatars misalignment issues +- logging: fixed excesive formatting on auth logging +- pull requests: better ref selection when opening PRs from changelog diff --git a/docs/release-notes/release-notes.rst b/docs/release-notes/release-notes.rst --- a/docs/release-notes/release-notes.rst +++ b/docs/release-notes/release-notes.rst @@ -6,6 +6,7 @@ Release Notes |RCE| 4.x Versions ------------------ + release-notes-4.0.1.rst release-notes-4.0.0.rst |RCE| 3.x Versions diff --git a/pkgs/python-packages.nix b/pkgs/python-packages.nix --- a/pkgs/python-packages.nix +++ b/pkgs/python-packages.nix @@ -360,7 +360,7 @@ }; }; certifi = super.buildPythonPackage { - name = "certifi-2016.02.28"; + name = "certifi-2016.2.28"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; @@ -1050,10 +1050,10 @@ }; }; rhodecode-enterprise-ce = super.buildPythonPackage { - name = "rhodecode-enterprise-ce-4.0.0"; - buildInputs = with self; [WebTest configobj cssselect flake8 lxml mock pytest pytest-runner pytest-cov]; + name = "rhodecode-enterprise-ce-4.0.1"; + buildInputs = with self; [WebTest configobj cssselect flake8 lxml mock pytest pytest-cov pytest-runner]; doCheck = true; - propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery colander decorator docutils infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson waitress zope.cachedescriptors psutil py-bcrypt]; + propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery colander decorator docutils gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson waitress zope.cachedescriptors psutil py-bcrypt]; src = ./.; }; rhodecode-tools = super.buildPythonPackage { @@ -1269,5 +1269,5 @@ ### Test requirements - + } diff --git a/rhodecode/VERSION b/rhodecode/VERSION --- a/rhodecode/VERSION +++ b/rhodecode/VERSION @@ -1,1 +1,1 @@ -4.0.0 \ No newline at end of file +4.0.1 \ No newline at end of file diff --git a/rhodecode/authentication/plugins/auth_jasig_cas.py b/rhodecode/authentication/plugins/auth_jasig_cas.py --- a/rhodecode/authentication/plugins/auth_jasig_cas.py +++ b/rhodecode/authentication/plugins/auth_jasig_cas.py @@ -36,7 +36,6 @@ from sqlalchemy.ext.hybrid import hybrid from rhodecode.authentication.base import RhodeCodeExternalAuthPlugin from rhodecode.authentication.schema import AuthnPluginSettingsSchemaBase from rhodecode.authentication.routes import AuthnPluginResourceBase -from rhodecode.lib.ext_json import formatted_json from rhodecode.lib.utils2 import safe_unicode from rhodecode.model.db import User @@ -119,17 +118,15 @@ class RhodeCodeAuthPlugin(RhodeCodeExter log.debug('Empty username or password skipping...') return None - log.debug("Jasig CAS settings: \n%s" % (formatted_json(settings))) + log.debug("Jasig CAS settings: %s", settings) params = urllib.urlencode({'username': username, 'password': password}) headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain", "User-Agent": "RhodeCode-auth-%s" % rhodecode.__version__} url = settings["service_url"] - log.debug("Sent Jasig CAS: \n%s" - % (formatted_json({"url": url, - "body": params, - "headers": headers}))) + log.debug("Sent Jasig CAS: \n%s", + {"url": url, "body": params, "headers": headers}) request = urllib2.Request(url, params, headers) try: response = urllib2.urlopen(request) diff --git a/rhodecode/authentication/plugins/auth_ldap.py b/rhodecode/authentication/plugins/auth_ldap.py --- a/rhodecode/authentication/plugins/auth_ldap.py +++ b/rhodecode/authentication/plugins/auth_ldap.py @@ -36,7 +36,6 @@ from rhodecode.authentication.routes imp from rhodecode.lib.exceptions import ( LdapConnectionError, LdapUsernameError, LdapPasswordError, LdapImportError ) -from rhodecode.lib.ext_json import formatted_json from rhodecode.lib.utils2 import safe_unicode, safe_str from rhodecode.model.db import User from rhodecode.model.validators import Missing @@ -435,7 +434,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter 'extern_name': user_dn, 'extern_type': extern_type, } - log.debug('ldap user: \n%s', formatted_json(user_attrs)) + log.debug('ldap user: %s', user_attrs) log.info('user %s authenticated correctly', user_attrs['username']) return user_attrs diff --git a/rhodecode/authentication/plugins/auth_pam.py b/rhodecode/authentication/plugins/auth_pam.py --- a/rhodecode/authentication/plugins/auth_pam.py +++ b/rhodecode/authentication/plugins/auth_pam.py @@ -35,7 +35,6 @@ from sqlalchemy.ext.hybrid import hybrid from rhodecode.authentication.base import RhodeCodeExternalAuthPlugin from rhodecode.authentication.schema import AuthnPluginSettingsSchemaBase from rhodecode.authentication.routes import AuthnPluginResourceBase -from rhodecode.lib.ext_json import formatted_json log = logging.getLogger(__name__) @@ -151,6 +150,6 @@ class RhodeCodeAuthPlugin(RhodeCodeExter log.warning("Cannot extract additional info for PAM user") pass - log.debug("pamuser: \n%s" % formatted_json(user_attrs)) + log.debug("pamuser: %s", user_attrs) log.info('user %s authenticated correctly' % user_attrs['username']) return user_attrs diff --git a/rhodecode/lib/middleware/simplevcs.py b/rhodecode/lib/middleware/simplevcs.py --- a/rhodecode/lib/middleware/simplevcs.py +++ b/rhodecode/lib/middleware/simplevcs.py @@ -133,7 +133,8 @@ class SimpleVCS(object): def is_valid_and_existing_repo(self, repo_name, base_path, scm_type): db_repo = Repository.get_by_repo_name(repo_name) if not db_repo: - log.debug('Repository `%s` not found inside the database.') + log.debug('Repository `%s` not found inside the database.', + repo_name) return False if db_repo.repo_type != scm_type: diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -1054,8 +1054,10 @@ class PullRequestModel(BaseModel): ref_key = '%s:%s:%s' % (group_key, ref_name, ref_id) group_refs.append((ref_key, ref_name)) - if not selected and match in (ref_id, ref_name): - selected = ref_key + if not selected: + if set([commit_id, match]) & set([ref_id, ref_name]): + selected = ref_key + if group_refs: groups.append((group_refs, group_name)) diff --git a/rhodecode/public/css/code-block.less b/rhodecode/public/css/code-block.less --- a/rhodecode/public/css/code-block.less +++ b/rhodecode/public/css/code-block.less @@ -439,6 +439,11 @@ div.codeblock { padding: @padding; border-bottom: @border-thickness solid @grey5; + .rc-user { + min-width: 0; + margin-right: .5em; + } + .stats { clear: both; margin: 0 0 @padding 0; diff --git a/rhodecode/public/css/comments.less b/rhodecode/public/css/comments.less --- a/rhodecode/public/css/comments.less +++ b/rhodecode/public/css/comments.less @@ -52,6 +52,11 @@ tr.inline-comments div { padding: 4px 0 0 0; line-height: 1em; + .rc-user { + min-width: 0; + margin: -2px .5em 0 0; + } + .meta { position: relative; width: 100%; diff --git a/rhodecode/public/css/main.less b/rhodecode/public/css/main.less --- a/rhodecode/public/css/main.less +++ b/rhodecode/public/css/main.less @@ -671,6 +671,7 @@ label { } .rc-user { // gravatar + user wrapper + float: left; position: relative; min-width: 100px; max-width: 200px; @@ -1223,6 +1224,16 @@ table.issuetracker { max-width: 83%; padding-right: 20px; vertical-align: middle; + line-height: 1; + + .rc-user { + min-width: 0; + margin: -2px 1em 0 0; + } + + .reviewer { + float: left; + } } .reviewer_member_remove { @@ -1253,7 +1264,7 @@ table.issuetracker { } .pr-details-content { margin-top: @textmargin; - margin-bottom: @textmargin/2; + margin-bottom: @textmargin; } .pr-description { white-space:pre-wrap; diff --git a/rhodecode/templates/forks/forks_data.html b/rhodecode/templates/forks/forks_data.html --- a/rhodecode/templates/forks/forks_data.html +++ b/rhodecode/templates/forks/forks_data.html @@ -4,6 +4,7 @@ % if c.forks_pager: + @@ -13,7 +14,8 @@ +
${_('Owner')} ${_('Fork')} ${_('Description')} ${_('Forked')}
${base.gravatar_with_user(f.user.email, 16)} - ⁄ + ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))} diff --git a/rhodecode/templates/pullrequests/pullrequest_show.html b/rhodecode/templates/pullrequests/pullrequest_show.html --- a/rhodecode/templates/pullrequests/pullrequest_show.html +++ b/rhodecode/templates/pullrequests/pullrequest_show.html @@ -195,9 +195,9 @@
- - ${self.gravatar_with_user(member.email, 16)} - (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')}) +
+ ${self.gravatar_with_user(member.email, 16)}
(${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})
+
%if c.allowed_to_update: