Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | beautify the output somewhat. use alternating colors to separate between adjacent hashes/checkins in the output. |
---|---|
Timelines: | family | ancestors | descendants | both | grep |
Files: | files | file ages | folders |
SHA1: |
4e76e7d42b31b0d0cda5fad5a3cb9b63 |
User & Date: | j 2019-07-11 17:13:06 |
Context
2019-07-18
| ||
20:09 | fixed a regexp which was to restrictive. check-in: 2a35346a35 user: j tags: grep | |
2019-07-11
| ||
17:13 | beautify the output somewhat. use alternating colors to separate between adjacent hashes/checkins in the output. check-in: 4e76e7d42b user: j tags: grep | |
15:29 | removed old `fixGrep' (the newer one is superior) and account for possibility that a single file artifact belongs to multiple checkins when reporting the incremental checkin numbers. check-in: b04bf5a394 user: j tags: grep | |
Changes
Changes to fsl.
︙ | ︙ | |||
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | if {$f1 + $f2 > 0} { set buf $lines set lines {} if {$f1} { lappend lines [first $buf] } if {$f2} { lappend lines [last $buf] } } set greppat [lindex $params end-1] foreach line $lines { # need to separate file hash and line number to match `greppat' # against the real line content (so that anchoring of the # pattern works and spurious coloring of hash or line number # is prevented). set field [split $line :] set fhash [string trimright [first $field]] set lino [lindex $field 1] set line [join [lrange $field 2 end]] set cihash [dict get $cihashes $fhash] set revnum {} foreach hash $cihash { append revnum [dict get $revnums $hash] " " } set revnum [join $revnum ,] regsub -all "($greppat)" $line [coloured redbold \\1] line # for now, we just preprend the chronological revision numbers # and add a bit of colour | > > > > > > > > > | > | 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | if {$f1 + $f2 > 0} { set buf $lines set lines {} if {$f1} { lappend lines [first $buf] } if {$f2} { lappend lines [last $buf] } } set greppat [lindex $params end-1] set checkincols {blue green} set idx 0 set lastrev 0 foreach line $lines { # need to separate file hash and line number to match `greppat' # against the real line content (so that anchoring of the # pattern works and spurious coloring of hash or line number # is prevented). set field [split $line :] set fhash [string trimright [first $field]] set lino [lindex $field 1] set line [join [lrange $field 2 end]] set cihash [dict get $cihashes $fhash] set revnum {} foreach hash $cihash { append revnum [dict get $revnums $hash] " " } set revnum [join $revnum ,] regsub -all "($greppat)" $line [coloured redbold \\1] line # for now, we just preprend the chronological revision numbers # and add a bit of colour if {[lindex $revnum end] != $lastrev} { set idx [expr {1 - $idx}] } set col [lindex $checkincols $idx] set buf [coloured magenta $revnum]:[coloured $col $fhash] if {[llength $field] > 1} { append buf :[coloured cyan $lino]:$line } else { append buf \n } lappend out $buf set lastrev [lindex $revnum end] } return $out } proc adjustWidth params { set widopt {} regexp -- {(timeline|finfo|search|descendants).*(-W)} $params widopt |
︙ | ︙ |