Re: [fossil-users] RSS feeds

2013-02-26 Thread Stephan Beal
On Tue, Feb 26, 2013 at 11:30 AM, Martijn Coppoolse <
li...@martijn.coppoolse.com> wrote:

> That is probably what should be used to get the ticket title in the info
> page:
> http://fossil-scm.org/index.**html/artifact/9825d0cfe7?ln=**1699-1701
>
> I’d totally forgotten such a setting existed, but it can be configured on
> the tktsetup_timeline page.
>

And i never knew :/. But yes, that sounds like the proper approach. i won't
be able to do any significant hacking before the weekend but this has been
added to the TODO list.

Note that this is *not* a priority issue, though! I’m happy with the
> functionality as it currently is -- so far, I haven’t seen a ticket
> configuration that had a different ticket-title-expr, nor can I really see
> the need to change it from the default, 'title'.  :-)


True enough, but it is the right the to do - thanks for bringing it to my
attention.

-- 
- 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] RSS feeds

2013-02-26 Thread Martijn Coppoolse

On 20-2-2013 19:53, Stephan Beal wrote:

No objections were given, so here it is:

http://fossil-scm.org/index.html/info/dbaf520910

Thanks again to David Given (he did the majority of the work).


While writing a script that checks periodically if there's any new 
tickets, and sends out an e-mail to me by generating the relevant 'View 
Ticket' page; I happened to be poring over the config table of a fossil 
repository, and in there, I noticed the config item 'ticket-title-expr'.


That is probably what should be used to get the ticket title in the info 
page:

http://fossil-scm.org/index.html/artifact/9825d0cfe7?ln=1699-1701

I’d totally forgotten such a setting existed, but it can be configured 
on the tktsetup_timeline page.


Note that this is *not* a priority issue, though! I’m happy with the 
functionality as it currently is -- so far, I haven’t seen a ticket 
configuration that had a different ticket-title-expr, nor can I really 
see the need to change it from the default, 'title'.  :-)


--
Martijn Coppoolse

___
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] RSS feeds

2013-02-20 Thread Stephan Beal
On Mon, Feb 18, 2013 at 10:47 PM, Stephan Beal wrote:

> If we're all happy with that i'll merge it into trunk.
>

No objections were given, so here it is:

http://fossil-scm.org/index.html/info/dbaf520910

Thanks again to David Given (he did the majority of the work).

-- 
- 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] RSS feeds

2013-02-18 Thread Stephan Beal
On Mon, Feb 18, 2013 at 10:47 PM, Stephan Beal wrote:

> Please give this a once-over at your convenience (there's no hurry):
>
> http://fossil-scm.org/index.html/info/1c46835e4c
> resp.
> http://fossil-scm.org/index.html/timeline?r=timeline-rss-ticket
>

For completeness/clarity, here's the full diff from the trunk version it
was originally branched from:

http://fossil-scm.org/index.html/vdiff?from=fab09a17105957aa&to=timeline-rss-ticket

-- 
- 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] RSS feeds

2013-02-18 Thread Stephan Beal
On Mon, Feb 18, 2013 at 11:00 PM, Richard Hipp  wrote:

> Maybe change the WHERE clause on this line:
>
> http://fossil-scm.org/index.html/artifact/8a9f773c504b?ln=1758
>
> To read:   "glob '%q*'" or "like '%q%%' so that it works with just a
> prefix of the ticket uuid?
>

That's not necessary in this case because zTktName comes directly from the
manifest a few lines up:

http://fossil-scm.org/index.html/artifact/8a9f773c504b?ln=1746

:-?

-- 
- 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] RSS feeds

2013-02-18 Thread Richard Hipp
On Mon, Feb 18, 2013 at 4:47 PM, Stephan Beal  wrote:

> On Mon, Feb 18, 2013 at 10:06 PM, Stephan Beal wrote:
>
>> Good catch, i had forgotten that and will fix it - i recently learned
>> about PRAGMA table_info(TABLENAME), which gives us enough info to cleanly
>> check the column list without bypassing fossil's built-in db-API-level
>> error checking.
>>
>
> Please give this a once-over at your convenience (there's no hurry):
>
> http://fossil-scm.org/index.html/info/1c46835e4c
> resp.
> http://fossil-scm.org/index.html/timeline?r=timeline-rss-ticket
>
> That fixes the "missing title" (potential) problem.
>
> If we're all happy with that i'll merge it into trunk.
>

Maybe change the WHERE clause on this line:

http://fossil-scm.org/index.html/artifact/8a9f773c504b?ln=1758

To read:   "glob '%q*'" or "like '%q%%' so that it works with just a prefix
of the ticket uuid?


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


-- 
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] RSS feeds

2013-02-18 Thread Stephan Beal
On Mon, Feb 18, 2013 at 10:06 PM, Stephan Beal wrote:

> Good catch, i had forgotten that and will fix it - i recently learned
> about PRAGMA table_info(TABLENAME), which gives us enough info to cleanly
> check the column list without bypassing fossil's built-in db-API-level
> error checking.
>

Please give this a once-over at your convenience (there's no hurry):

http://fossil-scm.org/index.html/info/1c46835e4c
resp.
http://fossil-scm.org/index.html/timeline?r=timeline-rss-ticket

That fixes the "missing title" (potential) problem.

If we're all happy with that i'll merge it into trunk.

-- 
- 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] RSS feeds

2013-02-18 Thread Stephan Beal
On Mon, Feb 18, 2013 at 9:53 PM, Martijn Coppoolse <
li...@martijn.coppoolse.com> wrote:

> Unfortunately, I haven't had time to check (busy with other stuff), but
> how does the info page react to a ticket table which doesn't have a title
> field -- or do we assume that's one field which won't be removed or renamed?
>

Good catch, i had forgotten that and will fix it - i recently learned about
PRAGMA table_info(TABLENAME), which gives us enough info to cleanly check
the column list without bypassing fossil's built-in db-API-level error
checking.

-- 
- 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] RSS feeds

2013-02-18 Thread Martijn Coppoolse

Op 18-2-2013 16:12, Stephan Beal schreef:

i'll give them another once-over (i only briefly glanced over your
merge) and try to get that done in the next day or two.

If there are any objections, please voice them soon!


Unfortunately, I haven't had time to check (busy with other stuff), but 
how does the info page react to a ticket table which doesn't have a 
title field -- or do we assume that's one field which won't be removed 
or renamed?


That's the only potential issue I can see ATM.  I agree that other 
improvements can be made later on.




TODOs which come to mind:

- add a hyperlink to the RSS on the ticket view page.
- add the (whatever it's called) "embedded" RSS hint in the header. This
probably requires adding the current ticket ID to the TH1 engine, and i
can't say off-hand whether that requires any re-wiring or not.


The ticket ID is known to the TH1 engine already, when rendering the 
pages for viewing or editing a ticket: $


You might have to move the initialization of those variables to a point 
before the header gets written; but I have no idea whether there's any 
dependencies between writing (or having written) the header and 
initializing the ticket variables.


--
Martijn Coppoolse
___
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] RSS feeds

2013-02-18 Thread Stephan Beal
On Mon, Feb 18, 2013 at 4:01 PM, David Given  wrote:

> I can't think of any reason not to merge (assuming someone who knows
> what they're doing has had a look at the diffs to make sure I haven't
> made some stupid mistake). There are some more features that could be
> added but, as you say, they can be added later.
>

i'll give them another once-over (i only briefly glanced over your merge)
and try to get that done in the next day or two.

If there are any objections, please voice them soon!

TODOs which come to mind:

- add a hyperlink to the RSS on the ticket view page.
- add the (whatever it's called) "embedded" RSS hint in the header. This
probably requires adding the current ticket ID to the TH1 engine, and i
can't say off-hand whether that requires any re-wiring or not.

-- 
- 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] RSS feeds

2013-02-18 Thread David Given
Stephan Beal wrote:
[...]
> @David/Martijn: is there any reason not to merge this with the trunk?
> i.e. is it working as everyone would like it to?
> 
> Still todo (but can be done later): add a link in the ticket view page
> which points back to the ticket-specific RSS feed.

I can't think of any reason not to merge (assuming someone who knows
what they're doing has had a look at the diffs to make sure I haven't
made some stupid mistake). There are some more features that could be
added but, as you say, they can be added later.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-18 Thread Stephan Beal
On Tue, Feb 12, 2013 at 6:50 PM, Stephan Beal  wrote:

> On Tue, Feb 12, 2013 at 5:59 PM, David Given  wrote:
>
>> Stephan Beal wrote:
>> [...]
>> > @David: if you have made modifications since your original patch, those
>> > are not included here - please feel free to patch this further.
>>
>> Yes, I have --- fixed some bugs, actually. I've patched the changes in.
>>
>
> Great, thank you.
>

@David/Martijn: is there any reason not to merge this with the trunk? i.e.
is it working as everyone would like it to?

Still todo (but can be done later): add a link in the ticket view page
which points back to the ticket-specific RSS feed.

-- 
- 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] RSS feeds

2013-02-12 Thread Stephan Beal
On Tue, Feb 12, 2013 at 5:59 PM, David Given  wrote:

> Stephan Beal wrote:
> [...]
> > @David: if you have made modifications since your original patch, those
> > are not included here - please feel free to patch this further.
>
> Yes, I have --- fixed some bugs, actually. I've patched the changes in.
>

Great, thank you.

Is it possible to do a merge of only one file, in order to keep track of
> where the change came from?
>

Not that i'm aware of.

-- 
- 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] RSS feeds

2013-02-12 Thread Stephan Beal
On Tue, Feb 12, 2013 at 5:42 PM, Martijn Coppoolse <
li...@martijn.coppoolse.com> wrote:

> One question: as the 'title' field doesn’t start with 'tkt_', it *could* be
> removed from the ticket table.


That thought did occur to me i figured, "nobody in their right might would
remove the title field, right?" Famous last words, of course. i.e., i
punted on that potential problem for the time being.


>  Does the `db_text` function handle SQL errors by
> returning its first parameter?
>

No - the first parameter is only the "if no such record is found" backup.
It will fail fatally with a message like "unknown column 'title'" (or
similar) if the title column is gone or has been renamed.

In such a case, it would make the info page unusable for ticket change
> records.
>

Agreed, but in the interest of speed (i was at work ;) i skipped over that.
The fossil-internal db wrapper API treats any and all sqlite3-level
failures (e.g. statement preparation failure) as fatal. In order to fix
this i'll need to bypass the internal "convenience API." It's easy enough
to do, it just needs to be done.


> I can’t seem to find the definition of `db_text` (I haven’t got a clone of
> the
> Fossil repo here at work.)
>

All(? most of) of the "db_()" functions are in db.c.

stephan@tiny:~/cvs/fossil/fossil/src$ grep 'db_text' db.c
char *db_text(char const *zDefault, const char *zSql, ...){
...


-- 
- 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] RSS feeds

2013-02-12 Thread David Given
Stephan Beal wrote:
[...]
> @David: if you have made modifications since your original patch, those
> are not included here - please feel free to patch this further.

Yes, I have --- fixed some bugs, actually. I've patched the changes in.

Is it possible to do a merge of only one file, in order to keep track of
where the change came from?

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-12 Thread Martijn Coppoolse
On 12-2-2013 11:17, Stephan Beal wrote:
> http://fossil-scm.org/index.html/timeline?r=timeline-rss-ticket
> 
> that branch contains David's patch, plus i've added the ticket's title
> to the linked-to change details page to address your last comment.

Thanks a lot, Stephan!

One question: as the 'title' field doesn’t start with 'tkt_', it *could* be
removed from the ticket table.  Does the `db_text` function handle SQL errors by
returning its first parameter?

If not, this code could be problematic in the case of an altered ticket table
that does not have a 'ticket' field. (Personally, I don’t see why anyone would
want to remove that field, but... it is possible.)
In such a case, it would make the info page unusable for ticket change records.

I can’t seem to find the definition of `db_text` (I haven’t got a clone of the
Fossil repo here at work.)

> :-?
-- 
Martijn Coppoolse

___
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] RSS feeds

2013-02-12 Thread Stephan Beal
On Tue, Feb 12, 2013 at 10:27 AM, Martijn Coppoolse <
li...@martijn.coppoolse.com> wrote:

> I note that the info page for a ticket changes already has a link to the
> view ticket page, but the link text is the ticket's full UUID, labeled
> 'UUID' — which will sound rather obscure to the average user, and perhaps a
> tad threatening to some...
>
> Again, I have no idea if it’s that simple -- where would you get the
> ticket title from, if that is not part of the changes?


http://fossil-scm.org/index.html/timeline?r=timeline-rss-ticket

that branch contains David's patch, plus i've added the ticket's title to
the linked-to change details page to address your last comment.

@David: if you have made modifications since your original patch, those are
not included here - please feel free to patch this further.

:-?

-- 
- 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] RSS feeds

2013-02-12 Thread Martijn Coppoolse

On 11-2-2013 20:11, Stephan Beal wrote:

If the RSS entry links back to the ticket instead of the change record
then all entries in the feed will point to the same thing. That seems
much less helpful than linking to the change record, IMO.


Eh... yes, you’re right, of course.  Hadn’t thought of that. X-D

So, _if_ we want to make this more user-friendly, wouldn’t it suffice to 
add the ticket title (linking to the 'view ticket' page for that ticket) 
to the info page for a ticket change artifact?


I note that the info page for a ticket changes already has a link to the 
view ticket page, but the link text is the ticket's full UUID, labeled 
'UUID' — which will sound rather obscure to the average user, and 
perhaps a tad threatening to some...


Again, I have no idea if it’s that simple -- where would you get the 
ticket title from, if that is not part of the changes?


--
Martijn Coppoolse

___
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] RSS feeds

2013-02-11 Thread Stephan Beal
On Mon, Feb 11, 2013 at 7:45 PM, Martijn Coppoolse <
li...@martijn.coppoolse.com> wrote:

>
>> Also: I notice that the RSS feeds link to the change description page
>> (e.g.
>> https://cowlark.com/calculon/**info/**75c4948da0fe0e5a970148e44870b4**
>> be3940922a
>> ).
>> This is useful from a technical perspective, but not necessarily user
>> friendly, at least for tickets, where linking directly to the ticket
>> itself would be more appropriate. Any thoughts on this?
>>
>
> That is true.  I do like seeing what the specific changes were; it’s just
> that from a UX viewpoint it would be nice to have a link to the ticket
> itself feature more prominently; for example the ticket title linking to
> the 'view ticket' page.


If the RSS entry links back to the ticket instead of the change record then
all entries in the feed   will point to the same thing. That seems much
less helpful than linking to the change record, IMO.

-- 
- 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] RSS feeds

2013-02-11 Thread Martijn Coppoolse

On 11-2-2013 18:00, David Given wrote:

It doesn't show up at all in Chrome. I went into my skin to add RSS
links to the  elements, and then discovered they were already there...


No, in Chrome you need an extension too, like I wrote earlier:


You can install the RSS Subscription Extension (by Google)
https://chrome.google.com/webstore/detail/rss-subscription-extensio/nlbjncdgjeocebhnmkbbbdekmmmcbfjd

(or at http://goo.gl/XeLSB for short)





Customising the  link will probably require some clever TH1
scripting to figure out what kind of page the user is looking at, and
then generate the appropriate RSS feed URL, since the header is common
for all pages.


Yes, well, figuring out what kind of page we're on is not all that 
difficult; the default header already does that a lot (I don't really 
know how easy it is to match the start of a string in TH1, though).

I was rather wondering how to get the ticket UUID for the current page...


Is it worth having more obvious links in the main body text for the
appropriate pages?


I should think so, since none of the major browsers show a feed icon by 
default anymore (except Opera).  But that's something that can already 
be included in the customizable pages for editing and viewing tickets. 
It might be nice to include them in the default templates, though.




What parts (if any) are still missing? i still can't believe nobody
proposed this feature a long time ago.


Hm. A feed for a specific ticket report activity? Unfortunately I have
no idea how to implement it.





Well, I was expecting the timeline.rss to accept the same (basic)
options as the timeline page, but I noticed that the ?y=e parameter (the
list of events) isn’t recognized, as yet.


I can't seem to make this work --- it just returns the same timeline
view (the same as y=all). I see some code but don't follow how it works.
Can you give me a sample URL?


http://fossil-scm.org/index.html/timeline?y=e

Seeing as this results in 4 entries, events aren't used very extensively 
by the Fossil team themselves, it seems... :-)


But I can't figure out why the rss code doesn't isolate the events with 
event.type='e', either.




Also: I notice that the RSS feeds link to the change description page
(e.g.
https://cowlark.com/calculon/info/75c4948da0fe0e5a970148e44870b4be3940922a).
This is useful from a technical perspective, but not necessarily user
friendly, at least for tickets, where linking directly to the ticket
itself would be more appropriate. Any thoughts on this?


That is true.  I do like seeing what the specific changes were; it’s 
just that from a UX viewpoint it would be nice to have a link to the 
ticket itself feature more prominently; for example the ticket title 
linking to the 'view ticket' page.


But that would require changing the 'info' page's output for ticket changes.

--
Martijn Coppoolse

___
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] RSS feeds

2013-02-11 Thread Stephan Beal
On Mon, Feb 11, 2013 at 6:00 PM, David Given  wrote:

> Also: I notice that the RSS feeds link to the change description page
> (e.g.
> https://cowlark.com/calculon/info/75c4948da0fe0e5a970148e44870b4be3940922a
> ).
> This is useful from a technical perspective, but not necessarily user
> friendly, at least for tickets, where linking directly to the ticket
> itself would be more appropriate. Any thoughts on this?
>

i was thinking the same, but as soon as it's linked to the ticket (as
opposed to the change), people (or someone) will want an overview of the
exact change. Both are useful in different contexts, of course. i think the
lesser evil is to link to the change, which then has a link to the related
ticket at the top of the change page. Or maybe have yet another rss URL
flag which determines the type of link generated (change overview vs.
ticket).

-- 
- 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] RSS feeds

2013-02-11 Thread David Given
Martijn Coppoolse wrote:
> On 9-2-2013 10:58, Stephan Beal wrote:
[...]
> The Firefox extension that does the same thing is here:
> https://addons.mozilla.org/en-us/firefox/addon/rss-icon-in-awesombar/
> 
> In IE, the feed icon sitting in the Command Bar (which is off by default).
> 
> In Opera, it’s visible by default (IIRC).

It doesn't show up at all in Chrome. I went into my skin to add RSS
links to the  elements, and then discovered they were already there...

Customising the  link will probably require some clever TH1
scripting to figure out what kind of page the user is looking at, and
then generate the appropriate RSS feed URL, since the header is common
for all pages.

Is it worth having more obvious links in the main body text for the
appropriate pages?

>> What parts (if any) are still missing? i still can't believe nobody
>> proposed this feature a long time ago.

Hm. A feed for a specific ticket report activity? Unfortunately I have
no idea how to implement it.

> Well, I was expecting the timeline.rss to accept the same (basic)
> options as the timeline page, but I noticed that the ?y=e parameter (the
> list of events) isn’t recognized, as yet.

I can't seem to make this work --- it just returns the same timeline
view (the same as y=all). I see some code but don't follow how it works.
Can you give me a sample URL?

Also: I notice that the RSS feeds link to the change description page
(e.g.
https://cowlark.com/calculon/info/75c4948da0fe0e5a970148e44870b4be3940922a).
This is useful from a technical perspective, but not necessarily user
friendly, at least for tickets, where linking directly to the ticket
itself would be more appropriate. Any thoughts on this?

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-11 Thread Martijn Coppoolse

On 9-2-2013 10:58, Stephan Beal wrote:

Thanks to the rss reader tip from Martin i can finally try this out. i
like it :).


The Firefox extension that does the same thing is here:
https://addons.mozilla.org/en-us/firefox/addon/rss-icon-in-awesombar/

In IE, the feed icon sitting in the Command Bar (which is off by default).

In Opera, it’s visible by default (IIRC).


What parts (if any) are still missing? i still can't believe nobody
proposed this feature a long time ago.


Well, I was expecting the timeline.rss to accept the same (basic) 
options as the timeline page, but I noticed that the ?y=e parameter (the 
list of events) isn’t recognized, as yet.


Since I haven’t really used events so far, I’m not too bothered. But it 
might come in handy some day... (I’m still trying to come up with an 
easy way to combine tags and the RSS feed to provide an easy-to-maintain 
auto-update mechanism for [some of] my projects).

--
Martijn Coppoolse

___
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] RSS feeds

2013-02-09 Thread Stephan Beal
On Wed, Feb 6, 2013 at 6:46 PM, David Given  wrote:

> Stephan Beal wrote:
> [...]
> > This seems to not _quite_ do it:
> >
> > http://localhost:8080/timeline?y=t&tkt=cd201d69bb
>
> timeline.rss, surely?
>

Thanks to the rss reader tip from Martin i can finally try this out. i like
it :).

What parts (if any) are still missing? i still can't believe nobody
proposed this feature a long time ago.

-- 
- 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] RSS feeds

2013-02-06 Thread Martijn Coppoolse

Op 6-2-2013 18:46, David Given schreef:

Checkin:

http://fossil-scm.org/index.html/vinfo/d244452bda?sbs=1

I haven't figured out how to get the web interface to give me a diff of
just one file against trunk, though.


If you go to the file's timeline at
http://fossil-scm.org/index.html/finfo?name=src/rss.c
then, click the timeline box next to the last 'trunk' version of the 
file, and finally click on the timeline box next to your most recent 
version, you will be redirected to the following diff:

http://fossil-scm.org/index.html/fdiff?v1=db44782246b1c&v2=01e85ec41a53a

Is that what you were looking for?


It's also live on https://cowlark.com/calculon if you want to play with it.


Looking good!  Thanks a lot, David!

--
Martijn Coppoolse
___
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] RSS feeds

2013-02-06 Thread Martijn Coppoolse

Op 6-2-2013 19:53, Stephan Beal schreef:

Normally i love Google Chrome but right now it tells me "oops, there is
no service available for this file type" and refuses to do anything
useful with the RSS feed. Aarrgghh. i don't have another browser on this
machine and am too tired to fight with it. i'll check it out tomorrow
from my dev machine.


You can install the RSS Subscription Extension (by Google)
https://chrome.google.com/webstore/detail/rss-subscription-extensio/nlbjncdgjeocebhnmkbbbdekmmmcbfjd

(or at http://goo.gl/XeLSB for short)

--
Martijn Coppoolse
___
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] RSS feeds

2013-02-06 Thread Stephan Beal
On Wed, Feb 6, 2013 at 6:46 PM, David Given  wrote:

> Stephan Beal wrote:
> [...]
> > This seems to not _quite_ do it:
> >
> > http://localhost:8080/timeline?y=t&tkt=cd201d69bb
>
> timeline.rss, surely?
>

Doh - that explains it. (And don't call me Shirley.[1])

Normally i love Google Chrome but right now it tells me "oops, there is no
service available for this file type" and refuses to do anything useful
with the RSS feed. Aarrgghh. i don't have another browser on this machine
and am too tired to fight with it. i'll check it out tomorrow from my dev
machine.


[1] i've been waiting for years for an opportunity to say that.
http://www.youtube.com/watch?v=0A5t5_O8hdA

-- 
- 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] RSS feeds

2013-02-06 Thread David Given
Stephan Beal wrote:
[...]
> This seems to not _quite_ do it:
> 
> http://localhost:8080/timeline?y=t&tkt=cd201d69bb

timeline.rss, surely?

In fact, it hadn't occurred to me to look at the timeline code, which I
have now done, and have fixed my performance issues by copying what it did.

Checkin:

http://fossil-scm.org/index.html/vinfo/d244452bda?sbs=1

I haven't figured out how to get the web interface to give me a diff of
just one file against trunk, though.

It's alsolive on https://cowlark.com/calculon if you want to play with it.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-06 Thread Stephan Beal
On Wed, Feb 6, 2013 at 2:32 PM, David Given  wrote:

> The reason it's not checked in is that there's an unfortunate
> consequence: specifying tag=trunk causes my fossil session to spin
> endlessly evaluated the query, presumably because the select from
> tagxref is returning a huge number of values. Any suggestions for
> optimisation?
>

This seems to not _quite_ do it:

http://localhost:8080/timeline?y=t&tkt=cd201d69bb

(run against the main fossil repo)

i would expect only changes made to that ticket, but i am also seeing other
ticket changes.

http://localhost:8080/timeline?tag=trunk

is working just fine (and fast) for me.

-- 
- 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] RSS feeds

2013-02-06 Thread David Given
David Given wrote:
[...]
> I think I can do better than that, anyway. What I'd really like is to be
> able to specify a particular Thing (is 'artifact' the right word here?)
> and get an RSS feed for that Thing --- be it a file, wiki page, ticket,
> branch etc. I'll need to study the schema to see what's feasible.

Okay, the attached patch (from trunk) allows the timeline to be filtered
by tag, ticket, filename and wiki name. Plus I fixed the error code
(thanks for that, cut-and-paste error).

The reason it's not checked in is that there's an unfortunate
consequence: specifying tag=trunk causes my fossil session to spin
endlessly evaluated the query, presumably because the select from
tagxref is returning a huge number of values. Any suggestions for
optimisation?

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│
--- src/rss.c
+++ src/rss.c
@@ -19,20 +19,48 @@
 */
 #include "config.h"
 #include 
 #include "rss.h"
 #include 
+
+static int append_tag_filter(Blob* bSQL, const char* zName, const char* zType)
+{
+  if ( zName ){
+int nTagId = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB '%s-%q*'",
+  zType, zName);
+if ( nTagId == 0 ){
+  return 0;
+}
+blob_appendf(bSQL, " AND objid IN (SELECT rid FROM tagxref WHERE 
tagid=%d)", nTagId);
+  }
+  return 1;
+}
 
 /*
 ** WEBPAGE: timeline.rss
+** URL:  /timeline.rss/y=TYPE&n=LIMIT&tkt=UUID&tag=TAG&name=FILENAME&wiki=NAME
+**
+** Produce an RSS feed of the timeline.
+**
+** TYPE may be: all, ci (show checkins only), t (show tickets only),
+** w (show wiki only). LIMIT is the number of items to show.
+**
+** tkt=UUID filters for only those events for the specified ticket. tag=TAG
+** filters for a tag, and name=FILENAME for a file. Some combinations may be
+** used.
 */
+
 void page_timeline_rss(void){
   Stmt q;
   int nLine=0;
   char *zPubDate, *zProjectName, *zProjectDescr, *zFreeProjectName=0;
   Blob bSQL;
   const char *zType = PD("y","all"); /* Type of events.  All if NULL */
+  const char *zTicketUuid = PD("tkt",NULL);
+  const char *zTag = PD("tag",NULL);
+  const char *zFilename = PD("name",NULL);
+  const char *zWiki = PD("wiki",NULL);
   int nLimit = atoi(PD("n","20"));
   const char zSQL1[] =
 @ SELECT
 @   blob.rid,
 @   uuid,
@@ -62,10 +90,11 @@
 if( !g.perm.Read ){
   if( g.perm.RdTkt && g.perm.RdWiki ){
 blob_append(&bSQL, " AND event.type!='ci'", -1);
   }else if( g.perm.RdTkt ){
 blob_append(&bSQL, " AND event.type=='t'", -1);
+
   }else{
 blob_append(&bSQL, " AND event.type=='w'", -1);
   }
 }else if( !g.perm.RdWiki ){
   if( g.perm.RdTkt ){
@@ -76,10 +105,27 @@
 }else if( !g.perm.RdTkt ){
   assert( !g.perm.RdTkt &&& g.perm.Read && g.perm.RdWiki );
   blob_append(&bSQL, " AND event.type!='t'", -1);
 }
   }
+
+  if( !append_tag_filter(&bSQL, zTicketUuid, "tkt") ){
+return;
+  }
+  if( !append_tag_filter(&bSQL, zTag, "sym") ){
+return;
+  }
+  if( !append_tag_filter(&bSQL, zWiki, "wiki") ){
+return;
+  }
+
+  if ( zFilename ){
+blob_appendf(&bSQL,
+  " AND (SELECT mlink.fnid FROM mlink WHERE event.objid=mlink.mid) IN 
(SELECT fnid FROM filename WHERE name=%Q %s)",
+zFilename, filename_collation()
+);
+  }
 
   blob_append( &bSQL, " ORDER BY event.mtime DESC", -1 );
 
   cgi_set_content_type("application/rss+xml");
 



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-06 Thread Stephan Beal
On Wed, Feb 6, 2013 at 12:55 PM, Martijn Coppoolse <
li...@martijn.coppoolse.com> wrote:

> If the error message is to be returned as-is, perhaps a different HTTP
> status could be issued, like 500 (instead of 200). Though I seem to
> remember that Fossil had trouble returning other status codes, or that the
> authors didn’t want to use HTTP status codes when the problem was not on
> the HTTP layer, but application-related (which this is, strictly speaking).
>

At the moment fossil is pretty much hard-coded to HTTP 200 or 500 (meaning
it exits with non-0, which the web server then translates to 500). For the
JSON API i had to do a good deal of plumbing to avoid that fossil avoids
exits with 500 (b/c i want to return an app-level error code whenever
possible) and it "shouldn't" be a great deal of work to add similar
plumbing to the non-JSON cases, such that any given fossil internal
function which currently exits fatally could set an arbitrary HTTP code by
setting, e.g. (g.httpCode=666) before calling fossil_fatal() (or similar).
That said, i wouldn't expect an RSS reader to be able to deal with anything
but 200 or a redirect.

< link rel="alternate" type="application/rss+xml" title="Ticket changes
> feed" href="timeline.rss?tkt=**9e114e9de0" />
>

+1


> The Firefox extension appears to pick it up wherever the link is on the
> page; I don’t know about other browser( extension)s and feed readers.
> Officially[1], the link is supposed to go in the < head/> section: does
> anybody know if the current ticket ID is available from TH1 when processing
> the header?
>

It depends on how the function building the page is structured. What
normally happens is...

- command handler function renders the page header
- command handler runs its own logic, which may very well fail fatally. In
these cases the error message will (normally) be output as part of the page
body, after the header has been generated.
- command handler renders the footer if a fatal exit has not been triggered.

For a straightforward example, see stat.c:stat_page().

My point is only that a page _could_ make the ticket ID available for the
page header but it must explicitly handle things in proper order.

-- 
- 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] RSS feeds

2013-02-06 Thread Martijn Coppoolse

On 6-2-2013 1:03, David Given wrote:

It lives!

https://cowlark.com/calculon/tktview?name=9e114e9de0
https://cowlark.com/calculon/timeline.rss?tkt=9e114e9de0


Thanks a lot!
I’d forgotten that the UUID is not the original ticket ID.


http://www.fossil-scm.org/xfer/info/3f43ab397e


Am I right when reading the following lines as erroring out when no 
ticket with that ID was found, then writing the HTML footer?


http://www.fossil-scm.org/xfer/artifact/f7ea590658?ln=97-100

If so, wouldn’t it be better to return an empty (but valid) RSS feed?
The error message could be included in the feed title or description. 
Or, provide a single entry in the RSS feed, which merely mentions the 
error message.


If the error message is to be returned as-is, perhaps a different HTTP 
status could be issued, like 500 (instead of 200). Though I seem to 
remember that Fossil had trouble returning other status codes, or that 
the authors didn’t want to use HTTP status codes when the problem was 
not on the HTTP layer, but application-related (which this is, strictly 
speaking).



It probably also wants changes to the view ticket code to add [RSS feed]
to the menu, but that can wait until I see if anyone likes it. (The link
on the Calculon site above is part of the skin.)


Very nice!

The (default) skin is probably where you’d want to include the link 
anyway.  It might be nice to include an autodiscovery link for that 
specific ticket on the page as well:


< link rel="alternate" type="application/rss+xml" title="Ticket changes 
feed" href="timeline.rss?tkt=9e114e9de0" />


The Firefox extension appears to pick it up wherever the link is on the 
page; I don’t know about other browser( extension)s and feed readers.
Officially[1], the link is supposed to go in the < head/> section: does 
anybody know if the current ticket ID is available from TH1 when 
processing the header?


  [1] http://www.rssboard.org/rss-autodiscovery

Of course, if the feed is about a specific ticket, then that could be 
reflected in the feed's title and description as well, like putting the 
ticket title in the feed's title, and the original ticket description
in the feed's description.  (I’m freewheeling a bit here: this would 
probably mean a lot more ticket-specific code).



Thanks again,
--
Martijn Coppoolse

___
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] RSS feeds

2013-02-06 Thread Stephan Beal
On Wed, Feb 6, 2013 at 11:05 AM, David Given  wrote:

> Grr. The entire server seems to have gone down. I don't believe that's
> fossil-related. (It's a very small ARM box and is usually pretty
> reliable, but...) I'll have to head home and reboot it.
>

No rush - i can't play with it before Friday night, anyway :(.


> I think I can do better than that, anyway. What I'd really like is to be
> able to specify a particular Thing (is 'artifact' the right word here?)
> and get an RSS feed for that Thing --- be it a file, wiki page, ticket,
> branch etc. I'll need to study the schema to see what's feasible.
>

The JSON "artifact" command offers something similar (and yes, artifact is
the correct term), e.g.:

[stephan@host:~/cvs/fossil/fossil]$ f json artifact fe56e5aa4f | head -20
{
"fossil":"fe56e5aa4f000b9498966c0aabf050e7973ffb19",
"timestamp":1360149231,
"command":"artifact",
"procTimeMs":4,
"payload":{
"type":"checkin",
"uuid":"fe56e5aa4f000b9498966c0aabf050e7973ffb19",
"isLeaf":true,
"timestamp":1359721993,
"user":"jan.nijtmans",
"comment":"Fix out-of-order variable declaration (VC6 cannot handle that).
\nMove MAX_REDIRECTS definition to xfer.c, so it can be converted to a
fossil setting later.",
"parents":["13ffb9b4d1eb3f97b9704d341a3f65eaadce1cc3"],
"tags":["trunk"],
"files":[
...
[stephan@host:~/cvs/fossil/fossil]$ f json artifact
ac97cee94c1e12e69194d6a4868dd781642e744e
{
... "payload":{
"size":10194,
"parent":"e93ee24b65e549badf619d7d7a7af613f28bf626",
"checkins":[{
"name":"src/http.c",
"timestamp":1359721993,
"comment":"Fix out-of-order variable declaration (VC6 cannot handle that).
\nMove MAX_REDIRECTS definition to xfer.c, so it can be converted to a
fossil setting later.",
"user":"jan.nijtmans",
"checkin":"fe56e5aa4f000b9498966c0aabf050e7973ffb19",
"branch":"trunk",
"state":"modified"
}],
"type":"file",
"uuid":"ac97cee94c1e12e69194d6a4868dd781642e744e"
}
}


So we have a proof of concept for what you're looking for.


-- 
- 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] RSS feeds

2013-02-06 Thread David Given
Stephan Beal wrote:
> On Wed, Feb 6, 2013 at 1:03 AM, David Given  > wrote:
[...]
> https://cowlark.com/calculon/tktview?name=9e114e9de0
> https://cowlark.com/calculon/timeline.rss?tkt=9e114e9de0
[...]
> "The webpage
> at *https://cowlark.com/calculon/timeline.rss?tkt=9e114e9de0* might be
> temporarily down or it may have moved permanently to a new web address."

It's back up again.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-06 Thread David Given
Stephan Beal wrote:
[...]
> "The webpage
> at *https://cowlark.com/calculon/timeline.rss?tkt=9e114e9de0* might be
> temporarily down or it may have moved permanently to a new web address."

Grr. The entire server seems to have gone down. I don't believe that's
fossil-related. (It's a very small ARM box and is usually pretty
reliable, but...) I'll have to head home and reboot it.

[...]
> A minor suggestion: if tkt=xxx is set then y=t could be implied.

That seems to be pretty much how it comes out in the wash --- if you're
filtering the timeline to show only one specific ticket, then that's
pretty much equivalent to showing tickets only.

I think I can do better than that, anyway. What I'd really like is to be
able to specify a particular Thing (is 'artifact' the right word here?)
and get an RSS feed for that Thing --- be it a file, wiki page, ticket,
branch etc. I'll need to study the schema to see what's feasible.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-06 Thread Stephan Beal
On Wed, Feb 6, 2013 at 1:03 AM, David Given  wrote:

> https://cowlark.com/calculon/tktview?name=9e114e9de0
> https://cowlark.com/calculon/timeline.rss?tkt=9e114e9de0


:-D

"The webpage at
*https://cowlark.com/calculon/timeline.rss?tkt=9e114e9de0* might
be temporarily down or it may have moved permanently to a new web address."

:-(

i know calculon was online a few days ago because i browsed through the
docs and examples (embeddable scripting languages intrigue me).

artifact, which means it needs ticket-specific code. The code is simple,
> however:
>
> http://www.fossil-scm.org/xfer/info/3f43ab397e
>
> It probably also wants changes to the view ticket code to add [RSS feed]
> to the menu, but that can wait until I see if anyone likes it. (The link
> on the Calculon site above is part of the skin.)
>

A minor suggestion: if tkt=xxx is set then y=t could be implied.

-- 
- 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] RSS feeds

2013-02-05 Thread David Given
On 05/02/13 16:51, Stephan Beal wrote:
[...]
> LOL - i know that problem all too well ;). And my boss can unfortunately
> tell the difference between C and Java code :/.

It lives!

https://cowlark.com/calculon/tktview?name=9e114e9de0
https://cowlark.com/calculon/timeline.rss?tkt=9e114e9de0

It's not very orthogonal. I didn't realise at first that the UUID in the
event/blob is, of course, the UUID of the *change* and not the ticket,
so I couldn't do a nice generic way to only show events for a specific
artifact, which means it needs ticket-specific code. The code is simple,
however:

http://www.fossil-scm.org/xfer/info/3f43ab397e

It probably also wants changes to the view ticket code to add [RSS feed]
to the menu, but that can wait until I see if anyone likes it. (The link
on the Calculon site above is part of the skin.)

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│ "Of course, on a sufficiently small planet, 40 km/hr is, in fact,
│ sufficient to punt the elastic spherical cow into low orbit." ---
│ Brooks Moses on r.a.sf.c



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-05 Thread Joerg Sonnenberger
On Tue, Feb 05, 2013 at 04:47:37PM +, David Given wrote:
> (Could someone explain the relationship between rids and UUIDs?)

rids are the integer primary keys of the blob table. UUIDs are the
global persistent unique key of the same table. UUIDs stay the same
across repositories, rids depend on the order objects are added.

Joerg
___
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] RSS feeds

2013-02-05 Thread Stephan Beal
On Tue, Feb 5, 2013 at 5:47 PM, David Given  wrote:

> (Could someone explain the relationship between rids and UUIDs?)
>

>From what i understand (perhaps incorrectly), rids are effectively internal
values, and "shouldn't" be used in public access to the data. While they
_are_ (so far) stable, there has never been (AFAIK) any guaranty that they
stay that way. So far none of the public interfaces use them (though the
JSON API did for a while, i removed them after realizing that the HTML
interface doesn't use them anywhere).

Unfortunately I didn't get a chance to investigate because then my boss
> came back into the room...
>

LOL - i know that problem all too well ;). And my boss can unfortunately
tell the difference between C and Java code :/.

-- 
- 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] RSS feeds

2013-02-05 Thread David Given
Martijn Coppoolse wrote:
[...]
> Not *completely*. The fields starting with `tkt_` are mandatory, and
> can’t be removed.  The ticket-ID being one of them, adding it as a
> filtering parameter to the "timeline.rss" feed shouldn’t be problematic.
> 
> Filtering on the non-mandatory fields would probably be a lot more
> problematic, indeed.

I thought of just filtering the timeline view by ticket UUID (which is
returned as part of the query anyway); that way you can just supply the
ticket name as part of the URL. The code to do this was surprisingly
straightforward. Didn't work, of course, but that could be due to me not
understanding how to extract URL fields.

(Could someone explain the relationship between rids and UUIDs?)

Unfortunately I didn't get a chance to investigate because then my boss
came back into the room...

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-05 Thread Martijn Coppoolse

On Tue, Feb 5, 2013 at 11:29 AM, David Given  wrote:
The code doesn't look too complicated. I presume I'd just need to add an
extra URL parameter for the ticket id and then add another condition to
the SELECT statement. I'll have a look.



On 2013-02-05 11:37, Stephan Beal wrote:
For tickets it's (unfortunately) more complicated than that because
tickets can have custom fields, custom stati, etc. They are, in essence,
completely configurable by the client,


Not *completely*. The fields starting with `tkt_` are mandatory, and 
can’t be removed.  The ticket-ID being one of them, adding it as a 
filtering parameter to the "timeline.rss" feed shouldn’t be problematic.


Filtering on the non-mandatory fields would probably be a lot more 
problematic, indeed.

--
Martijn Coppoolse

___
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] RSS feeds

2013-02-05 Thread Stephan Beal
On Tue, Feb 5, 2013 at 11:29 AM, David Given  wrote:

> The code doesn't look too complicated. I presume I'd just need to add an
> extra URL parameter for the ticket id and then add another condition to
> the SELECT statement. I'll have a look.
>

For tickets it's (unfortunately) more complicated than that because tickets
can have custom fields, custom stati, etc. They are, in essence, completely
configurable by the client, making generic code (like an RSS field or
(*ahem*) a JSON API) more difficult than it would appear on the surface. A
year or so ago i started diving into tkt.c to see how best to add a tickets
API to the JSON interface, but was quickly undone by the ticket system's
internal flexibility.

That's not to say it's impossible, just that it's not simply a matter of
copy/tweaking the existing RSS code (though there will of course be much of
that going on, too ;).

-- 
- 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] RSS feeds

2013-02-05 Thread David Given
Martijn Coppoolse wrote:
[...]
> I too have added a set of auto-discovery links to my headers. That way,
> most (desktop) browsers will display a feed icon, which when clicked
> pops up a menu of the different RSS feeds available.

Gosh, I'd forgotten about that... would some more explicit RSS feed
links in the timeline view be useful, to make it more obvious such
things exist (and to provide the special-purpose RSS links, for example
to the tickets)?

[...]
> But looking at the source code in [rss.c][1], this is currently not
> supported.  And while I can read C, I’ve never written a line of it, so
> I’ll leave an eventual patch for someone else to write. :-)

The code doesn't look too complicated. I presume I'd just need to add an
extra URL parameter for the ticket id and then add another condition to
the SELECT statement. I'll have a look.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│



signature.asc
Description: OpenPGP digital 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] RSS feeds

2013-02-05 Thread Stephan Beal
On Tue, Feb 5, 2013 at 11:04 AM, Martijn Coppoolse <
li...@martijn.coppoolse.com> wrote:

> On 4-2-2013 18:58, David Given wrote:
>
>> Is there a similar mechanism for getting the RSS feed *for a specific
>> ticket*? I'd like to be able to point users at it so they can get
>> updates for tickets they submit (as fossil won't email them about
>> updates yet).
>>
>
> That would be really handy!  If that existed, it should also be relatively
> easy to add an auto-discovery link to the page for the feed of updates *to
> that specific ticket*. This could also be used to provide a link to some
> RSS-to-email service like Blogtrottr.
>
> But looking at the source code in [rss.c][1], this is currently not
> supported.  And while I can read C, I’ve never written a line of it, so
> I’ll leave an eventual patch for someone else to write. :-)
>


i find this idea very intriguing and cannot believe that nobody has
suggested it all this time. i will explore this, but will not be able to
get to it until the weekend. Solving this problem will also give me ideas
on how to add the missing tickets API for the JSON bits.

-- 
- 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] RSS feeds

2013-02-05 Thread Martijn Coppoolse

On 4-2-2013 18:58, David Given wrote:

I know there's an unpublicised mechanism for getting the RSS feed of a
timeline --- I'm using it to get notifications of new ticket activity
for my project.


I too have added a set of auto-discovery links to my headers. That way, 
most (desktop) browsers will display a feed icon, which when clicked 
pops up a menu of the different RSS feeds available.




Is there a similar mechanism for getting the RSS feed *for a specific
ticket*? I'd like to be able to point users at it so they can get
updates for tickets they submit (as fossil won't email them about
updates yet).


That would be really handy!  If that existed, it should also be 
relatively easy to add an auto-discovery link to the page for the feed 
of updates *to that specific ticket*. This could also be used to provide 
a link to some RSS-to-email service like Blogtrottr.


But looking at the source code in [rss.c][1], this is currently not 
supported.  And while I can read C, I’ve never written a line of it, so 
I’ll leave an eventual patch for someone else to write. :-)


   [1] http://www.fossil-scm.org/index.html/finfo?name=src/rss.c

--
Martijn Coppoolse

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