At 02:32 PM 11/7/2011, Gilles wrote: >I guess it would make more sense that -n stands for "number of >check-in's", but it's not returning that number. > >I updated from 1.19 to 1.20, and re-ran the command on my repo: >"-n 5" still doesn't return the last five check-in's. Maybe this >is not what the "-n" switch mean.
Without examining the code, I've tried a couple of experiments in a repo of my own. It appears that the -n N option specifies a desired number of lines to output, but tests it only between complete timeline entries. Also, the lines containing only a date are not counted against N. So if your checkin comments are all short enough there are many of them per day, then you will have about two lines per entry and you can estimate the number of entries printed for -n N to be N/2. However, if your entries are more explanatory or occur at one per day or less then you will get fewer entries. If your comments are typically very verbose or vary a lot in length, then the number of output lines may bear very little relationship to the number of items output. The Timeline tab in the web ui appears to count actual entries not length. I'd respectfully suggest that since trimming text to a set number of lines is an easy operation but counting entries is not, the fossil timeline command's -n option should count entries and not try (and fail) to count lines. Ross Berteig [email protected] Cheshire Engineering Corp. http://www.CheshireEng.com/ _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

