Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | tidy up of `reformTimeline' plus small fixes. |
---|---|
Timelines: | family | ancestors | descendants | both | dresden |
Files: | files | file ages | folders |
SHA1: |
da5f1a34677f7eb19ad9a9c707cdde7f |
User & Date: | j 2013-07-26 14:52:15 |
Context
2013-07-26
| ||
14:56 | different colour scheme for file status information. check-in: 1767aecf48 user: j tags: dresden | |
14:52 | tidy up of `reformTimeline' plus small fixes. check-in: da5f1a3467 user: j tags: dresden | |
12:19 | marginal. check-in: c51edf73ff user: j tags: dresden | |
Changes
Changes to fsl.
︙ | ︙ | |||
405 406 407 408 409 410 411 | lappend out "$record" } return $out } proc reformTimeline {records revnums} { # -------------------------------------------------------- | | | | | | | | | < | > | | | | > < < | > | | | | | < > | | | < < < < < | < | < < < < < < < < | < < < < < < | < < < < < | < | | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | lappend out "$record" } return $out } proc reformTimeline {records revnums} { # -------------------------------------------------------- # expected input: list of linefeed terminated lines as provided by # `unwrapTimeline', i.e. date lines, commit lines containing the whole # commit message, and lines containg optional file status information (if # `-showfiles' is used). # # output: a list of the following elements # -- single line checkin information (all but first preceded by linefeed) # -- status information lines (one per file) # -- a single trailing linefeed # # not that in the output list the linefeeds are "shifted" # to the front of the timeline entries and that status information # is kept in separate list entries. this allows to use the # colorizers without modification while still getting the # printed output to the form "one line per checkin". # -------------------------------------------------------- set numrev {} set out {} set usertag "" set rgxdate {^=== [0-9-]+ ===$} set rgxtime {^\d\d:\d\d:\d\d} set rgxrev {\[([a-f\d]{10})([^\]]*)\]} set rgxuser {\(user: .*\)} set cnt 0 set prepend "" set maxrev [dict size $revnums] foreach record $records { # first get rid of the all leading/trailing whitespace and line feeds: set record [string trim $record] if {[regexp $rgxdate $record]} { # the `date' information is extracted and then prepended to the suitable checkins set date [regsub {(=== )(.*)( ===)} $record {\2}] } elseif {[regexp $rgxrev $record]} { # this line contains a checkin message # extract relevant fields: regexp $rgxtime $record time regexp $rgxrev $record rev regexp $rgxuser $record usertag # now reduce `record' to the checkin message: regsub " $rgxuser" $record "" record regsub "$time " $record "" record regsub "$rgxrev " $record "" record # determine relative revision number: set numrev [expr { $maxrev - [dict get $revnums $rev] }]: incr cnt if {$cnt > 1} {set prepend "\n"} lappend out "$prepend$date $time $numrev$rev $record $usertag" } else { # should be a file status line as delivered by `-showfiles' (since # it is neither matching `rgxdate' nor `rgxrev'). append after # stripping white space and separate by appending a full stop. lappend out " [string trim $record]." } } |
︙ | ︙ | |||
628 629 630 631 632 633 634 | # through `fancy_timeline'. think ...) if {!$catmode} { set lines [unwrapTimeline $lines] } } foreach line $lines { if {$debug == true} { | > | > | | | > | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | # through `fancy_timeline'. think ...) if {!$catmode} { set lines [unwrapTimeline $lines] } } foreach line $lines { if {$debug == true} { puts "IN: >$line<" puts -nonewline "OU: >" filter_with $chain "$line" puts "<" } else { filter_with $chain "$line" } } } log_user $prior_log; # revert Expect settings return [spawned_errno $spawn_id]; # return with fossil error code } # --( Entry )----------------------------------------------------------- config::init ~/.fslrc exit [fossil {*}$argv] |