# HG changeset patch # User Julien Cristau # Date 1392647570 -3600 # Node ID 39f981482e340e01552b0004a9046c5d7c589fd5 # Parent 78702b55c089ffa0c8f527275f1dea6f7cd630d4# Parent 79b9bf88be28add9f1b4a6aa3f6dba290a3aa8d4 merge 3.18.x in 3.19 branch diff -r 78702b55c089 -r 39f981482e34 .hgtags --- a/.hgtags Mon Feb 03 16:30:07 2014 +0100 +++ b/.hgtags Mon Feb 17 15:32:50 2014 +0100 @@ -323,9 +323,18 @@ 838d58a30f7efc6a8f83ac27ae8de7d79b84b2bb cubicweb-version-3.17.12 838d58a30f7efc6a8f83ac27ae8de7d79b84b2bb cubicweb-debian-version-3.17.12-1 838d58a30f7efc6a8f83ac27ae8de7d79b84b2bb cubicweb-centos-version-3.17.12-1 +09b4ebb9b0f179009491410c07cd013a60258fc6 cubicweb-version-3.17.13 +09b4ebb9b0f179009491410c07cd013a60258fc6 cubicweb-debian-version-3.17.13-1 +09b4ebb9b0f179009491410c07cd013a60258fc6 cubicweb-centos-version-3.17.13-1 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-version-3.18.0 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-debian-version-3.18.0-1 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-centos-version-3.18.0-1 60322cb8636c0402cdac025d3297626c41583023 cubicweb-version-3.18.1 60322cb8636c0402cdac025d3297626c41583023 cubicweb-debian-version-3.18.1-1 60322cb8636c0402cdac025d3297626c41583023 cubicweb-centos-version-3.18.1-1 +6880674c1a2669e3635abd688755116dda72e65e cubicweb-version-3.18.2 +6880674c1a2669e3635abd688755116dda72e65e cubicweb-debian-version-3.18.2-1 +6880674c1a2669e3635abd688755116dda72e65e cubicweb-centos-version-3.18.2-1 +afd21fea201a745051357b7aa6be3c7da1ae5bd2 cubicweb-version-3.18.3 +afd21fea201a745051357b7aa6be3c7da1ae5bd2 cubicweb-debian-version-3.18.3-1 +afd21fea201a745051357b7aa6be3c7da1ae5bd2 cubicweb-centos-version-3.18.3-1 diff -r 78702b55c089 -r 39f981482e34 __pkginfo__.py --- a/__pkginfo__.py Mon Feb 03 16:30:07 2014 +0100 +++ b/__pkginfo__.py Mon Feb 17 15:32:50 2014 +0100 @@ -22,14 +22,13 @@ modname = distname = "cubicweb" -numversion = (3, 18, 2) +numversion = (3, 18, 3) version = '.'.join(str(num) for num in numversion) description = "a repository of entities / relations for knowledge management" author = "Logilab" author_email = "contact@logilab.fr" web = 'http://www.cubicweb.org' -ftp = 'ftp://ftp.logilab.org/pub/cubicweb' license = 'LGPL' classifiers = [ diff -r 78702b55c089 -r 39f981482e34 _exceptions.py --- a/_exceptions.py Mon Feb 03 16:30:07 2014 +0100 +++ b/_exceptions.py Mon Feb 17 15:32:50 2014 +0100 @@ -180,9 +180,9 @@ :param txuuid: Unique identifier of the partialy undone transaction :type errors: list - :param errors: List of errors occured during undoing + :param errors: List of errors occurred during undoing """ - msg = u"The following error(s) occured while undoing transaction #%d : %s" + msg = u"The following error(s) occurred while undoing transaction #%d : %s" def __init__(self, txuuid, errors): super(UndoTransactionException, self).__init__(txuuid, errors) diff -r 78702b55c089 -r 39f981482e34 cubicweb.spec --- a/cubicweb.spec Mon Feb 03 16:30:07 2014 +0100 +++ b/cubicweb.spec Mon Feb 17 15:32:50 2014 +0100 @@ -7,7 +7,7 @@ %endif Name: cubicweb -Version: 3.18.2 +Version: 3.18.3 Release: logilab.1%{?dist} Summary: CubicWeb is a semantic web application framework Source0: http://download.logilab.org/pub/cubicweb/cubicweb-%{version}.tar.gz diff -r 78702b55c089 -r 39f981482e34 dataimport.py --- a/dataimport.py Mon Feb 03 16:30:07 2014 +0100 +++ b/dataimport.py Mon Feb 17 15:32:50 2014 +0100 @@ -873,7 +873,7 @@ return getattr(self, 'gen_%s' % rtype)(entity) def gen_cwuri(self, entity): - return u'%seid/%s' % (self.baseurl, entity.eid) + return u'%s%s' % (self.baseurl, entity.eid) def gen_creation_date(self, entity): return self.time @@ -1115,9 +1115,9 @@ def _handle_source_relation_sql(self, session, sql, attrs): self._append_to_entities(sql, attrs) - # XXX add_info is similar to the one in NativeSQLSource. It is rewritten - # here to correctly used the _handle_xxx of the SQLGenSourceWrapper. This - # part should be rewritten in a more clearly way. + # add_info is _copypasted_ from the one in NativeSQLSource. We want it + # there because it will use the _handlers of the SQLGenSourceWrapper, which + # are not like the ones in the native source. def add_info(self, session, entity, source, extid, complete): """add type and source info for an eid into the system table""" # begin by inserting eid/type/source/extid into the entities table diff -r 78702b55c089 -r 39f981482e34 debian/changelog --- a/debian/changelog Mon Feb 03 16:30:07 2014 +0100 +++ b/debian/changelog Mon Feb 17 15:32:50 2014 +0100 @@ -1,3 +1,9 @@ +cubicweb (3.18.3-1) unstable; urgency=low + + * new upstream release + + -- Julien Cristau Fri, 14 Feb 2014 16:03:55 +0100 + cubicweb (3.18.2-1) unstable; urgency=low * new upstream release. @@ -16,6 +22,12 @@ -- Julien Cristau Fri, 10 Jan 2014 17:14:18 +0100 +cubicweb (3.17.13-1) unstable; urgency=low + + * new upstream release + + -- Aurelien Campeas Mon, 10 Feb 2014 17:57:58 +0100 + cubicweb (3.17.12-1) unstable; urgency=low * new upstream release diff -r 78702b55c089 -r 39f981482e34 debian/control diff -r 78702b55c089 -r 39f981482e34 debian/copyright --- a/debian/copyright Mon Feb 03 16:30:07 2014 +0100 +++ b/debian/copyright Mon Feb 17 15:32:50 2014 +0100 @@ -1,5 +1,5 @@ This package was debianized by Logilab . -It was downloaded from ftp://ftp.logilab.org/pub/cubicweb +It was downloaded from http://download.logilab.org/pub/cubicweb Upstream Author: @@ -8,7 +8,7 @@ Copyright: - Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). + Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr License: diff -r 78702b55c089 -r 39f981482e34 devtools/devctl.py --- a/devtools/devctl.py Mon Feb 03 16:30:07 2014 +0100 +++ b/devtools/devctl.py Mon Feb 17 15:32:50 2014 +0100 @@ -619,7 +619,7 @@ % (cubesdir, err)) cubedir = osp.join(cubesdir, cubename) if osp.exists(cubedir): - self.fail("%s already exists !" % cubedir) + self.fail("%s already exists!" % cubedir) skeldir = osp.join(BASEDIR, 'skeleton') default_name = 'cubicweb-%s' % cubename.lower().replace('_', '-') if verbose: diff -r 78702b55c089 -r 39f981482e34 devtools/fill.py --- a/devtools/fill.py Mon Feb 03 16:30:07 2014 +0100 +++ b/devtools/fill.py Mon Feb 17 15:32:50 2014 +0100 @@ -384,10 +384,10 @@ def composite_relation(rschema): for obj in rschema.objects(): - if obj.rdef(rschema, 'object').composite == 'subject': + if obj.rdef(rschema, 'object', takefirst=True).composite == 'subject': return True for obj in rschema.subjects(): - if obj.rdef(rschema, 'subject').composite == 'object': + if obj.rdef(rschema, 'subject', takefirst=True).composite == 'object': return True return False diff -r 78702b55c089 -r 39f981482e34 doc/book/en/admin/ldap.rst --- a/doc/book/en/admin/ldap.rst Mon Feb 03 16:30:07 2014 +0100 +++ b/doc/book/en/admin/ldap.rst Mon Feb 17 15:32:50 2014 +0100 @@ -45,8 +45,27 @@ be overridden in some subsequent source synchronisation). -Configurations options of an LDAPfeed source --------------------------------------------- +Configuration of an LDAPfeed source +----------------------------------- + +Additional sources are created at cube creation time or later through the +user interface. + +Configure an `ldapfeed` source from the user interface under `Manage` then +`data sources`: + +* At this point `type` has been set to `ldapfeed`. + +* The `parser` attribute shall be set to `ldapfeed`. + +* The `url` attribute shall be set to an URL such as ldap://ldapserver.domain/. + +* The `configuration` attribute contains many options. They are described in + detail in the next paragraph. + + +Options of an LDAPfeed source +----------------------------- Let us enumerate the options by categories (LDAP server connection, LDAP schema mapping information). @@ -109,5 +128,5 @@ source, it (automatically) is activated again * You can use the :class:`CWSourceHostConfig` to have variants for a source - configuration according to the host the instance is running on. To do so go on - the source's view from the sources management view. + configuration according to the host the instance is running on. To do so + go on the source's view from the sources management view. diff -r 78702b55c089 -r 39f981482e34 doc/book/en/conf.py --- a/doc/book/en/conf.py Mon Feb 03 16:30:07 2014 +0100 +++ b/doc/book/en/conf.py Mon Feb 17 15:32:50 2014 +0100 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -65,7 +65,7 @@ # General substitutions. project = 'CubicWeb' -copyright = '2001-2011, Logilab' +copyright = '2001-2014, Logilab' # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. diff -r 78702b55c089 -r 39f981482e34 doc/book/en/devrepo/fti.rst --- a/doc/book/en/devrepo/fti.rst Mon Feb 03 16:30:07 2014 +0100 +++ b/doc/book/en/devrepo/fti.rst Mon Feb 17 15:32:50 2014 +0100 @@ -47,8 +47,8 @@ See :class:`~cubicweb.entities.adapters.IFTIndexableAdapter` for more documentation. -Yams and ``fultext_container`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Yams and ``fulltext_container`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It is possible in the datamodel to indicate that fulltext-indexed attributes defined for an entity type will be used to index not the diff -r 78702b55c089 -r 39f981482e34 etwist/server.py --- a/etwist/server.py Mon Feb 03 16:30:07 2014 +0100 +++ b/etwist/server.py Mon Feb 17 15:32:50 2014 +0100 @@ -238,6 +238,7 @@ key, pdict = parse_header(ctype) if key == 'application/x-www-form-urlencoded': self.args.update(http.parse_qs(self.content.read(), 1)) + self.content.seek(0) elif key == 'multipart/form-data': # defer this as it can be extremely time consumming # with big files diff -r 78702b55c089 -r 39f981482e34 etwist/test/data/views.py --- a/etwist/test/data/views.py Mon Feb 03 16:30:07 2014 +0100 +++ b/etwist/test/data/views.py Mon Feb 17 15:32:50 2014 +0100 @@ -22,7 +22,7 @@ class PutView(View): __regid__ = 'put' - __select__ = match_http_method('PUT') + __select__ = match_http_method('PUT') | match_http_method('POST') binary = True def call(self): diff -r 78702b55c089 -r 39f981482e34 etwist/test/unittest_server.py --- a/etwist/test/unittest_server.py Mon Feb 03 16:30:07 2014 +0100 +++ b/etwist/test/unittest_server.py Mon Feb 17 15:32:50 2014 +0100 @@ -17,6 +17,7 @@ # with CubicWeb. If not, see . import os, os.path as osp, glob +import urllib from cubicweb.devtools.testlib import CubicWebTC from cubicweb.devtools.httptest import CubicWebServerTC @@ -57,9 +58,14 @@ class ETwistHTTPTC(CubicWebServerTC): def test_put_content(self): - body = 'hop' + data = {'hip': 'hop'} + headers = {'Content-Type': 'application/x-www-form-urlencoded'} + body = urllib.urlencode(data) response = self.web_request('?vid=put', method='PUT', body=body) self.assertEqual(body, response.body) + response = self.web_request('?vid=put', method='POST', body=body, + headers=headers) + self.assertEqual(body, response.body) if __name__ == '__main__': from logilab.common.testlib import unittest_main diff -r 78702b55c089 -r 39f981482e34 ext/rest.py --- a/ext/rest.py Mon Feb 03 16:30:07 2014 +0100 +++ b/ext/rest.py Mon Feb 17 15:32:50 2014 +0100 @@ -127,7 +127,7 @@ view = _cw.vreg['views'].select(vid, _cw, rset=rset) content = view.render() except Exception as exc: - content = 'an error occured while interpreting this rql directive: %r' % exc + content = 'an error occurred while interpreting this rql directive: %r' % exc set_classes(options) return [nodes.raw('', content, format='html')], [] @@ -184,7 +184,7 @@ view = _cw.vreg['views'].select(vid, _cw, rset=rset) content = view.render() except Exception, exc: - content = 'An error occured while interpreting directive bookmark: %r' % exc + content = 'An error occurred while interpreting directive bookmark: %r' % exc set_classes(options) return [nodes.raw('', content, format='html')], [] diff -r 78702b55c089 -r 39f981482e34 ext/test/unittest_rest.py --- a/ext/test/unittest_rest.py Mon Feb 03 16:30:07 2014 +0100 +++ b/ext/test/unittest_rest.py Mon Feb 17 15:32:50 2014 +0100 @@ -68,7 +68,7 @@ def test_rql_role_with_unknown_vid(self): context = self.context() out = rest_publish(context, ':rql:`Any X WHERE X is CWUser:toto`') - self.assertTrue(out.startswith("

an error occured while interpreting this rql directive: ObjectNotFound(u'toto',)

")) + self.assertTrue(out.startswith("

an error occurred while interpreting this rql directive: ObjectNotFound(u'toto',)

")) def test_rql_role_without_vid(self): context = self.context() diff -r 78702b55c089 -r 39f981482e34 hooks/security.py diff -r 78702b55c089 -r 39f981482e34 i18n/de.po --- a/i18n/de.po Mon Feb 03 16:30:07 2014 +0100 +++ b/i18n/de.po Mon Feb 17 15:32:50 2014 +0100 @@ -468,7 +468,7 @@ msgid "Detected problems" msgstr "" -msgid "Do you want to delete the following element(s) ?" +msgid "Do you want to delete the following element(s)?" msgstr "Wollen Sie das/die folgend(n) Element(e) löschen?" msgid "Download schema as OWL" @@ -4501,8 +4501,8 @@ msgstr "Mittwoch" #, python-format -msgid "welcome %s !" -msgstr "Willkommen %s !" +msgid "welcome %s!" +msgstr "Willkommen %s!" msgid "wf_info_for" msgstr "Chronik von" @@ -4595,115 +4595,3 @@ #, python-format msgid "you should un-inline relation %s which is supported and may be crossed " msgstr "" - -#~ msgid "%(cstr)s constraint failed for value %(value)r" -#~ msgstr "%(cstr)s Einschränkung verletzt für Wert %(value)r" - -#~ msgid "%(value)r doesn't match the %(regexp)r regular expression" -#~ msgstr "%(value)r entspricht nicht dem regulären Ausdruck %(regexp)r" - -#~ msgid "%s not estimated" -#~ msgstr "%s unbekannt(e)" - -#~ msgid "" -#~ "Can't restore relation %(rtype)s of entity %(eid)s, this relation does " -#~ "not exists anymore in the schema." -#~ msgstr "" -#~ "Kann die Relation %(rtype)s der Entität %(eid)s nicht wieder herstellen, " -#~ "diese Relation existiert nicht mehr in dem Schema." - -#~ msgid "Data connection graph for %s" -#~ msgstr "Graf der Datenverbindungen für %s" - -#~ msgid "From:" -#~ msgstr "Von:" - -#~ msgid "Got rhythm?" -#~ msgstr "Hast Du Rhythmus ?" - -#~ msgid "Recipients:" -#~ msgstr "Adressaten:" - -#~ msgid "Subject:" -#~ msgstr "Subjekt :" - -#~ msgid "What's new?" -#~ msgstr "Was ist neu?" - -#~ msgid "You can use any of the following substitutions in your text" -#~ msgstr "Sie können die folgenden Ersetzungen in Ihrem Text verwenden:" - -#~ msgid "can't change the %s attribute" -#~ msgstr "Kann das Attribut %s nicht ändern." - -#~ msgid "cost" -#~ msgstr "Kosten" - -#~ msgid "emails successfully sent" -#~ msgstr "E-Mails erfolgreich versandt." - -#~ msgid "embed" -#~ msgstr "einbetten" - -#~ msgid "embedding this url is forbidden" -#~ msgstr "Einbettung dieses URLs ist nicht erlaubt." - -#~ msgid "error while embedding page" -#~ msgstr "Fehler beim Einbetten der Seite" - -#~ msgid "eta_date" -#~ msgstr "Enddatum" - -#~ msgid "expected:" -#~ msgstr "erwartet:" - -#~ msgid "external page" -#~ msgstr "externe Seite" - -#~ msgid "incorrect value (%(value)s) for type \"%(type)s\"" -#~ msgstr "Wert %(value)s ungültig für den Typ \"%(type)s\"" - -#~ msgid "initial estimation %s" -#~ msgstr "Erste Schätzung %s" - -#~ msgid "invalid value %(value)s, it must be one of %(choices)s" -#~ msgstr "Wert %(value)s ungültig, er muss zwischen %(choices)s" - -#~ msgid "milestone" -#~ msgstr "Meilenstein" - -#~ msgid "no related project" -#~ msgstr "kein verknüpftes Projekt" - -#~ msgid "progress" -#~ msgstr "Fortschritt" - -#~ msgid "progress bar" -#~ msgstr "Fortschrittsbalken" - -#~ msgid "project" -#~ msgstr "Projekt" - -#~ msgid "send email" -#~ msgstr "E-Mail senden" - -#~ msgid "sioc" -#~ msgstr "sioc" - -#~ msgid "task progression" -#~ msgstr "Fortschritt der Aufgabe" - -#~ msgid "todo_by" -#~ msgstr "zu erledigen bis" - -#~ msgid "toggle filter" -#~ msgstr "filter verbergen/zeigen" - -#~ msgid "violates unique_together constraints (%s)" -#~ msgstr "Verletzung der unique_together-Einschränkung (%s)" - -#~ msgid "workflow already have a state of that name" -#~ msgstr "Der Workflow hat bereits einen Zustand desselben Namens." - -#~ msgid "workflow already have a transition of that name" -#~ msgstr "Der Workflow hat bereits einen Übergang desselben Namens." diff -r 78702b55c089 -r 39f981482e34 i18n/en.po --- a/i18n/en.po Mon Feb 03 16:30:07 2014 +0100 +++ b/i18n/en.po Mon Feb 17 15:32:50 2014 +0100 @@ -446,7 +446,7 @@ msgid "Detected problems" msgstr "" -msgid "Do you want to delete the following element(s) ?" +msgid "Do you want to delete the following element(s)?" msgstr "" msgid "Download schema as OWL" @@ -4390,7 +4390,7 @@ msgstr "" #, python-format -msgid "welcome %s !" +msgid "welcome %s!" msgstr "" msgid "wf_info_for" @@ -4482,12 +4482,3 @@ #, python-format msgid "you should un-inline relation %s which is supported and may be crossed " msgstr "" - -#~ msgid "eta_date" -#~ msgstr "ETA date" - -#~ msgid "todo_by" -#~ msgstr "to do by" - -#~ msgid "violates unique_together constraints (%s)" -#~ msgstr "violates unique_together constraints (%s)" diff -r 78702b55c089 -r 39f981482e34 i18n/es.po --- a/i18n/es.po Mon Feb 03 16:30:07 2014 +0100 +++ b/i18n/es.po Mon Feb 17 15:32:50 2014 +0100 @@ -468,7 +468,7 @@ msgid "Detected problems" msgstr "Problemas detectados" -msgid "Do you want to delete the following element(s) ?" +msgid "Do you want to delete the following element(s)?" msgstr "Desea eliminar el(los) elemento(s) siguiente(s)" msgid "Download schema as OWL" @@ -4547,8 +4547,8 @@ msgstr "Miércoles" #, python-format -msgid "welcome %s !" -msgstr "¡ Bienvenido %s !" +msgid "welcome %s!" +msgstr "¡ Bienvenido %s !" msgid "wf_info_for" msgstr "Histórico de" @@ -4644,123 +4644,3 @@ msgstr "" "usted debe quitar la puesta en línea de la relación %s que es aceptada y " "puede ser cruzada" - -#~ msgid "%(cstr)s constraint failed for value %(value)r" -#~ msgstr "el valor %(value)r no satisface la condición %(cstr)s" - -#~ msgid "%(value)r doesn't match the %(regexp)r regular expression" -#~ msgstr "%(value)r no corresponde a la expresión regular %(regexp)r" - -#~ msgid "%s not estimated" -#~ msgstr "%s no estimado(s)" - -#~ msgid "" -#~ "Can't restore relation %(rtype)s of entity %(eid)s, this relation does " -#~ "not exists anymore in the schema." -#~ msgstr "" -#~ "No puede restaurar la relación %(rtype)s de la entidad %(eid)s, esta " -#~ "relación ya no existe en el esquema." - -#~ msgid "Data connection graph for %s" -#~ msgstr "Gráfica de conexión de datos para %s" - -#~ msgid "From:" -#~ msgstr "De: " - -#~ msgid "Got rhythm?" -#~ msgstr "Tenemos Ritmo?" - -#~ msgid "Recipients:" -#~ msgstr "Destinatarios :" - -#~ msgid "Subject:" -#~ msgstr "Sujeto:" - -#~ msgid "What's new?" -#~ msgstr "Lo más reciente" - -#~ msgid "You can use any of the following substitutions in your text" -#~ msgstr "" -#~ "Puede realizar cualquiera de las siguientes sustituciones en el contenido " -#~ "de su email." - -#~ msgid "can't change the %s attribute" -#~ msgstr "no puede modificar el atributo %s" - -#~ msgid "can't change this relation" -#~ msgstr "no puede modificar esta relación" - -#~ msgid "cost" -#~ msgstr "Costo" - -#~ msgid "emails successfully sent" -#~ msgstr "Mensajes enviados con éxito" - -#~ msgid "embed" -#~ msgstr "Incrustado" - -#~ msgid "embedding this url is forbidden" -#~ msgstr "La inclusión de este url esta prohibida" - -#~ msgid "error while embedding page" -#~ msgstr "Error durante la inclusión de la página" - -#~ msgid "eta_date" -#~ msgstr "Fecha de fin" - -#~ msgid "expected:" -#~ msgstr "Previsto :" - -#~ msgid "external page" -#~ msgstr "Página externa" - -#~ msgid "incorrect value (%(value)s) for type \"%(type)s\"" -#~ msgstr "valor %(value)s incorrecto para el tipo \"%(type)s\"" - -#~ msgid "initial estimation %s" -#~ msgstr "Estimación inicial %s" - -#~ msgid "invalid value %(value)s, it must be one of %(choices)s" -#~ msgstr "Valor %(value)s incorrecto, debe estar entre %(choices)s" - -#~ msgid "milestone" -#~ msgstr "Milestone" - -#~ msgid "no related project" -#~ msgstr "No tiene proyecto relacionado" - -#~ msgid "progress" -#~ msgstr "Progreso" - -#~ msgid "progress bar" -#~ msgstr "Barra de Progreso" - -#~ msgid "project" -#~ msgstr "Proyecto" - -#~ msgid "send email" -#~ msgstr "Enviar email" - -#~ msgid "sioc" -#~ msgstr "SIOC" - -#~ msgid "task progression" -#~ msgstr "Progreso de la Acción" - -#~ msgid "todo_by" -#~ msgstr "Asignada a" - -#~ msgid "toggle filter" -#~ msgstr "esconder/mostrar el filtro" - -#~ msgid "unknown source type" -#~ msgstr "tipo de fuente desconocida" - -#~ msgid "violates unique_together constraints (%s)" -#~ msgstr "viola el principio (o restricción) de singularidad (%s)" - -#~ msgid "workflow already have a state of that name" -#~ msgstr "El Workflow ya tiene un Estado con ese nombre" - -#~ msgid "workflow already have a transition of that name" -#~ msgstr "El Workflow ya tiene una transición con ese nombre" diff -r 78702b55c089 -r 39f981482e34 i18n/fr.po --- a/i18n/fr.po Mon Feb 03 16:30:07 2014 +0100 +++ b/i18n/fr.po Mon Feb 17 15:32:50 2014 +0100 @@ -471,7 +471,7 @@ msgid "Detected problems" msgstr "Problèmes détectés" -msgid "Do you want to delete the following element(s) ?" +msgid "Do you want to delete the following element(s)?" msgstr "Voulez-vous supprimer le(s) élément(s) suivant(s) ?" msgid "Download schema as OWL" @@ -4569,7 +4569,7 @@ msgstr "mercredi" #, python-format -msgid "welcome %s !" +msgid "welcome %s!" msgstr "bienvenue %s !" msgid "wf_info_for" diff -r 78702b55c089 -r 39f981482e34 misc/migration/3.18.0_Any.py --- a/misc/migration/3.18.0_Any.py Mon Feb 03 16:30:07 2014 +0100 +++ b/misc/migration/3.18.0_Any.py Mon Feb 17 15:32:50 2014 +0100 @@ -138,4 +138,7 @@ # all attributes perms have to be refreshed ... for rschema in schema.relations(): if rschema.final: - sync_schema_props_perms(rschema.type, syncprops=False) + if rschema.type in fsschema: + sync_schema_props_perms(rschema.type, syncprops=False, ask_confirm=False) + else: + print 'WARNING: attribute %s missing from fs schema' % rschema.type diff -r 78702b55c089 -r 39f981482e34 misc/migration/3.18.4_Any.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/migration/3.18.4_Any.py Mon Feb 17 15:32:50 2014 +0100 @@ -0,0 +1,2 @@ +sync_schema_props_perms('CWSource') +sync_schema_props_perms('CWSourceHostConfig') diff -r 78702b55c089 -r 39f981482e34 misc/migration/bootstrapmigration_repository.py --- a/misc/migration/bootstrapmigration_repository.py Mon Feb 03 16:30:07 2014 +0100 +++ b/misc/migration/bootstrapmigration_repository.py Mon Feb 17 15:32:50 2014 +0100 @@ -157,7 +157,7 @@ type, source, extid = session.describe(eid) if source == 'system': rql('SET X cwuri %(u)s WHERE X eid %(x)s', - {'x': eid, 'u': base_url + u'eid/%s' % eid}) + {'x': eid, 'u': u'%s%s' % (base_url, eid)}) isession.commit() session.set_shared_data('do-not-insert-cwuri', False) diff -r 78702b55c089 -r 39f981482e34 misc/scripts/chpasswd.py --- a/misc/scripts/chpasswd.py Mon Feb 03 16:30:07 2014 +0100 +++ b/misc/scripts/chpasswd.py Mon Feb 17 15:32:50 2014 +0100 @@ -26,15 +26,15 @@ if __args__: login = __args__.pop() else: - login = raw_input("login ? ") + login = raw_input("login? ") rset = rql('Any U WHERE U is CWUser, U login %(login)s', {'login': login}) if len(rset) != 1: sys.exit("user '%s' does not exist!" % login) -pass1 = getpass.getpass(prompt='Enter new password ? ') -pass2 = getpass.getpass(prompt='Confirm ? ') +pass1 = getpass.getpass(prompt='Enter new password? ') +pass2 = getpass.getpass(prompt='Confirm? ') if pass1 != pass2: sys.exit("passwords don't match!") diff -r 78702b55c089 -r 39f981482e34 misc/scripts/ldapuser2ldapfeed.py --- a/misc/scripts/ldapuser2ldapfeed.py Mon Feb 03 16:30:07 2014 +0100 +++ b/misc/scripts/ldapuser2ldapfeed.py Mon Feb 17 15:32:50 2014 +0100 @@ -90,7 +90,7 @@ source_ent.cw_set(type=u"ldapfeed", parser=u"ldapfeed") -if raw_input('Commit ?') in 'yY': +if raw_input('Commit?') in 'yY': print 'committing' commit() else: diff -r 78702b55c089 -r 39f981482e34 schemas/base.py --- a/schemas/base.py Mon Feb 03 16:30:07 2014 +0100 +++ b/schemas/base.py Mon Feb 17 15:32:50 2014 +0100 @@ -247,6 +247,7 @@ 'source\'s type'), __permissions__={ 'read': ('managers',), + 'add': ('managers',), 'update': ('managers',), }) # put this here and not in a subclass even if it's only for some sources @@ -284,6 +285,7 @@ 'values defined on the source.'), __permissions__={ 'read': ('managers',), + 'add': ('managers',), 'update': ('managers',), }) diff -r 78702b55c089 -r 39f981482e34 server/checkintegrity.py --- a/server/checkintegrity.py Mon Feb 03 16:30:07 2014 +0100 +++ b/server/checkintegrity.py Mon Feb 17 15:32:50 2014 +0100 @@ -55,8 +55,8 @@ eids[eid] = False return False elif len(result) > 1: - msg = (' More than one entity with eid %s exists in source !\n' - ' WARNING : Unable to fix this, do it yourself !\n') + msg = (' More than one entity with eid %s exists in source!\n' + ' WARNING : Unable to fix this, do it yourself!\n') sys.stderr.write(msg % eid) eids[eid] = True return True diff -r 78702b55c089 -r 39f981482e34 server/rqlannotation.py --- a/server/rqlannotation.py Mon Feb 03 16:30:07 2014 +0100 +++ b/server/rqlannotation.py Mon Feb 17 15:32:50 2014 +0100 @@ -35,15 +35,6 @@ #if server.DEBUG: # print '-------- sql annotate', repr(rqlst) getrschema = annotator.schema.rschema - need_distinct = rqlst.distinct - for rel in rqlst.iget_nodes(Relation): - if getrschema(rel.r_type).symmetric and not isinstance(rel.parent, Exists): - for vref in rel.iget_nodes(VariableRef): - stinfo = vref.variable.stinfo - if not stinfo['constnode'] and stinfo['selected']: - need_distinct = True - # XXX could mark as not invariant - break for var in rqlst.defined_vars.itervalues(): stinfo = var.stinfo if stinfo.get('ftirels'): @@ -158,7 +149,6 @@ for col_alias in rqlst.aliases.itervalues(): if col_alias.stinfo.get('ftirels'): has_text_query = True - rqlst.need_distinct = need_distinct return has_text_query diff -r 78702b55c089 -r 39f981482e34 server/session.py --- a/server/session.py Mon Feb 03 16:30:07 2014 +0100 +++ b/server/session.py Mon Feb 17 15:32:50 2014 +0100 @@ -1740,7 +1740,7 @@ class InternalSession(Session): - """special session created internaly by the repository""" + """special session created internally by the repository""" is_internal_session = True running_dbapi_query = False diff -r 78702b55c089 -r 39f981482e34 server/sources/__init__.py diff -r 78702b55c089 -r 39f981482e34 server/sources/datafeed.py --- a/server/sources/datafeed.py Mon Feb 03 16:30:07 2014 +0100 +++ b/server/sources/datafeed.py Mon Feb 17 15:32:50 2014 +0100 @@ -192,7 +192,7 @@ myuris = self.source_cwuris(session) parser = self._get_parser(session, sourceuris=myuris, import_log=importlog) if self.process_urls(parser, self.urls, raise_on_error): - self.warning("some error occured, don't attempt to delete entities") + self.warning("some error occurred, don't attempt to delete entities") else: parser.handle_deletion(self.config, session, myuris) self.update_latest_retrieval(session) diff -r 78702b55c089 -r 39f981482e34 server/sources/native.py --- a/server/sources/native.py Mon Feb 03 16:30:07 2014 +0100 +++ b/server/sources/native.py Mon Feb 17 15:32:50 2014 +0100 @@ -372,7 +372,7 @@ self._eid_creation_cnx.close() self._eid_creation_cnx = None - # XXX deprecates [un]map_attribute ? + # XXX deprecates [un]map_attribute? def map_attribute(self, etype, attr, cb, sourcedb=True): self._rql_sqlgen.attr_map['%s.%s' % (etype, attr)] = (cb, sourcedb) diff -r 78702b55c089 -r 39f981482e34 server/sources/rql2sql.py --- a/server/sources/rql2sql.py Mon Feb 03 16:30:07 2014 +0100 +++ b/server/sources/rql2sql.py Mon Feb 17 15:32:50 2014 +0100 @@ -116,7 +116,6 @@ continue unstable.remove(varname) newselect = Select() - newselect.need_distinct = False myunion = Union() myunion.append(newselect) # extract aliases / selection @@ -688,7 +687,7 @@ Groups and sort are not handled here since they should not be handled at this level (see cubicweb.server.querier) - we should not have errors here ! + we should not have errors here! WARNING: a CubicWebSQLGenerator instance is not thread safe, but generate is protected by a lock @@ -703,9 +702,6 @@ } if not self.dbhelper.union_parentheses_support: self.union_sql = self.noparen_union_sql - if self.dbhelper.fti_need_distinct: - self.__union_sql = self.union_sql - self.union_sql = self.has_text_need_distinct_union_sql self._lock = threading.Lock() if attrmap is None: attrmap = {} @@ -739,12 +735,6 @@ finally: self._lock.release() - def has_text_need_distinct_union_sql(self, union, needalias=False): - if getattr(union, 'has_text_query', False): - for select in union.children: - select.need_distinct = True - return self.__union_sql(union, needalias) - def union_sql(self, union, needalias=False): # pylint: disable=E0202 if len(union.children) == 1: return self.select_sql(union.children[0], needalias) @@ -772,7 +762,12 @@ :needwrap: boolean telling if the query will be wrapped in an outer query (to deal with aggregat and/or grouping) """ - distinct = selectsortterms = select.need_distinct + if select.distinct: + distinct = True + elif self.dbhelper.fti_need_distinct: + distinct = getattr(select.parent, 'has_text_query', False) + else: + distinct = False sorts = select.orderby groups = select.groupby having = select.having @@ -796,6 +791,7 @@ # selection (union or distinct query) and wrapping (union with groups) needwrap = False sols = select.solutions + selectsortterms = distinct if len(sols) > 1: # remove invariant from solutions sols, existssols, unstable = remove_unused_solutions( diff -r 78702b55c089 -r 39f981482e34 server/test/unittest_querier.py --- a/server/test/unittest_querier.py Mon Feb 03 16:30:07 2014 +0100 +++ b/server/test/unittest_querier.py Mon Feb 17 15:32:50 2014 +0100 @@ -706,17 +706,17 @@ self.execute("INSERT Personne X: X nom 'trucmuche'") self.execute("SET X connait Y WHERE X nom 'chouette', Y nom 'bidule'") self.execute("SET X connait Y WHERE X nom 'machin', Y nom 'chouette'") - rset = self.execute('Any P where P connait P2') - self.assertEqual(len(rset.rows), 3, rset.rows) - rset = self.execute('Any P where NOT P connait P2') + rset = self.execute('Any P WHERE P connait P2') + self.assertEqual(len(rset.rows), 4, rset.rows) + rset = self.execute('Any P WHERE NOT P connait P2') self.assertEqual(len(rset.rows), 1, rset.rows) # trucmuche - rset = self.execute('Any P where P connait P2, P2 nom "bidule"') + rset = self.execute('Any P WHERE P connait P2, P2 nom "bidule"') self.assertEqual(len(rset.rows), 1, rset.rows) - rset = self.execute('Any P where P2 connait P, P2 nom "bidule"') + rset = self.execute('Any P WHERE P2 connait P, P2 nom "bidule"') self.assertEqual(len(rset.rows), 1, rset.rows) - rset = self.execute('Any P where P connait P2, P2 nom "chouette"') + rset = self.execute('Any P WHERE P connait P2, P2 nom "chouette"') self.assertEqual(len(rset.rows), 2, rset.rows) - rset = self.execute('Any P where P2 connait P, P2 nom "chouette"') + rset = self.execute('Any P WHERE P2 connait P, P2 nom "chouette"') self.assertEqual(len(rset.rows), 2, rset.rows) def test_select_inline(self): diff -r 78702b55c089 -r 39f981482e34 setup.py --- a/setup.py Mon Feb 03 16:30:07 2014 +0100 +++ b/setup.py Mon Feb 17 15:32:50 2014 +0100 @@ -188,7 +188,7 @@ MyInstallMoreData.run(self) self.install_dir = _old_install_dir try: - import setuptools.command.easy_install # only if easy_install avaible + import setuptools.command.easy_install # only if easy_install available # monkey patch: Crack SandboxViolation verification from setuptools.sandbox import DirectorySandbox as DS old_ok = DS._ok diff -r 78702b55c089 -r 39f981482e34 skeleton/setup.py --- a/skeleton/setup.py Mon Feb 03 16:30:07 2014 +0100 +++ b/skeleton/setup.py Mon Feb 17 15:32:50 2014 +0100 @@ -150,7 +150,7 @@ old_install_data.run(self) self.install_dir = _old_install_dir try: - import setuptools.command.easy_install # only if easy_install avaible + import setuptools.command.easy_install # only if easy_install available # monkey patch: Crack SandboxViolation verification from setuptools.sandbox import DirectorySandbox as DS old_ok = DS._ok diff -r 78702b55c089 -r 39f981482e34 sobjects/ldapparser.py --- a/sobjects/ldapparser.py Mon Feb 03 16:30:07 2014 +0100 +++ b/sobjects/ldapparser.py Mon Feb 17 15:32:50 2014 +0100 @@ -201,7 +201,7 @@ {'addr': emailaddr}) if not rset: # not found, create it. first forge an external id - emailextid = userdict['dn'] + '@@' + emailaddr + emailextid = userdict['dn'] + '@@' + emailaddr.encode('utf-8') email = self.extid2entity(emailextid, 'EmailAddress', address=emailaddr) entity.cw_set(use_email=email) diff -r 78702b55c089 -r 39f981482e34 uilib.py --- a/uilib.py Mon Feb 03 16:30:07 2014 +0100 +++ b/uilib.py Mon Feb 17 15:32:50 2014 +0100 @@ -215,7 +215,7 @@ ALLOWED_TAGS = (defs.general_block_tags | defs.list_tags | defs.table_tags | defs.phrase_tags | defs.font_style_tags | - set(('span', 'a', 'br', 'img', 'map', 'area', 'sub', 'sup')) + set(('span', 'a', 'br', 'img', 'map', 'area', 'sub', 'sup', 'canvas')) ) CLEANER = clean.Cleaner(allow_tags=ALLOWED_TAGS, remove_unknown_tags=False, diff -r 78702b55c089 -r 39f981482e34 utils.py --- a/utils.py Mon Feb 03 16:30:07 2014 +0100 +++ b/utils.py Mon Feb 17 15:32:50 2014 +0100 @@ -375,9 +375,9 @@ if skiphead: # Don't insert \n' % _('this action is not reversible!')) # XXX above message should have style of a warning - w(u'

%s

\n' % _('Do you want to delete the following element(s) ?')) + w(u'

%s

\n' % _('Do you want to delete the following element(s)?')) form = self._cw.vreg['forms'].select(self.__regid__, req, rset=self.cw_rset, onsubmit=onsubmit) diff -r 78702b55c089 -r 39f981482e34 web/views/facets.py --- a/web/views/facets.py Mon Feb 03 16:30:07 2014 +0100 +++ b/web/views/facets.py Mon Feb 17 15:32:50 2014 +0100 @@ -143,7 +143,7 @@ :param vid: ID of the view display in the div :type vid: string - :param paginate: Is the view paginated ? + :param paginate: Is the view paginated? :type paginate: boolean :param cssclass: Additional css classes to put on the form. diff -r 78702b55c089 -r 39f981482e34 web/views/json.py --- a/web/views/json.py Mon Feb 03 16:30:07 2014 +0100 +++ b/web/views/json.py Mon Feb 17 15:32:50 2014 +0100 @@ -93,7 +93,7 @@ title = _('json-export-view') def call(self): - # XXX mimic w3c recommandations to serialize SPARQL results in json ? + # XXX mimic w3c recommandations to serialize SPARQL results in json? # http://www.w3.org/TR/rdf-sparql-json-res/ self.wdata(self.cw_rset.rows) diff -r 78702b55c089 -r 39f981482e34 web/views/navigation.py --- a/web/views/navigation.py Mon Feb 03 16:30:07 2014 +0100 +++ b/web/views/navigation.py Mon Feb 17 15:32:50 2014 +0100 @@ -55,6 +55,7 @@ from logilab.mtconverter import xml_escape from logilab.common.deprecation import deprecated +from cubicweb.utils import json_dumps from cubicweb.predicates import paginated_rset, sorted_rset, adaptable from cubicweb.uilib import cut from cubicweb.view import EntityAdapter @@ -280,6 +281,13 @@ nav = req.vreg['components'].select_or_none( 'navigation', req, rset=rset, page_size=page_size, view=view) if nav: + domid = getattr(view, 'domid', 'pageContent') + view._cw.add_onload(''' + jQuery('div.displayAllLink a, div.pagination a').click(function() { + cw.jqNode(%s).loadxhtml(this.href, null, 'get', 'swap'); + return false; + }); + ''' % json_dumps(domid)) if w is None: w = view.w if req.form.get('__force_display'): diff -r 78702b55c089 -r 39f981482e34 web/views/reledit.py --- a/web/views/reledit.py Mon Feb 03 16:30:07 2014 +0100 +++ b/web/views/reledit.py Mon Feb 17 15:32:50 2014 +0100 @@ -258,7 +258,7 @@ _new_entity.eid = self._cw.varmaker.next() edit_entity = _new_entity # XXX see forms.py ~ 276 and entities.linked_to method - # is there another way ? + # is there another way? self._cw.form['__linkto'] = '%s:%s:%s' % (rschema, entity.eid, neg_role(role)) assert edit_entity return label, edit_entity diff -r 78702b55c089 -r 39f981482e34 web/views/sessions.py --- a/web/views/sessions.py Mon Feb 03 16:30:07 2014 +0100 +++ b/web/views/sessions.py Mon Feb 17 15:32:50 2014 +0100 @@ -88,7 +88,7 @@ # reopening. Is it actually a problem? if 'last_login_time' in req.vreg.schema: self._update_last_login_time(session) - req.set_message(req._('welcome %s !') % session.user.login) + req.set_message(req._('welcome %s!') % session.user.login) def _update_last_login_time(self, session): # XXX should properly detect missing permission / non writeable source diff -r 78702b55c089 -r 39f981482e34 web/views/tableview.py --- a/web/views/tableview.py Mon Feb 03 16:30:07 2014 +0100 +++ b/web/views/tableview.py Mon Feb 17 15:32:50 2014 +0100 @@ -1068,7 +1068,7 @@ """Build an url to the current view using the attributes :param navcomp: a NavigationComponent to call an url method on. - :param path: expected to be json here ? + :param path: expected to be json here? :param params: params to give to build_url method this is called by :class:`cubiweb.web.component.NavigationComponent` diff -r 78702b55c089 -r 39f981482e34 web/views/urlrewrite.py --- a/web/views/urlrewrite.py Mon Feb 03 16:30:07 2014 +0100 +++ b/web/views/urlrewrite.py Mon Feb 17 15:32:50 2014 +0100 @@ -127,7 +127,7 @@ req.form.update(infos) break elif inputurl.match(uri): # it's a regexp - # XXX what about i18n ? (vtitle for instance) + # XXX what about i18n? (vtitle for instance) for param, value in infos.items(): if isinstance(value, basestring): req.form[param] = inputurl.sub(value, uri)