Fossil

Check-in [dc8a5742]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add DISTINCT keyword to the main timeline_cmd query to avoid duplicates when specifying file or directory on the timeline command.

(to be checked by someone more experienced in SQL)

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | cmdline-timeline-enhancement
Files: files | file ages | folders
SHA1:dc8a5742a0720389501e51a974333f63d95c5908
User & Date: mgagnon 2014-10-17 19:20:51
Context
2014-10-17
20:44
Fix the special case when path refer to the root of the repository, in that case, just ignore the path argument. check-in: 3706dcb6 user: mgagnon tags: cmdline-timeline-enhancement
19:20
Add DISTINCT keyword to the main timeline_cmd query to avoid duplicates when specifying file or directory on the timeline command.

(to be checked by someone more experienced in SQL) check-in: dc8a5742 user: mgagnon tags: cmdline-timeline-enhancement

15:31
Enchance the command-line timeline to accept the name of a file or directory as an argument and then only show the entries that have changes to that file or directory. check-in: a50c3cfd user: drh tags: cmdline-timeline-enhancement
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/timeline.c.

1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668

/*
** Return a pointer to a static string that forms the basis for
** a timeline query for display on a TTY.
*/
const char *timeline_query_for_tty(int mlinkFlag){
  static const char zBaseSql[] =
    @ SELECT
    @   blob.rid AS rid,
    @   uuid,
    @   datetime(event.mtime%s) AS mDateTime,
    @   coalesce(ecomment,comment)
    @     || ' (user: ' || coalesce(euser,user,'?')
    @     || (SELECT case when length(x)>0 then ' tags: ' || x else '' end
    @           FROM (SELECT group_concat(substr(tagname,5), ', ') AS x







|







1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668

/*
** Return a pointer to a static string that forms the basis for
** a timeline query for display on a TTY.
*/
const char *timeline_query_for_tty(int mlinkFlag){
  static const char zBaseSql[] =
    @ SELECT DISTINCT
    @   blob.rid AS rid,
    @   uuid,
    @   datetime(event.mtime%s) AS mDateTime,
    @   coalesce(ecomment,comment)
    @     || ' (user: ' || coalesce(euser,user,'?')
    @     || (SELECT case when length(x)>0 then ' tags: ' || x else '' end
    @           FROM (SELECT group_concat(substr(tagname,5), ', ') AS x