[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Zorba Build Bot
Validation queue job bug-1090514-2013-05-07T00-45-50.505Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug-1090514 into lp:zorba has been 
updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-1090514-2013-05-07T00-45-50.505Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Paul J. Lucas
The proposal to merge lp:~zorba-coders/zorba/bug-1090514 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug-1090514 into lp:zorba has been 
updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug-1090514 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 
(message):
  Validation queue job bug-1090514-2013-05-07T00-12-47.696Z 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

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-1090514-2013-05-07T00-12-47.696Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug-1090514 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Paul J. Lucas
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1090514 into lp:zorba

2013-05-06 Thread Paul J. Lucas
Paul J. Lucas has proposed merging lp:~zorba-coders/zorba/bug-1090514 into 
lp:zorba.

Commit message:
Fixed most generate-id() bugs.

Requested reviews:
  Paul J. Lucas (paul-lucas)
Related bugs:
  Bug #1090514 in Zorba: "fn-generate-id failures"
  https://bugs.launchpad.net/zorba/+bug/1090514

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683

Fixed most generate-id() bugs.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1090514/+merge/162683
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/nodes/nodes_impl.cpp'
--- src/runtime/nodes/nodes_impl.cpp	2013-03-05 12:34:19 +
+++ src/runtime/nodes/nodes_impl.cpp	2013-05-06 23:27:27 +
@@ -27,6 +27,7 @@
 #include "store/api/store.h"
 #include "store/api/copymode.h"
 
+#include "util/ascii_util.h"
 #include "util/string_util.h"
 #include "util/uri_util.h"
 #include "zorbautils/string_util.h"
@@ -453,35 +454,31 @@
 /
 bool FnGenerateIdIterator::nextImpl(store::Item_t& result, PlanState& planState) const
 {
-  store::Item_t item;
-  bool retval;
+  store::Item_t item;
+  zstring id;
 
   PlanIteratorState* state;
   DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
 
-  if (theChildren.size())
+  // Note that the zero-argument version of this function is transformed into
+  // the one-argument form in translator.cpp.
+
+  if (consumeNext(item, theChildren[0].getp(), planState))
   {
+store::Item_t item_uri;
+if (GENV_STORE.getNodeReference(item_uri, item.getp()))
 {
-  zstring uri_string, lRes;
-  if(consumeNext(item, theChildren[0].getp(), planState))
-  {
-store::Item_t item_uri;
-if (GENV_STORE.getNodeReference(item_uri, item.getp()))
-{
-  uri_string = item_uri->getStringValue();
-  // need to convert the opaque uri into a valid ncname
-#ifndef NDEBUG
-  ZORBA_ASSERT( uri_string.find_first_of("urn:uuid:") == 0 );
-#endif
-  lRes = "u" + uri_string.substr(9);
-}
-  }
-  retval = GENV_ITEMFACTORY->createString(result, lRes);
+  item_uri->getStringValue2( id );
+  // need to convert the opaque uri into a valid ncname
+  if ( ascii::begins_with( id, "urn:uuid:" ) )
+id.erase( 0, 9 );
+  ascii::remove_not_chars( id, ascii::alnum );
+  id.insert( (zstring::size_type)0, 1, 'u' );
 }
-STACK_PUSH(retval, state);
   }
-
-  STACK_END (state);
+  GENV_ITEMFACTORY->createString(result, id);
+  STACK_PUSH(true, state);
+  STACK_END(state);
 }
 
 

=== modified file 'src/util/ascii_util.h'
--- src/util/ascii_util.h	2013-05-01 03:57:57 +
+++ src/util/ascii_util.h	2013-05-06 23:27:27 +
@@ -41,6 +41,9 @@
 
 // constants //
 
+char const alpha[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+char const alnum[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+char const digit[] = "0123456789";
 char const whitespace[] = " \f\n\r\t\v";
 
 // Non-ASCII character stripping //
@@ -814,7 +817,7 @@
  * Removes all specified characters by shifting the contents of the buffer to
  * the left.
  *
- * @param s The string.
+ * @param s The string to remove characters from.
  * @param s_len The length of \a s.
  * @param chars The characters to remove.
  * @return Returns the new length of \a s with all \a chars removed.
@@ -822,6 +825,15 @@
 size_type remove_chars( char *s, size_type s_len, char const *chars );
 
 /**
+ * Removes all characters that are not among the specified characters.
+ *
+ * @param s The string to remove characters from.
+ * @param keep_chars The characters to keep.
+ */
+template
+void remove_not_chars( StringType &s, char const *keep_chars );
+
+/**
  * Removes all whitespace characters by shifting the contents of the buffer to
  * the left.
  *

=== modified file 'src/util/ascii_util.tcc'
--- src/util/ascii_util.tcc	2013-02-07 17:24:36 +
+++ src/util/ascii_util.tcc	2013-05-06 23:27:27 +
@@ -56,6 +56,13 @@
 }
 
 template
+void remove_not_chars( StringType &s, char const *keep_chars ) {
+  typename StringType::size_type pos = 0;
+  while ( (pos = s.find_first_not_of( keep_chars, pos )) != StringType::npos )
+s.erase( pos, 1 );
+}
+
+template
 bool replace_all( StringType &s, char from, char to ) {
   bool replaced_any = false;
   for ( typename StringType::size_type pos = 0; pos < s.size(); ++pos ) {

=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt	2013-05-06 09:20:46 +
+++ test/fots/CMakeLists.txt	2013-05-06 23:27:27 +
@@ -176,15 +176,8 @@
 EXPECTED_FOTS_FAILURE (fn-format-number numberformat83 1167643)
 EXPECTED_FOTS_FAILURE (fn-format-number numberformat87 1167641)
 EXPECTED_FOTS_FAILURE (fn-format-number numberformat88 1167641)
-EXPECTED_FOTS_FAILURE (fn-gen

[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba

2013-05-06 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has 
been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/162562
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/162562
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba

2013-05-06 Thread Zorba Build Bot
Validation queue job markos-scratch-2013-05-06T08-56-54.933Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/162562
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba

2013-05-06 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/markos-scratch-2013-05-06T08-56-54.933Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/162562
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba

2013-05-06 Thread Markos Zaharioudakis
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has 
been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/162562
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/162562
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp