On Fri, Jan 28, 2011 at 11:42 PM, Clark Christensen <[email protected]>wrote:

> Good.  This is nice, and complete, as far as I'm concerned.  Thanks for
> taking this on, and for changing to the "fat" format.
>

My pleasure. The addition to the json lib took me all of 15 minutes, and
required a 3-byte change in fossil. If life's changes were always that
simple.


> I might make use of this to do customized email notifications for
> new/changed tickets.
>

Please post your suggestions, preferably in JSON-structured format (you can
of course forego the extra quotes around keys - none of us are going to
throw a parse error).

The current code has two options to timeline:

--json | -j: unindented json
--json-indent | -J: 1 tab/level

i tried to add an optional numeric argument to specify the number of spaces,
but in certain args combinations that lead (for reasons i cannot comprehend)
to the query returning no rows. Something to do with the timeline's "n"
(result count) parameter, i think, but i didn't investigate it.

Here's what it looks like:

stephan@ludo:~/cvs/fossil/fossil$ ./fossil time -t w --json-indent -n 1
{
    "columns":[
        "rid",
        "uuid",
        "mDateTime",
        "comment",
        "primPlinkCount",
        "plinkCount",
        "mtime"
    ],
    "rows":[{
            "rid":10724,
            "uuid":"377b7dcd045c7018745f4ab0467cab4fac3f13e4",
            "mDateTime":"2011-01-28 11:05:34",
            "comment":"Changes to wiki page [Cookbook] (user: dmitry)",
            "primPlinkCount":7342276,
            "plinkCount":7342276,
            "mtime":2455589.962209
        }]
}
stephan@ludo:~/cvs/fossil/fossil$ ./fossil time -t w --json -n 1
{"columns":["rid", "uuid", "mDateTime", "comment", "primPlinkCount",
"plinkCount", "mtime"], "rows":[{"rid":10724,
"uuid":"377b7dcd045c7018745f4ab0467cab4fac3f13e4", "mDateTime":"2011-01-28
11:05:34", "comment":"Changes to wiki page [Cookbook] (user: dmitry)",
"primPlinkCount":7342276, "plinkCount":7342276, "mtime":2455589.962209}]}

(i apologize if your mail client has a heyday with that really long line.)

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to