Re: [fossil-users] HTSQL for SQLite? Was: ticket lists over json working

2011-02-03 Thread Gour
On Thu, 3 Feb 2011 23:43:58 -0500
Ron Wilson wrote:

> This would make report queries easier to write.

Indeed. 

> Never heard of HTSQL before now, but making it easier to get
> alternative formats for results should be useful.

I'm just exploring about HTSQL. Thank you for bringing it up. It looks
very interesting.

> > (3) Add a single command that lets you easily submit any URL
> > request from the command-line.  (The "http" command is close to
> > this already, but it would be better if you could put the URL as an
> > argument on the command-line rather than having to pipe it into
> > standard input.)
> 
> Always good for scripting actions.

I believe it's worth doing an experiment with it...


Sincerely,
Gour

-- 

Gour  | Hlapicina, Croatia  | GPG key: CDBF17CA



signature.asc
Description: PGP signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] HTSQL for SQLite? Was: ticket lists over json working

2011-02-03 Thread Ron Wilson
On Thu, Feb 3, 2011 at 8:53 PM, Richard Hipp  wrote:
> Suppose we did this:
>
> (1) Add a small assortment of VIEWs and/or VIRTUAL TABLEs to Fossil that
> allow things like timelines and branch lists to be queried as if they were
> plain old tables.

This would make report queries easier to write.

> (2) Add an HTSQL-like interface to Fossil that returns results in either
> HTML, XML, or JSON.

Never heard of HTSQL before now, but making it easier to get
alternative formats for results should be useful.

> (3) Add a single command that lets you easily submit any URL request from
> the command-line.  (The "http" command is close to this already, but it
> would be better if you could put the URL as an argument on the command-line
> rather than having to pipe it into standard input.)

Always good for scripting actions.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] HTSQL for SQLite? Was: ticket lists over json working

2011-02-03 Thread Richard Hipp
I just ran across HTSQL (http://htsql.org/) a few moments ago.  I haven't
looked at it much, yet, but it seems like an intriguing idea.

Suppose we did this:

(1) Add a small assortment of VIEWs and/or VIRTUAL TABLEs to Fossil that
allow things like timelines and branch lists to be queried as if they were
plain old tables.

(2) Add an HTSQL-like interface to Fossil that returns results in either
HTML, XML, or JSON.

(3) Add a single command that lets you easily submit any URL request from
the command-line.  (The "http" command is close to this already, but it
would be better if you could put the URL as an argument on the command-line
rather than having to pipe it into standard input.)

I'm not exactly sure what problem the above solves, but it seems interesting
all the same.  Please do not hesitate to expression confirming or contrary
opinions...

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] newbie failing to log into server...

2011-02-03 Thread Lluís Batlle i Rossell
On Thu, Feb 03, 2011 at 08:15:26PM +0100, Stephan Beal wrote:
> 2011/2/3 Lluís Batlle i Rossell 
> 
> >  If you don't use a root account for your CGI, you can use a setuid program
> > for
> > it to have such access to your files. Something like this here explained,
> > but
> > applied to fossil:
> > http://vicerveza.homeunix.net/~viric/c
> >

> setuid scripts are an option, but are an ugly ancient remnant of "more
> civilized times" and are generally frowned upon for security reasons. If i'm
> not mistaken (and i might be), recent Linux versions ignore the setuid bit
> (or only allow it on a configurable list of files).
And this is why that web page suggests a C program. :)

Regards,
Lluís
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] newbie failing to log into server...

2011-02-03 Thread Stephan Beal
2011/2/3 Lluís Batlle i Rossell 

>  If you don't use a root account for your CGI, you can use a setuid program
> for
> it to have such access to your files. Something like this here explained,
> but
> applied to fossil:
> http://vicerveza.homeunix.net/~viric/c
>

Most web hosters typically run the apache processes as a particular user
(e.g. "httpd" or "apache"), and that user will need access to the repo, as
Lluís says. Some additionally run CGI scripts as the account holder (i.e.
you), in which case you only need to be sure the fossil repo is writable by
you (this is what my primary hoster does, much to my pleasant surprise). If
the server is company-internal but you don't have root access to it, you
might be able to convince the admins to add you to the www user's group, or
create a new group and add both your account and the www-running account,
and then you can make the repo group-writable, which will keep it safe from
malicious users not in that group.

Also note some Unix-like setups make /home/yourhome with mode 0700, meaning
the other users (like the apache process) won't be able to see anything. If
that's a problem in your case you'll need to get the admin to (chmod +rx)
your home dir (non-root can't do it because /home itself is owned by root
and not world-writable, so the OS won't let you change it w/o root accecss).

setuid scripts are an option, but are an ugly ancient remnant of "more
civilized times" and are generally frowned upon for security reasons. If i'm
not mistaken (and i might be), recent Linux versions ignore the setuid bit
(or only allow it on a configurable list of files).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] newbie failing to log into server...

2011-02-03 Thread Lluís Batlle i Rossell
On Thu, Feb 03, 2011 at 01:36:59PM -0500, Mike Meyer wrote:
> However, if I try and log in using the userid/password from the repo,
> I get 
> 
> SQLITE_CANTOPEN: cannot open file at line 27596 of [fabcb6b95e]
> 
> SQLITE_CANTOPEN: statement aborts at 28: [UPDATE user SET 
> cookie='1/6E8AD0C7D6B7CDB96470AE6EF37458A19344AE610099A3D23E', 
> ipaddr='202.80.186.24', cexpire=julianday('now')+31557600/86400.0 WHERE uid=1]
> 
> Database Error

It needs access to write new files in the directory where the fossil repository
file lies. I imagine in your situation, the CGI process does not have such 
access.
You also need write access to the repository file.

If you don't use a root account for your CGI, you can use a setuid program for
it to have such access to your files. Something like this here explained, but
applied to fossil:
http://vicerveza.homeunix.net/~viric/cgi-bin/offrss/doc/trunk/doc/cgi.wiki

Regards,
Lluís.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] newbie failing to log into server...

2011-02-03 Thread Mike Meyer
[This didn't show up in the archives; I'm assuming a filter ate
it. Apologies if you saw it twice.]

Hello,

I've just started with fossil, so this is probably a simple problem -
but googling for it hasn't turned up anything.

I'm setting up a cgi server inside a firewall. I access it by ssh'ing
into a gateway box, using -L to forward local requests to the proper
host/port. The basic setup seems to be working, in either of two ways:

With cgi-bin/fossil that contains:

#!/usr/local/bin/fossil
directory: /home/mwm/repos

(I know, the docs say add a "not-found", but wanted to see what it
did...).

Or with cgi-bin/reponame that contains:

#!/usr/local/bin/fossil
repository: /home/mwm/repos/reponame.fossil

I can access either one of those from my desktop machine (i.e:
localhost:2525/cgi-bin/fossil/reponame or localhost:2525/cgi-bin/reponame),
log in to the anonymous account, and look at individual commits, files,
etc.

However, if I try and log in using the userid/password from the repo,
I get 

SQLITE_CANTOPEN: cannot open file at line 27596 of [fabcb6b95e]

SQLITE_CANTOPEN: statement aborts at 28: [UPDATE user SET 
cookie='1/6E8AD0C7D6B7CDB96470AE6EF37458A19344AE610099A3D23E', 
ipaddr='202.80.186.24', cexpire=julianday('now')+31557600/86400.0 WHERE uid=1]

Database Error

unable to open database file
UPDATE user SET cookie='1/6E8AD0C7D6B7CDB96470AE6EF37458A19344AE610099A3D23E', 
ipaddr='202.80.186.24',   cexpire=julianday('now')+31557600/86400.0 WHERE uid=1
If you have recently updated your fossil executable, you might need to run 
"fossil all rebuild" to bring the repository schemas up to date.

Well, I recently *installed* fossil, so I don't think the rebuild is a
problem. However, I did try rebuilding the repositories. This didn't
help.

The ultimate goal is to push to the repo.

thanks,
 http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] ticket lists over json working

2011-02-03 Thread Stephen De Gabrielle
Thanks. I'll give it a go tonight.
S.

On Thursday, February 3, 2011, Stephan Beal  wrote:
> On Thu, Feb 3, 2011 at 5:32 PM, Stephen De Gabrielle 
>  wrote:
>
> This looks great,
> :)
>
> The code is here if you want it:
>
> http://fossil.wanderinghorse.net/repos/fossil-sgb/
>
> in the "sgb-cson" branch.
>
> that is just a clone of core fossil repo, and i merge in the fossil trunk 
> every couple of days so i don't get too far out of sync. i have my 
> printed/signed copy of the license waiver to send off to Richard, but haven't 
> done so yet. Once that's through i will (with Richard's blessing) try to get 
> this pushed into the core.
>
>
> Is it just from the command line, or is it available from the server 'live'
>  - I'm keen to try it with http://www.simile-widgets.org/exhibit/
> (if not I can always do a cron job to run it on the server, and commit the 
> report to the repository)
> The current code only adds it to the CLI interface (and was a minimal change 
> - think i only added about 15 lines to the existing code, touched another 3 
> or 4 lines elsewhere, and added 1 .h and 1 .c file containing the 
> project-independent JSON code). i started to add it to the web interface 
> (where it will be more useful) but found that i had to touch a lot more 
> existing code in order to that, so i've been putting it off for the time 
> being. If the code gets accepted into the main branch i will have more 
> motivation to get it added to the CGI interface (i don't plan on maintaining 
> a fork of fossil!). If/when that happens, i will of course let the list know.
>
> Happy Hacking!
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
>

-- 

--
Stephen De Gabrielle
stephen.degabrie...@acm.org
Telephone +44 (0)20 85670911
Mobile+44 (0)79 85189045
http://www.degabrielle.name/stephen
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] ticket lists over json working

2011-02-03 Thread Stephan Beal
On Thu, Feb 3, 2011 at 5:32 PM, Stephen De Gabrielle <
stephen.degabrie...@acm.org> wrote:

> This looks great,
>

:)

The code is here if you want it:

http://fossil.wanderinghorse.net/repos/fossil-sgb/

in the "sgb-cson" branch.

that is just a clone of core fossil repo, and i merge in the fossil trunk
every couple of days so i don't get too far out of sync. i have my
printed/signed copy of the license waiver to send off to Richard, but
haven't done so yet. Once that's through i will (with Richard's blessing)
try to get this pushed into the core.



> Is it just from the command line, or is it available from the server 'live'
>  - I'm keen to try it with http://www.simile-widgets.org/exhibit/
> (if not I can always do a cron job to run it on the server, and commit the
> report to the repository)
>

The current code only adds it to the CLI interface (and was a minimal change
- think i only added about 15 lines to the existing code, touched another 3
or 4 lines elsewhere, and added 1 .h and 1 .c file containing the
project-independent JSON code). i started to add it to the web interface
(where it will be more useful) but found that i had to touch a lot more
existing code in order to that, so i've been putting it off for the time
being. If the code gets accepted into the main branch i will have more
motivation to get it added to the CGI interface (i don't plan on maintaining
a fork of fossil!). If/when that happens, i will of course let the list
know.

Happy Hacking!

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] arbitary SQL in fossil reports

2011-02-03 Thread Stephen De Gabrielle
Hi,

I noticed you can query other tables in the report definitions:

SELECT
 date(mtime) AS 'mtime',
 type,
 user,
 comment,
 brief
FROM event
Not all of them, but I imagine this would be useful combined with json output.

BTW what is the purpose of tablist=1 in
http://127.0.0.1:8080/tracker/rptview?tablist=1&rn=4

Regards,

Stephen

--

--
Stephen De Gabrielle
stephen.degabrie...@acm.org
Telephone +44 (0)20 85670911
Mobile        +44 (0)79 85189045
http://www.degabrielle.name/stephen
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] ticket lists over json working

2011-02-03 Thread Stephen De Gabrielle
This looks great,

Is it just from the command line, or is it available from the server 'live'
 - I'm keen to try it with http://www.simile-widgets.org/exhibit/
(if not I can always do a cron job to run it on the server, and commit the
report to the repository)

cheers,

Stephen
On Sat, Jan 29, 2011 at 1:53 AM, Stephan Beal  wrote:

> Sorry for all the noise tonight/this morning, but i'm on a hacking high...
>
> How's this for tickets info?
>
> stephan@ludo:~/cvs/fossil/fossil-sgb$ ./fossil tick list reports
> Available reports:
> report numberreport title
> 0full ticket export
> 1All Tickets
> 2All open tickets.
> 3Open by type
> 4Not Closed or Fixed, Doc or Feature
> stephan@ludo:~/cvs/fossil/fossil-sgb$ ./fossil ticket show -J --limit 2 1
> {
> "columns":[
> "bgcolor",
> "#",
> "mtime",
> "type",
> "status",
> "subsystem",
> "title"
> ],
> "rows":[
> {
> "bgcolor":"#cfe8bd",
> "#":"8ae201d843",
> "mtime":"2008-07-20 15:12:00",
> "type":"Incident",
> "status":"Fixed",
> "subsystem":"one",
> "title":"Bug tracker is not working"
> },
> {
> "bgcolor":"#cfe8bd",
> "#":"c7b35be884",
> "mtime":"2008-07-23 13:03:24",
> "type":"Incident",
> "status":"Fixed",
> "subsystem":"one",
> "title":"Fossil fails to recognize its repository db as a known
> file."
> }
> ]
> }
> stephan@ludo:~/cvs/fossil/fossil-sgb$ ./fossil ticket show 1 "title LIKE
> '%tracker%'" -j
> {"columns":["bgcolor", "#", "mtime", "type", "status", "subsystem",
> "title"],
> "rows":[{"bgcolor":"#cfe8bd", "#":"8ae201d843", "mtime":"2008-07-20
> 15:12:00",
> "type":"Incident", "status":"Fixed", "subsystem":"one", "title":"Bug
> tracker is not working"}]}
>
> The content is basically the same (same fields) as 'ticket show', except
> that in json mode the -l/--limit parameter takes on the meaning of "limit"
> in the "LIMIT n" SQL sense of the word.
>
> Note that the underlying sql-to-json code is the same, regardless of the
> queries we're outputing, so the structure for all generated JSON will be the
> same. i.e. please no special requests in terms of structure, except maybe in
> really special cases.
>
> :-?
>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
>
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>


-- 

--
Stephen De Gabrielle
stephen.degabrie...@acm.org
Telephone +44 (0)20 85670911
Mobile+44 (0)79 85189045
http://www.degabrielle.name/stephen
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] possible? pushing from ui mode...

2011-02-03 Thread Richard Hipp
On Thu, Feb 3, 2011 at 10:39 AM, Stephan Beal  wrote:

> On Thu, Feb 3, 2011 at 2:38 PM, Stephen De Gabrielle <
> stephen.degabrie...@acm.org> wrote:
>
>> How about a cron job that runs every 10 minutes?
>>  - you could get it to check if there have been any changes, but sync does
>> that anyway. (and doesn't cause much network traffic)
>>
>> I seem to remember a sync function appearing in the ui, but it seems to
>> have gone?
>>
>
> i actually prefer to turn autosync off in most cases (i like to type in
> several commits quickly and push them at once, and i hate the 4-second delay
> between commits while i'm waiting on the autosync), but when i'm editing the
> wiki it "would be comfortable" if the changes were automatically pushed.
> However, i don't feel it is a need-to-have feature, and app slowdown (while
> it waits on the remote, which might not be reachable) and the error
> reporting/handling problems it might introduce make it seem (in hindsight)
> to be a bad idea for a feature.
>

I want to add the ability for Fossil to synchronize itself automatically
with one or more other repositories whenever anything change, said
synchronization driven by a background process.  This would be part of the
same change that allows "hooks" when things change.  Ideally, the auto-sync
would delay for a few seconds (configurable) after each change in case there
are other changes coming right behind the first change - that way a single
sync would capture multiple changes.  Note that since the sync is in the
background, any command-line or web interaction that caused the change would
return immediately and would not be delayed by the background
synchronization process.

I need a good mechanism for kicking off background processes first - a
mechanism that works both for command-line invocations and for CGI and inetd
invocations.  And I'll need functions to test for the existence of existing
background processes so that only one is running at a time.

I've been wanting to do this for a while, but there are other priorities


>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
>
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] possible? pushing from ui mode...

2011-02-03 Thread Stephan Beal
On Thu, Feb 3, 2011 at 2:38 PM, Stephen De Gabrielle <
stephen.degabrie...@acm.org> wrote:

> How about a cron job that runs every 10 minutes?
>  - you could get it to check if there have been any changes, but sync does
> that anyway. (and doesn't cause much network traffic)
>
> I seem to remember a sync function appearing in the ui, but it seems to
> have gone?
>

i actually prefer to turn autosync off in most cases (i like to type in
several commits quickly and push them at once, and i hate the 4-second delay
between commits while i'm waiting on the autosync), but when i'm editing the
wiki it "would be comfortable" if the changes were automatically pushed.
However, i don't feel it is a need-to-have feature, and app slowdown (while
it waits on the remote, which might not be reachable) and the error
reporting/handling problems it might introduce make it seem (in hindsight)
to be a bad idea for a feature.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] possible? pushing from ui mode...

2011-02-03 Thread Stephen De Gabrielle
How about a cron job that runs every 10 minutes?
 - you could get it to check if there have been any changes, but sync does
that anyway. (and doesn't cause much network traffic)

I seem to remember a sync function appearing in the ui, but it seems to have
gone?

Stephen
On Tue, Feb 1, 2011 at 7:21 PM, Stephan Beal  wrote:

> Hello again!
>
> Suppose for a moment that when i edit a wiki page using "fossil ui", that i
> want fossil to automatically push the repo when i save changes. Can i hack
> fossil to do that with little effort, or would the current infrastructure
> not allow me to do that?
>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
>
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>


-- 

--
Stephen De Gabrielle
stephen.degabrie...@acm.org
Telephone +44 (0)20 85670911
Mobile+44 (0)79 85189045
http://www.degabrielle.name/stephen
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] cherry picking issues

2011-02-03 Thread Stephen De Gabrielle
Iadded a column[internal/external], and did two different reports. I can't
hide the 'internal' tickets and reports without using a second repository
with a different local configuration.

S.


On Tue, Feb 1, 2011 at 7:16 AM, Ron Wilson  wrote:

> We have been thinking it might make sense to divide the over all pool
> of issues in 2: A pool within the software group containing internal
> issues as well as issues from the other pool we decide to include. The
> other pool would be for everyone else. Of course, for any issue we
> include from the "outside" pool, we would need to forward updates.
>
> Since any issues from the outer pool would be decided on a
> case-by-case basis, we envisioned creating some Javascript that would
> allowing an issue being viewed from one pool to be posted to the other
> pool.
>
> Before we start even thinking about the Javascript code, we were
> wondering if anyone here has done anything similar.
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>



-- 

--
Stephen De Gabrielle
stephen.degabrie...@acm.org
Telephone +44 (0)20 85670911
Mobile+44 (0)79 85189045
http://www.degabrielle.name/stephen
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users