Res: [Sputnik-list] Permissions

Sérgio Medeiros tampo_8 at yahoo.com
Tue Feb 26 21:31:02 GMT+2 2008


Hi!

It was more difficult than I imagined, but I think
we are almost there about Subversion + Sputnik :-)

Well, I was working in a different computer today and
after several hours seeing an error that I was not understanding,
I finally concluded that a small change is necessary in "wiki.lua".

When trying to edit a page, I was getting 'honeypot numbers' like
"1,321836689637" instead of ""1.321836689637", a comma instead
of a dot.

But this was just happening when I was using Subversion, when I was
working with LFS everything was going fine (Oh, I spent many hours
on this :-))

In line 462, I changed "order = tostring(math.random()*5)," to
"order = string.gsub (tostring(math.random()*5), ",", "."),".
I think this error is because the locale, as in Brazil is common
to write a "," instead of a "." when representing a float point
number.

Yuri, I also changed the function "get_node_exists", I think
it was not returning a boolean value as the description of
the function indicated.

I did not implement the "extra" metadata of an index entry.
After some time, I think I understood the code in "simple.lua",
but I am wondering if it is a little too specific.

About the installation, you don't need to "checkout" the
working copy when you create the repository, "SVNVersiumStorage:new"
always do this (don't know if it's the best option, but
seems reasonable). 

But about the "Create repository" step, maybe would
be better if Sputnik checked if the repository exists 
instead of Versium. When using LFS, wiki-data is created by

the Sputnik script, not by Versium.


I did not understand why you prefer 
"luarocks 
install 
versium-svn" 
instead of just ""luarocks 
install luasvn".
What would be the benefits?

I hope I have not been too prolix :-)


Sergio


----- Mensagem original ----
De: Yuri Takhteyev <yuri at sims.berkeley.edu>
Para: Sérgio Medeiros <tampo_8 at yahoo.com>
Cc: Sputnik <sputnik-list at lists.luaforge.net>
Enviadas: Terça-feira, 26 de Fevereiro de 2008 5:22:57
Assunto: Re: [Sputnik-list] Permissions

Indeed 
it 
works!  
Nice!

I've 
been 
thinking 
of 
making 
it 
into 
a 
rock 
of 
it's 
own
("versium-svn") 
which 
would 
then 
specify 
a 
dependency 
on 
luasvn.  
Then
to 
install 
it 
one 
would 
just 
need 
to 
do 
"luarocks 
install 
versium-svn"
and 
luasvn 
would 
get 
installed 
automatically.  
What 
do 
you 
think?

Also, 
about 
the 
"Create 
a 
repository" 
step.  
Would 
it 
be 
possible 
to
wrap 
this 
into 
the 
module 
somehow?  
I.e., 
check 
if 
the 
repository
exists 
and 
if 
it 
doesn't 
create 
it?  
Alternatively, 
those 
four 
lines
could 
just 
be 
put 
into 
a 
small 
script 
that 
could 
be 
put 
into 
the 
bin
directory 
as 
a 
part 
of 
the 
installation, 
so 
that 
the 
first 
two 
steps
in 
the 
installation 
would 
be:

  
  
luarocks 
install 
versium-svn
  
  
./bin/lua5.1 
./bin/luasvn_init_repository.lua 
my_repos 
wiki-data

Oh, 
there 
is 
also 
a 
small 
problem: 
I 
can't 
create 
new 
nodes. 
:(

Sputnik 
ran 
but 
failed 
due 
to 
an 
unexpected 
error.

stack 
traceback:
    
...sputnik/rocks/sputnik/8.02.20-0/lua/sputnik/init.lua:451: 
in 
function 
'err'
    
/home/yuri/sputnik/share/lua/5.1/coxpcall.lua:24: 
in 
function
    
(tail 
call): 
?
    
(tail 
call): 
?
    
(tail 
call): 
?
    
...sputnik/rocks/sputnik/8.02.20-0/lua/sputnik/init.lua:454: 
in
function 
'protected_run'
    
...sputnik/rocks/sputnik/8.02.20-0/lua/sputnik/init.lua:528: 
in
function 
'cgilua_run'
    
sputnik.lua:11: 
in 
main 
chunk


I 
haven't 
had 
a 
chance 
to 
debug 
it, 
but 
I 
am 
guessing 
that 
somehow
node_exists() 
returns 
true 
and 
versium 
then 
tries 
to 
actually 
read 
the
file.  
But 
for 
files 
that 
are 
created 
programmatically 
(all 
the
initial 
pages), 
I 
can 
edit 
them 
successfully.

Thanks 
for 
the 
work!

>  
I 
tried 
to 
follow 
your 
instructions, 
assuming 
I 
have 
installed
>  
Sputnik 
using 
the 
script 
"sputnik_install_2008_02_16.sh".

Sorry 
for 
the 
confusing 
instructions, 
but 
I 
suppose 
they 
are 
moot 
now.

 
- 
yuri

--
http://www.freewisdom.org/en/pipa/albums/





      Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
http://br.mail.yahoo.com/



More information about the Sputnik-list mailing list