1. 19 Jun, 2017 2 commits
  2. 28 Apr, 2017 1 commit
    • Philippe Pepiot's avatar
      [req] fix find() generating non-rewritable rql on non final relations · af5d0a3c3f1a
      Philippe Pepiot authored
      When filtering on a relation, find() was generating rql like
      'Any X WHERE X is ETYPE, X relation EID' which work without being rewritten (it
      should probably not), but when applying some rewrite (eg. permissions) it raise
      in rqlrewrite code.
      
      	def _use_orig_term(self, snippet_varname, term):
      			...
      	>       self.rewritten[key] = term.name
      	E       AttributeError: 'Constant' object has no attribute 'name'
      
      
      Generate valid rql instead 'Any X WHERE X is ETYPE, X relation Y, Y eid EID'.
      af5d0a3c3f1a
  3. 26 Apr, 2017 1 commit
  4. 25 Apr, 2017 3 commits
  5. 21 Apr, 2017 2 commits
  6. 25 Apr, 2017 1 commit
  7. 20 Apr, 2017 1 commit
  8. 21 Apr, 2017 1 commit
    • Sylvain Thénault's avatar
      [rqlrewrite] Fix rewrite on ambiguities introduced by NOT relation or "is IN" type restriction · 02b8325720d6
      Sylvain Thénault authored
      When some inserted RQL snippet generate more solutions than the original RQL,
      the rewriter attempt to duplicate the snippet for each newly introduced
      solution. There are though some cases where we do not want this behaviour in
      case of ambiguities introduced by:
      
      * NOT(X relation Y) expression, since it won't be
        equivalent to NOT(X relation Y1, Y1 is Type1) OR NOT(X relation Y2, Y2 is
        Type2) ;
      
      * EXISTS(X relation Y, Y is IN (Type1, Type2) expression, since it's not
        actually necessary to split an explicitly introduced ambiguity (and it crash
        if we attempt to do so, so...).
      
      In test, we've to modify the `rewrite()` function because in the newly
      introduced test we need the same constraint to be applied to two variables in
      the original query, and this was not supported before.
      
      Notice the generated RQL in test is still *NOT CORRECT* "(EXISTS(NOT EXISTS() OR
      EXISTS(...))", or at least isn't optimal. This will be fixed in a forthcoming
      changeset.
      
      Related to #17074119
      02b8325720d6
  9. 19 Apr, 2017 1 commit
  10. 20 Apr, 2017 1 commit
  11. 19 Apr, 2017 5 commits
  12. 14 Apr, 2017 4 commits
  13. 13 Apr, 2017 3 commits
    • Sylvain Thénault's avatar
      [entities] Fix backward compat of IDublinCore adapter wrt dc_long_title · 608481168432
      Sylvain Thénault authored
      `entity.dc_long_title()` used to fallback to `dc_title()`, and most entity types
      were relying on this, thus only implementing the later.
      
      Since introduction of the IDublinCore adapter, if one call
      `entity.dc_long_title()` on an entity that only implements `dc_title()`, it will retrieve
      the adapter which will then call its own `title()` method instead of the
      `dc_title()` method of the entity as expected.
      
      Fix this by calling instead `entity.dc_title()` which will eventually kick in the
      backward compat layer if necessary.
      
      --HG--
      branch : 3.25
      608481168432
    • Denis Laxalde's avatar
      [web] Do not try to rmtree symlinks in rmtreecontent() · 8a1306c43656
      Denis Laxalde authored
      There is a symlink in data directory (created by generate_static_dir() method)
      and trying to rmtree() it will fail with an OSError. So we unlink() it
      instead.
      
      --HG--
      branch : 3.25
      8a1306c43656
    • Denis Laxalde's avatar
      [pkg] Version 3.25.0rc3 · 241bb09c67f7
      Denis Laxalde authored
      --HG--
      branch : 3.25
      241bb09c67f7
  14. 12 Apr, 2017 11 commits
  15. 05 Apr, 2017 1 commit
    • Denis Laxalde's avatar
      [server] Add source_by_eid and source_by_uri methods to repository · d540defa0591
      Denis Laxalde authored
      Most of the times we only need to retrieve one source (either by uri or eid)
      and querying sources_by_eid and sources_by_uri properties on repository just
      for one item is costly. So these methods query what's needed. We issue a
      ValueError (instead of KeyError for sources_by_{eid,uri} dict) in case the key
      is not found.
      
      --HG--
      branch : 3.25
      d540defa0591
  16. 04 Apr, 2017 1 commit
  17. 05 Apr, 2017 1 commit