Re: [fossil-users] Last call for "testerCleanup" branch review...

2016-03-05 Thread Andy Bradford
Thus said to...@acm.org on Sun, 06 Mar 2016 02:48:05 +0200:

> Can someone shed  some light (or point  me to a link) as  to what this
> new  feature  is  supposed  to  do? (I  must  have  missed  any  prior
> discussion on this.)

It's mostly just  making tester.tcl work better. There is  one change in
behavior in  that the  output will  no longer be  found in  your current
working directory so if you're used to inspecting the results of some of
the  tests  in your  current  working  directory,  you'll have  to  look
elsewhere, or tell tester.tcl to use your current working directory.

Andy
-- 
TAI64 timestamp: 400056db8220


___
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] Last call for "testerCleanup" branch review...

2016-03-05 Thread tonyp
Can someone shed some light (or point me to a link) as to what this new 
feature is supposed to do?  (I must have missed any prior discussion on 
this.)


-Original Message- 
From: Joe Mistachkin

Sent: Saturday, March 05, 2016 9:27 PM
To: fossil-...@mailinglists.sqlite.org
Cc: 'Fossil SCM user's discussion'
Subject: [fossil-users] Last call for "testerCleanup" branch review...


I think this branch is ready and I'm planning on merging these changes to
trunk on Tuesday, March 8th, 2016.  Please feel free to raise objections.

--
Joe Mistachkin

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


___
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] Last call for "testerCleanup" branch review...

2016-03-05 Thread Joel Bruick

Joe Mistachkin wrote:

I think this branch is ready and I'm planning on merging these changes to
trunk on Tuesday, March 8th, 2016.  Please feel free to raise objections.


I agree that it's ready and am absolutely thrilled by what I see as a 
huge improvement to the test runner. Thanks, Joe!

___
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 8:36 PM, Richard Hipp  wrote:

> On 3/5/16, Stephan Beal  wrote:
> > On Sat, Mar 5, 2016 at 4:35 PM, Stephan Beal 
> wrote:
> >
> > If Richard (or anyone else) has no objections to it, i'll enable that.
> >
>
> No objections.
>

@Matthieu:

it's been added in this massive internal rewrite:

http://www.fossil-scm.org/index.html/info/93f514ca2c4532e6

One caveat: content() resolves to a blob, so you'll need to cast it if you
want to see the content:

select cast(content('rid:1') as text)

Without the cast, it'll say something like "127-byte blob".


Aside:  I have not made many commits to Fossil myself lately because
> (A) I'm up to my eyeballs in SQLite enhancements and (B) Fossil pretty
> much does everything *I* need it to do already.  But I really, deeply,
> appreciate y'all stepping up and keeping the development going even if
> I am more of an observer at this point.  Seriously.  Keep this up!


It's done everything i need since 2008. :)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Richard Hipp
On 3/5/16, Stephan Beal  wrote:
> On Sat, Mar 5, 2016 at 4:35 PM, Stephan Beal  wrote:
>
> If Richard (or anyone else) has no objections to it, i'll enable that.
>

No objections.

Aside:  I have not made many commits to Fossil myself lately because
(A) I'm up to my eyeballs in SQLite enhancements and (B) Fossil pretty
much does everything *I* need it to do already.  But I really, deeply,
appreciate y'all stepping up and keeping the development going even if
I am more of an observer at this point.  Seriously.  Keep this up!
-- 
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 3:50 PM, Matthieu Dubuget  wrote:

> Hello Stephan,
>
> thanks for your answers. I have some more questions.
>
> Is there any technical reason why the fossil content function does not
> work from the http://localhost:8080/admin_sql page?
>

i would expect it to, but i'll take a look at it this evening.


> Before diving into libfossil (which I'd like to be pointed to)


http://fossil.wanderinghorse.net/r/libfossil

and if you're on Unix or (thanks to Warren) Mac, the some bindings which
can also decode repo content:

https://docs.google.com/document/d/13gRSl6-bj3LV-OKgE-BsqvqF33UFYW3oa3A2OJC5QSY/view



> , is there any possibility to construct an sqlite extension that would
> allow me to:
> - load_extension("fossil.sqlext")
> - and use directly this wonderfull : content() fonction in sql queries
> from my favorite language?
>

Not readily available. You could build one using libfossil, but that'd be a
lot of overhead for that one specific feature.


> Other options for me would be
> - to make repeated callsto 'fossil sqlite3' (run and parse output); but it
> seems quite ugly, and would be slow, especially when used on windows
>

FYI: AFAIK libfossil builds on windows, but its current script bindings
have never been built/tested there (and there are no Windows build files
for them).


> - to start 'fossil ui' and have my program interact with the database with
> http requests. I do not know if it would be better nor faster
>

If you just want the raw content, you can also:

[stephan@host:~/cvs/fossil/cwal/s2/mod/sqlite3]$ f artifact rid:1
C initial\sempty\scheck-in
D 2012-07-23T18:45:59.519
P
R d41d8cd98f00b204e9800998ecf8427e
T *branch * trunk
T *sym-trunk *
U stephan
Z 8e0dd0a0d27388b8df243b9b9c620a56

fossil artifact UUID-or-name:




> - is there a 'fossil sqldaemon' mode (or would it be of any value and not
> too difficult to write) that would allow to query the database like with
> 'fossil sqlite3' but through a socket?
>

Interesting idea, but not currently.

i'll check into the admin page.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Richard Hipp
On 3/5/16, Matthieu Dubuget  wrote:
>
> Is there any technical reason why the fossil content function does not work
> from the http://localhost:8080/admin_sql page?
>
> Before diving into libfossil (which I'd like to be pointed to), is there any
> possibility to construct an sqlite extension that would allow me to:
> - load_extension("fossil.sqlext")
> - and use directly this wonderfull : content() fonction in sql queries from
> my favorite language?
>
> Other options for me would be
> - to make repeated callsto 'fossil sqlite3' (run and parse output); but it
> seems quite ugly, and would be slow, especially when used on windows
> - to start 'fossil ui' and have my program interact with the database with
> http requests. I do not know if it would be better nor faster
> - is there a 'fossil sqldaemon' mode (or would it be of any value and not
> too difficult to write) that would allow to query the database like with
> 'fossil sqlite3' but through a socket?
>
> Of course, I should learn SQL in order to construct more elaborated and
> powerfull SQL queries instead of a lot simple ones.
>

All these sounds like great ideas.  I invite you to consider
sharpening your C programming skills by implementing one or more of
them.  :-)



-- 
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Matthieu Dubuget
Hello Stephan,

thanks for your answers. I have some more questions.

Is there any technical reason why the fossil content function does not work 
from the http://localhost:8080/admin_sql page?

Before diving into libfossil (which I'd like to be pointed to), is there any 
possibility to construct an sqlite extension that would allow me to:
- load_extension("fossil.sqlext")
- and use directly this wonderfull : content() fonction in sql queries from my 
favorite language?

Other options for me would be
- to make repeated callsto 'fossil sqlite3' (run and parse output); but it 
seems quite ugly, and would be slow, especially when used on windows
- to start 'fossil ui' and have my program interact with the database with http 
requests. I do not know if it would be better nor faster
- is there a 'fossil sqldaemon' mode (or would it be of any value and not too 
difficult to write) that would allow to query the database like with 'fossil 
sqlite3' but through a socket?

Of course, I should learn SQL in order to construct more elaborated and 
powerfull SQL queries instead of a lot simple ones.

Thanks

-- 
Matthieu Dubuget
___
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 9:49 AM, Matthieu Dubuget  wrote:

> database. But I'm stucked at the point where I obtain a compressed
> blob (I guess it is just compressed, not diffed): I do not know how to
> uncompress it programmatically.
>

And an elaboration: each blob may be a delta and/or compressed, and only
fossil's internals (or equivalent effort) can unknot those - it can't be
done simply via SQL. The content() sql function does all that work: it
always returns the raw content of the uncompressed/delta-applied content.

And FYI, the compression is zlib-compatible with a 4-byte header (the
unsigned, big-endian length uncompressed length of the blob). So that could
be done from arbitrary C code, but applying the deltas requires a lot more
effort and access to fossil's delta-application code (and knowledge of the
schema). i.e., it's "not a job for mere mortal code." (The delta code
exists in library form, but it'd still be a lot of work.)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 9:55 AM, Stephan Beal  wrote:

> It's used like this:
>
> sqlite> select content('rid:1');
>

Sorry, left out a bit of context:

[stephan@host:~/cvs/fossil/fossil/src]$ fossil sqlite
SQLite version 3.11.0 2016-02-15 17:29:24
Enter ".help" for usage hints.
sqlite> select content('rid:1');

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
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] Howto programmatically uncompress blobs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 9:49 AM, Matthieu Dubuget  wrote:

> Hello,
>
> we started to use fossil about 2 years ago in order to manage our
> tickets.
>
> I'm now asked to extract some informations from the ticket database,
> but I'm not sure about the right way to go.
>
> Essentially, we would need to:
> - filter tickets (by date, category…)
> - and produce some stats, like the time they were in "Open" status.
>
> My poor SQL knowledge and the database structure prevent me to degign
> one SQL query to achieve the second part of the task.
>

fossil builds in an sql function called content() which can do this:

It's used like this:

sqlite> select content('rid:1');
C initial\sempty\sbaseline
D 2007-07-21T14:09:59
P
R d41d8cd98f00b204e9800998ecf8427e
U drh
Z c62e3619f7c41ee77b33f00df8ec26f4


and accepts any symbolic name/uuid accepted everywhere else in fossil.

Alternately (but more work on your part), libfossil provides a C API which
can do it (just post back if you're interested and i'll point out some
code).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Howto programmatically uncompress blobs?

2016-03-05 Thread Matthieu Dubuget
Hello,

we started to use fossil about 2 years ago in order to manage our
tickets.

I'm now asked to extract some informations from the ticket database,
but I'm not sure about the right way to go.

Essentially, we would need to:
- filter tickets (by date, category…)
- and produce some stats, like the time they were in "Open" status.

My poor SQL knowledge and the database structure prevent me to degign
one SQL query to achieve the second part of the task.

I considered using directly Sqlite library to gather data from the
database. But I'm stucked at the point where I obtain a compressed
blob (I guess it is just compressed, not diffed): I do not know how to
uncompress it programmatically.

Any hint?

Thanks for your help

-- 
Matthieu Dubuget
Guide d’autodéfense numérique : http://guide.boum.org

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