Re: [fossil-users] Example ticket reports

2012-05-31 Thread Jacek Cała
  Hi Chen,

Below are two which I tend to use for all my own projects. I'm not
sure if they are "the best SQL ever" but work fine for my purposes.
"All but closed tickets" gives you a view sorted by status, priority,
severity and submission time. "Counters" may be used for auditing
purposes to show the progress and status of the project. Hope it
helps.

  Cheers,
  Jacek

*** All but closed ***

SELECT
  CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
   WHEN status='Blocked' THEN '#ff'
   WHEN status='Review' THEN '#e8e8e8'
   WHEN status='Fixed' THEN '#cfe8bd'
   WHEN status='Tested' THEN '#bde5d6'
   WHEN status='Deferred' THEN '#cacae5'
   ELSE '#c8c8c8' END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  priority,
  severity,
  type,
  status,
  subsystem,
  CASE WHEN length(title) > 60 THEN substr(title,0,57) || '...'
   ELSE title END AS 'title'
FROM (
  SELECT *,
CASE WHEN status IN ('Open','Verified','Blocked') THEN 0
 WHEN status='Review' THEN 1
 WHEN status='Fixed' THEN 2
 WHEN status='Tested' THEN 3
 WHEN status='Deferred' THEN 4
 ELSE 5 END AS 'st',
CASE WHEN priority='Immediate' THEN 0
 WHEN priority='High' THEN 1
 WHEN priority='Medium' THEN 2
 WHEN priority='Low' THEN 3
 ELSE 4 END AS 'p',
CASE WHEN severity='Critical' THEN 0
 WHEN severity='Severe' THEN 1
 WHEN severity='Important' THEN 2
 WHEN severity='Minor' THEN 3
ELSE 4 END AS 's'
FROM ticket
WHERE status != 'Closed'
ORDER BY st, p, s, tkt_mtime)


*** Counters ***

SELECT
  CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
   WHEN status='Blocked' THEN '#ff'
   WHEN status='Review' THEN '#e8e8e8'
   WHEN status='Fixed' THEN '#cfe8bd'
   WHEN status='Tested' THEN '#bde5d6'
   WHEN status='Deferred' THEN '#cacae5'
   ELSE '#b8b8b8' END AS 'bgcolor',
  status AS 'Status',
  count (*) AS 'Number of tickets'
FROM ticket GROUP BY status
UNION
SELECT '#ff', 'Total', count(*)
FROM ticket
ORDER BY status

2012/5/31 Chen, Zon :
>
> Hi, I'm setting some reports for our Fossil ticket system, but I'm not 
> immediately familiar with SQL.  I've been muddling my way through with the 
> SQLLite documentation, but it would be really nice to see/steal some common 
> examples, such as the reports available on the fossil-scm.org.
>
> Would it be possible to please make the SQL of the reports used by the fossil 
> project viewable by anonymous users?  Or alternatively, if they could be 
> cut-pasted into the wiki.
>
> Thanks,
> zchen
>
> ___
> 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] fossil gdiff behavior with multiple files

2012-05-31 Thread Stephan Beal
On Thu, May 31, 2012 at 5:38 PM, Martin Gagnon  wrote:

> 
> ...What do you think ?
>

+1. While i don't think i'd use it often (i pipe to 'less' for that
purpose), but it would certainly be handy at times and more friendly for
UI-lovers/CLI-haters.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
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] Example ticket reports

2012-05-31 Thread Stephan Beal
On Thu, May 31, 2012 at 5:50 AM, Chen, Zon wrote:

> Would it be possible to please make the SQL of the reports used by the
> fossil project viewable by anonymous users?  Or alternatively, if they
> could be cut-pasted into the wiki.
>

IIRC[1], the current implementation requires write access to the
reports (the "t" permission) in order to be able to read the raw SQL. IMO
that is the correct behaviour because the SQL is an implementation detail.
(That's how i implemented it in the JSON API, in any case.)

There is nothing stopping a fossil admin from dumping the report SQL into a
wiki page. That could be done with a little scripting...

stephan@tiny:~/cvs/fossil/fossil$ f json report list
{
"fossil":"bdc29eb897210da6ccb535046e525e44c8a3b10c",
"timestamp":1338481168,
"command":"report/list",
"procTimeMs":12,
"payload":[
{
"report":1,
"title":"All Tickets",
"owner":"drh"
},
{
"report":2,
"title":"All open tickets.",
"owner":"drh"
},
...

stephan@tiny:~/cvs/fossil/fossil$ f json report get 1
{
"fossil":"bdc29eb897210da6ccb535046e525e44c8a3b10c",
"timestamp":1338481194,
"command":"report/get",
"procTimeMs":12,
"payload":{
"report":1,
"owner":"drh",
"title":"All Tickets",
"timestamp":1326377920,



it would be easy to write such a beast using a perl/php/ruby/java/etc (and,
if it absolutely must be so, even python).

The "wiki commit" command (or "json wiki save") could be used to import the
SQL into a wiki page.


[1] == i'm too tired to go dig around to get the definitive answer :/

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


[fossil-users] fossil gdiff behavior with multiple files

2012-05-31 Thread Martin Gagnon
Hi all,

I have a feature request about diff/gdiff when calling an external program
with multiple files.

In a particular case where, let say there's 40 modified files and you
execute:
$ fossil gdiff

without specifying any file, fossil will spawn the external diff program
(vimdiff in my case) on all changed files one by one. Which if a very nice
feature. But in the case I want to cancel, I have to exit vimdiff for all
the 40 files.

I propose a very simple fix, that would work (at least for vim users). In
vim, if I exit using ":cq" instead of ":q", vim exit without saving and
return error. So in that case, fossil could check at return value of the
diff program process and cancel diffing of other files when the diff
program return with error.

In same time, probably we don't want to continue to start the external diff
program for all other files after it return error once.

May be a more universal solution might work with any other external diff
programs ? Like prompting between every diff program execution a kind
message like:
  "39 more files to compare, do you want to continue (y)es / (n)o / (a)ll ?
 [y]:

What do you think ?

Regards

-- 
Martin G.
___
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 question about basics of using fossil

2012-05-31 Thread Matt Welland
On Thu, May 31, 2012 at 7:21 AM, Andrew Stuart <
andrew.stu...@supercoders.com.au> wrote:

> Hello all,
>
> I'm a complete newb with fossil and trying to grasp some basic concepts.
>
> I have an Ubuntu system that I am developing on.  I want to ensure that
> various files that I modify are in Fossil SCM.  There are source code files
> and also operating system configuration files.
>
> I use sudo to edit these files as most of the files are editable only by
> root.
>
> How do I use Fossil in this context?
> Where should I set up the fossil repository?  In my unprivileged user home
> directory?
> How should I be handling the need to use sudo to access the various files
> that I work on?  I suspect I'll be running into various permissions issues
> constantly?
>
> Would my workflow look something like this for example?
> 1: Create fossil repo in my home directory
> 2: Go to the location of a file I want to put in fossil
> 3: "fossil open" in this directory
> 4: "fossil add" the files I wish to put under scm
>
> Although I have read the quickstart guide it doesn't really nudge me in
> the right direction of how to actually drive it in a practical manner,
> especially where I have to use sudo.
>

>From your email I gather that you have a mix of files to control, some are
perhaps in /etc or some other system location and some are source files?

Your recipe above would work if *all* the files to be controlled live under
the location where you ran the "fossil open" command.

However I suggest not attempting to directly control the system files.
Instead copy the files to a working area where you do the "fossil open"
then write a Makefile that has rules to put the files in place. E.g.
something like this:

/etc/some/file.cfg : file.cfg
  sudo install file.cfg /etc/some/file.cfg



>
> thanks heaps.
>
> Andrew
> __**_
> 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


[fossil-users] Newbie question about basics of using fossil

2012-05-31 Thread SuperCoders

Hello all,

I'm a complete newb with fossil and trying to grasp some basic concepts.

I have an Ubuntu system that I am developing on.  I want to ensure  
that various files that I modify are in Fossil SCM.  There are source  
code files and also operating system configuration files.


I use sudo to edit these files as most of the files are editable only  
by root.


How do I use Fossil in this context?
Where should I set up the fossil repository?  In my unprivileged user  
home directory?
How should I be handling the need to use sudo to access the various  
files that I work on?  I suspect I'll be running into various  
permissions issues constantly?


Would my workflow look something like this for example?
1: Create fossil repo in my home directory
2: Go to the location of a file I want to put in fossil
3: "fossil open" in this directory
4: "fossil add" the files I wish to put under scm

Although I have read the quickstart guide it doesn't really nudge me  
in the right direction of how to actually drive it in a practical  
manner, especially where I have to use sudo.


thanks heaps.

Andrew
___
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] Security of Fossil

2012-05-31 Thread Konstantin Khomoutov
On Wed, May 30, 2012 at 10:56:15PM -0500, Thomas Stover wrote:

> > By my second question, I meant Fossil's "Administrator" account, not
> > that of windows.  Assuming that I don't find a solution for people
> > brute-forcing passwords for regular accounts, that's not a big deal.
> > However, if people can brute-force the Fossil Admin account, then
> > that would be a problem.
> > 
> > Similarly, if there was a feature where an account would get locked
> > out after 3 incorrect logins, that can't apply to the Admin account,
> > or else we wouldn't be able to unlock, etc.
[...]
> ok that makes sense. I do know that you can "unlock" the admin account
> by just doing a "fossil ui" on it locally, which I have done when I
> have just forgotten the password. I'd like to see what the other
> answers turn out to be.
fossil user password  -R repository_file.fossil
works just fine for changing the password for a user.

___
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] althttpd.c & apache log analyzers

2012-05-31 Thread Richard Hipp
On Thu, May 31, 2012 at 12:55 AM, Thomas Stover wrote:

> - The diff below implements "combined log format" used by several
>  popular web traffic analyzers, when the COMBINED_LOG_FORMAT macro is
>  defined. ie "gcc althttpd.c -DCOMBINED_LOG_FORMAT
>  -o /usr/local/bin/althttpd"
>

Checked in (with minor changes) here:
http://www.sqlite.org/docsrc/info/f5c16dc36c

-- 
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