Merge lp:~paul-lucas/zorba/bug-888242 into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 10909
Merged at revision: 10920
Proposed branch: lp:~paul-lucas/zorba/bug-888242
Merge into: lp:zorba
Diff against target: 85 lines (+22/-9)
3 files modified
src/compiler/translator/translator.cpp (+12/-3)
src/runtime/full_text/apply.cpp (+1/-2)
src/runtime/full_text/thesaurus.cpp (+9/-4)
To merge this branch: bzr merge lp:~paul-lucas/zorba/bug-888242
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+113130@code.launchpad.net

Commit message

Moved URI resolution for the thesaurus into the translator.

Description of the change

Moved URI resolution for the thesaurus into the translator.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-888242-2012-07-03T00-03-01.855Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-888242 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-888242-2012-07-09T17-18-00.226Z is finished. The
  final status was:

  2 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-888242 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-888242-2012-07-09T18-11-57.967Z is finished. The
  final status was:

  2 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-888242-2012-07-09T22-37-31.106Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2012-06-29 21:53:55 +0000
+++ src/compiler/translator/translator.cpp 2012-07-02 23:14:21 +0000
@@ -13795,6 +13795,16 @@
13795void end_visit (const FTThesaurusID& v, void* /*visit_state*/) {13795void end_visit (const FTThesaurusID& v, void* /*visit_state*/) {
13796 TRACE_VISIT_OUT ();13796 TRACE_VISIT_OUT ();
13797#ifndef ZORBA_NO_FULL_TEXT13797#ifndef ZORBA_NO_FULL_TEXT
13798 zstring const &uri = v.get_uri();
13799 zstring error_msg;
13800 std::auto_ptr<internal::Resource> rsrc(
13801 theSctx->resolve_uri( uri, internal::EntityData::THESAURUS, error_msg )
13802 );
13803 if ( !rsrc.get() )
13804 throw XQUERY_EXCEPTION(
13805 err::FTST0018, ERROR_PARAMS( uri ), ERROR_LOC( loc )
13806 );
13807
13798 ftrange *levels;13808 ftrange *levels;
13799 if ( v.get_levels() ) {13809 if ( v.get_levels() ) {
13800 levels = dynamic_cast<ftrange*>( pop_ftstack() );13810 levels = dynamic_cast<ftrange*>( pop_ftstack() );
@@ -13802,9 +13812,8 @@
13802 } else13812 } else
13803 levels = nullptr;13813 levels = nullptr;
1380413814
13805 ftthesaurus_id *const tid = new ftthesaurus_id(13815 ftthesaurus_id *const tid =
13806 loc, v.get_uri(), v.get_relationship(), levels13816 new ftthesaurus_id( loc, uri, v.get_relationship(), levels );
13807 );
13808 push_ftstack( tid );13817 push_ftstack( tid );
13809#endif /* ZORBA_NO_FULL_TEXT */13818#endif /* ZORBA_NO_FULL_TEXT */
13810}13819}
1381113820
=== modified file 'src/runtime/full_text/apply.cpp'
--- src/runtime/full_text/apply.cpp 2012-06-28 04:14:03 +0000
+++ src/runtime/full_text/apply.cpp 2012-07-02 23:14:21 +0000
@@ -1224,8 +1224,7 @@
1224 auto_ptr<internal::Resource> rsrc = static_ctx_.resolve_uri(1224 auto_ptr<internal::Resource> rsrc = static_ctx_.resolve_uri(
1225 uri, internal::EntityData::THESAURUS, error_msg1225 uri, internal::EntityData::THESAURUS, error_msg
1226 );1226 );
1227 if ( !rsrc.get() )1227 ZORBA_ASSERT( rsrc.get() );
1228 throw XQUERY_EXCEPTION( err::FTST0018, ERROR_PARAMS( uri ) );
12291228
1230 internal::ThesaurusProvider const *const t_provider =1229 internal::ThesaurusProvider const *const t_provider =
1231 dynamic_cast<internal::ThesaurusProvider const*>( rsrc.get() );1230 dynamic_cast<internal::ThesaurusProvider const*>( rsrc.get() );
12321231
=== modified file 'src/runtime/full_text/thesaurus.cpp'
--- src/runtime/full_text/thesaurus.cpp 2012-06-28 04:14:03 +0000
+++ src/runtime/full_text/thesaurus.cpp 2012-07-02 23:14:21 +0000
@@ -104,8 +104,9 @@
104 return nullptr;104 return nullptr;
105105
106 switch ( thesaurus_impl::find( scheme_name ) ) {106 switch ( thesaurus_impl::find( scheme_name ) ) {
107 case thesaurus_impl::xqftts: {107 case thesaurus_impl::xqftts:
108 //108# ifdef ZORBA_WITH_FILE_ACCESS
109 {
109 // Currently, we presume that an "xqftts:" URL should be used exactly110 // Currently, we presume that an "xqftts:" URL should be used exactly
110 // like a "file:" URL.111 // like a "file:" URL.
111 //112 //
@@ -114,9 +115,10 @@
114 zstring const t_path( fs::get_normalized_path( t_uri ) );115 zstring const t_path( fs::get_normalized_path( t_uri ) );
115 return new xqftts::provider( t_path );116 return new xqftts::provider( t_path );
116 }117 }
118# endif /* ZORBA_WITH_FILE_ACCESS */
119 case thesaurus_impl::wordnet:
117# ifdef ZORBA_WITH_FILE_ACCESS120# ifdef ZORBA_WITH_FILE_ACCESS
118 case thesaurus_impl::wordnet: {121 {
119 //
120 // Wordnet, on the other hand, needs to find its data file in Zorba's122 // Wordnet, on the other hand, needs to find its data file in Zorba's
121 // library path using the mangled form of the original URI. So, mangle123 // library path using the mangled form of the original URI. So, mangle
122 // here for convenience.124 // here for convenience.
@@ -126,6 +128,9 @@
126 return new wordnet::provider( t_path );128 return new wordnet::provider( t_path );
127 }129 }
128# endif /* ZORBA_WITH_FILE_ACCESS */130# endif /* ZORBA_WITH_FILE_ACCESS */
131# ifndef ZORBA_WITH_FILE_ACCESS
132 throw XQUERY_EXCEPTION( zerr::ZXQP0017_FILE_ACCESS_DISABLED );
133# endif /* ZORBA_WITH_FILE_ACCESS */
129 default:134 default:
130 throw XQUERY_EXCEPTION( err::FTST0018, ERROR_PARAMS( url ) );135 throw XQUERY_EXCEPTION( err::FTST0018, ERROR_PARAMS( url ) );
131 }136 }

Subscribers

People subscribed via source and target branches