Fossil SCM
fossil timeline: option for single line per log entry
e167be3b927014a…
· opened 13 years ago
- Type
- Feature_Request
- Priority
- —
- Severity
- Minor
- Resolution
- Fixed
- Subsystem
- —
- Created
- March 19, 2013 11:59 a.m.
For console processing, it would be nice if "fossil timeline -t ci" and "fossil finfo -l" had an additional option which produced one log entry per line, even if it extended beyond the terminal width. This would be useful for external tools parsing the repository activity, besides the current format which is adequate for visual inspection.
For example, $ fossil timeline -t ci == 2013-03-19 == 11:45:27 (ad72bf2392) CURRENT test (user: user2 tags: trunk) == 2013-03-07 == 15:23:41 (c5b25c1b6d) BRANCH new xml and this is a very long entry that continues on next line on the console (user: user1 tags: trunk) 15:22:11 (fbc698da06) hello 1 (user: user1 tags: trunk)
and if the switch was the "-1" (1 per line) the output could be: $ fossil timeline -t ci -1 2013-03-19 11:45:27 (ad72bf2392) CURRENT test (user: user2 tags: trunk) 2013-03-07 15:23:41 (c5b25c1b6d) BRANCH new xml and this is a very long entry that continues on next line on the console (user: user1 tags: trunk) 2013-03-07 15:22:11 (fbc698da06) hello 1 (user: user1 tags: trunk)
Comments (5)
For console processing, it would be nice if "fossil timeline -t ci" and "fossil finfo -l" had an additional option which produced one log entry per line, even if it extended beyond the terminal width. This would be useful for external tools parsing the repository activity, besides the current format which is adequate for visual inspection.
For example, $ fossil timeline -t ci == 2013-03-19 == 11:45:27 (ad72bf2392) CURRENT test (user: user2 tags: trunk) == 2013-03-07 == 15:23:41 (c5b25c1b6d) BRANCH new xml and this is a very long entry that continues on next line on the console (user: user1 tags: trunk) 15:22:11 (fbc698da06) hello 1 (user: user1 tags: trunk)
and if the switch was the "-1" (1 per line) the output could be: $ fossil timeline -t ci -1 2013-03-19 11:45:27 (ad72bf2392) CURRENT test (user: user2 tags: trunk) 2013-03-07 15:23:41 (c5b25c1b6d) BRANCH new xml and this is a very long entry that continues on next line on the console (user: user1 tags: trunk) 2013-03-07 15:22:11 (fbc698da06) hello 1 (user: user1 tags: trunk)
This is similar to the Feature Request [5927b03873]. Maybe they should be merged?
This can done through some SQL magic, e.g.:
$ fossil sqlite3 repository.fossil -separator " " "SELECT DATETIME(event.mtime) as mtime,substr(blob.uuid,1,10) as id,event.comment as comment,event.user as user,tagxref.value as tags FROM event,tagxref,tag,blob WHERE event.type='ci' AND event.objid=blob.rid AND event.objid=tagxref.rid and tagxref.tagid=tag.tagid and tag.tagname='branch' ORDER BY mtime DESC;"
This could be done with the -W|--with option, as in the "timeline_cmd_dash_n_fix" branch.
Fixed in [2eb492e282]: The option "--width 0" can now be used for that.