Merge lp:~danielturcanu/zorba/mytrunk into lp:zorba

Proposed by Daniel Turcanu
Status: Superseded
Proposed branch: lp:~danielturcanu/zorba/mytrunk
Merge into: lp:zorba
Diff against target: 85 lines (+6/-4)
7 files modified
ChangeLog (+1/-0)
src/diagnostics/dict_XX_cpp.xq (+1/-0)
src/diagnostics/pregenerated/dict_en.cpp (+1/-0)
src/runtime/strings/strings_impl.cpp (+1/-1)
src/zorbatypes/URI.cpp (+0/-3)
test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a4.xml.res (+1/-0)
test/rbkt/Queries/zorba/string/Regex/regex_a4.xq (+1/-0)
To merge this branch: bzr merge lp:~danielturcanu/zorba/mytrunk
Reviewer Review Type Date Requested Status
Chris Hillery Needs Information
Matthias Brantner Approve
Review via email: mp+79120@code.launchpad.net

This proposal supersedes a proposal from 2011-10-11.

This proposal has been superseded by a proposal from 2011-10-12.

Description of the change

fn:analyze-string fix
Also removed useless test

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

What is the file test/rbkt/Queries/zorba/resolving/path_to_uri.xq supposed to test. It imports the file module but doesn't use it.

review: Needs Information
Revision history for this message
Daniel Turcanu (danielturcanu) wrote : Posted in a previous version of this proposal
Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

IMHO, path_to_uri.xq / .spec / .xml.res shouldn't be checked in with this change, since it's not related to the bug being fixed. path_to_uri.spec isn't relevant and shouldn't be checked in at all, since the variable $input-context it declares isn't used by path_to_uri.xq.

Also, why are there additional #include <zorba/config.h> lines added? That will probably slow builds down (more header dependencies), so if it's not critically important it'd be best to leave it out.

Finally, the good news: I confirmed that the change to strings_impl.cpp does fix the query regex_a4.xq. (Although, if I can continue being picky, I'd prefer to leave regex_a4.xq in the test/rbkt/Queries/zorba/string/AnalyzeString directory, rather than adding the new Regex subdirectory there.)

review: Needs Fixing
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

I approve the fix but it has merge conflicts in the ChangeLog.

review: Approve
Revision history for this message
Chris Hillery (ceejatec) wrote :

Still wondering what the #include <zorba/config.h> additions are about. They don't seem related or necessary...

review: Needs Information
Revision history for this message
Daniel Turcanu (danielturcanu) wrote :

The #include is necessary to have access to zorba settings.

Revision history for this message
Chris Hillery (ceejatec) wrote :

But it doesn't look like like you're using any such settings here...?

Revision history for this message
Daniel Turcanu (danielturcanu) wrote :

There are a lot of #if defined and #if !defined in that file.

lp:~danielturcanu/zorba/mytrunk updated
10480. By Daniel Turcanu

Update to trunk

10481. By Daniel Turcanu

Update to trunk

10482. By Daniel Turcanu

Update to trunk

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-10-12 09:58:12 +0000
3+++ ChangeLog 2011-10-12 18:39:26 +0000
4@@ -50,6 +50,7 @@
5 different nodes cannot have the same identifier.
6 * Fixed bug #872697 (segmentation fault with validation of NMTOKENS)
7 * Added undo for node revalidation
8+ * Fixed bug #868325 (fn:analyze-string fails with some recursive subgroups)
9
10 version 2.0.1
11
12
13=== modified file 'src/diagnostics/dict_XX_cpp.xq'
14--- src/diagnostics/dict_XX_cpp.xq 2011-08-05 02:21:55 +0000
15+++ src/diagnostics/dict_XX_cpp.xq 2011-10-12 18:39:26 +0000
16@@ -64,6 +64,7 @@
17 return string-join(
18 ( util:copyright(),
19 '#include "stdafx.h"',
20+ '#include "zorba/config.h"',
21 '#include "diagnostics/dict_impl.h"',
22 '',
23 'namespace zorba {',
24
25=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
26--- src/diagnostics/pregenerated/dict_en.cpp 2011-10-05 17:49:48 +0000
27+++ src/diagnostics/pregenerated/dict_en.cpp 2011-10-12 18:39:26 +0000
28@@ -20,6 +20,7 @@
29 */
30
31 #include "stdafx.h"
32+#include "zorba/config.h"
33 #include "diagnostics/dict_impl.h"
34
35 namespace zorba {
36
37=== modified file 'src/runtime/strings/strings_impl.cpp'
38--- src/runtime/strings/strings_impl.cpp 2011-08-10 18:58:11 +0000
39+++ src/runtime/strings/strings_impl.cpp 2011-10-12 18:39:26 +0000
40@@ -1688,7 +1688,7 @@
41 GENV_ITEMFACTORY->createString(strid_item, zstrid);
42 store::Item_t id_attrib_item;
43 GENV_ITEMFACTORY->createAttributeNode(id_attrib_item, group_elem.getp(), nr_attrib_name, untyped_type_name, strid_item);
44- if(match_startg < 0)
45+ if((match_startg < 0) || (match_startg < match_endgood))
46 continue;
47 match_endgood = match_endg;
48 if((i+1)<nr_pattern_groups)
49
50=== modified file 'src/zorbatypes/URI.cpp'
51--- src/zorbatypes/URI.cpp 2011-06-24 23:00:33 +0000
52+++ src/zorbatypes/URI.cpp 2011-10-12 18:39:26 +0000
53@@ -1191,8 +1191,6 @@
54 return is_set(Scheme) && !theScheme.empty();
55 }
56
57-
58-
59 /*******************************************************************************
60
61 ********************************************************************************/
62@@ -1347,7 +1345,6 @@
63 path = base_path.substr(0, last_slash+1);
64 // else
65 // path = "/";
66-
67 }
68
69 // 6b - append the relative URI path
70
71=== added directory 'test/rbkt/ExpQueryResults/zorba/string/Regex'
72=== added file 'test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a4.xml.res'
73--- test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a4.xml.res 1970-01-01 00:00:00 +0000
74+++ test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a4.xml.res 2011-10-12 18:39:26 +0000
75@@ -0,0 +1,1 @@
76+<fn:analyze-string-result xmlns:fn="http://www.w3.org/2005/xpath-functions"><fn:match>a<fn:group nr="1"><fn:group nr="2"/><fn:group nr="3">c</fn:group></fn:group></fn:match></fn:analyze-string-result>
77\ No newline at end of file
78
79=== added directory 'test/rbkt/Queries/zorba/string/Regex'
80=== added file 'test/rbkt/Queries/zorba/string/Regex/regex_a4.xq'
81--- test/rbkt/Queries/zorba/string/Regex/regex_a4.xq 1970-01-01 00:00:00 +0000
82+++ test/rbkt/Queries/zorba/string/Regex/regex_a4.xq 2011-10-12 18:39:26 +0000
83@@ -0,0 +1,1 @@
84+fn:analyze-string("ac", "((a)|(c))+")
85\ No newline at end of file

Subscribers

People subscribed via source and target branches