Fossil Wrapper

Check-in [11ad9134d2]
Login

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

Overview
Comment:further adjustment to timeline format. a further alias definition.
Timelines: family | ancestors | descendants | both | dresden
Files: files | file ages | folders
SHA1: 11ad9134d28e57992735058b1d117bb77d8bc0b5
User & Date: j 2013-07-24 13:03:45
Context
2013-07-24
13:58
`fsl' now regenerates the config file (~/.fslrc) if it is _older_ than the file containing the exectuable of `fsl'. check-in: 29016465ca user: j tags: dresden
13:03
further adjustment to timeline format. a further alias definition. check-in: 11ad9134d2 user: j tags: dresden
11:28
adjusted indent of `fancy_timeline' so that de-indentation works when `.fslrc' is first created. check-in: e36ec516ef user: j tags: dresden
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to fsl.

54
55
56
57
58
59
60

61
62
63
64
65
66
67
set config::defaults {
    # -*-tcl-*-

    # -- Aliases:

    alias  .      changes
    alias  ,      ui

    alias  d      diff
    alias  di     diff
    alias  elog   {timeline -t ci -showfiles}
    alias  flog   {finfo}
    alias  heads  leaves;       # for hg refugees
    alias  log    {timeline -t ci}
    alias  not    {extras --dotfiles --ignore ""}







>







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
set config::defaults {
    # -*-tcl-*-

    # -- Aliases:

    alias  .      changes
    alias  ,      ui
    alias  alog   {timeline -n 100000}
    alias  d      diff
    alias  di     diff
    alias  elog   {timeline -t ci -showfiles}
    alias  flog   {finfo}
    alias  heads  leaves;       # for hg refugees
    alias  log    {timeline -t ci}
    alias  not    {extras --dotfiles --ignore ""}
114
115
116
117
118
119
120
121

122
123
124
125
126

127
128
129
130
131
132
133
        # -- more specific `artifact_rx' to avoid unintentional hits
        # -- augmented `date_rx' to account for `finfo' output 
        # -- use (tags|branch)   to account for `finfo' output
        # -- add (artifact:)     to account for `finfo' output
        #
        # Expressions to match:
        set artifact_rx {\[([a-f\d]{4})([a-f\d]{6}\]*)\]}
        set date_rx     {(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d)}

        set current_rx  {\*CURRENT\*}
        set frkmrg_rx   {\*(FORK|MERGE|BRANCH)\*}
        # Colour the output (repeated substitutions on $line):
        set line [regsub -all $artifact_rx $line [format {[%s%s]} [coloured red {\1}] {\2}]]
        set line [regsub $date_rx    $line [coloured blue \\1]]

        set line [regsub $current_rx $line [display reversed &]]
        set line [regsub $frkmrg_rx  $line [display underscored &]]
        set line [regsub {(user: )([a-z][-_.a-z0-9]*)} $line [coloured yellow \\1][coloured green \\2]]
        set line [regsub {((tags|branch): )([a-z][-_,.a-z0-9 ]*)} $line [coloured yellow \\1][coloured green \\3]]
        regsub {(artifact: )} $line [coloured yellow \\1]
    }








|
>





>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
        # -- more specific `artifact_rx' to avoid unintentional hits
        # -- augmented `date_rx' to account for `finfo' output 
        # -- use (tags|branch)   to account for `finfo' output
        # -- add (artifact:)     to account for `finfo' output
        #
        # Expressions to match:
        set artifact_rx {\[([a-f\d]{4})([a-f\d]{6}\]*)\]}
        set date_rx     {(\d{4}-\d\d-\d\d)}
        set time_rx     {(\d\d:\d\d:\d\d)}
        set current_rx  {\*CURRENT\*}
        set frkmrg_rx   {\*(FORK|MERGE|BRANCH)\*}
        # Colour the output (repeated substitutions on $line):
        set line [regsub -all $artifact_rx $line [format {[%s%s]} [coloured red {\1}] {\2}]]
        set line [regsub $date_rx    $line [coloured blue \\1]]
        set line [regsub $time_rx    $line [coloured yellow \\1]]
        set line [regsub $current_rx $line [display reversed &]]
        set line [regsub $frkmrg_rx  $line [display underscored &]]
        set line [regsub {(user: )([a-z][-_.a-z0-9]*)} $line [coloured yellow \\1][coloured green \\2]]
        set line [regsub {((tags|branch): )([a-z][-_,.a-z0-9 ]*)} $line [coloured yellow \\1][coloured green \\3]]
        regsub {(artifact: )} $line [coloured yellow \\1]
    }

426
427
428
429
430
431
432
433
434
435
436
437

438
439
440


441
442
443
444
445
446
447
448
         set date [regsub {(=== )(.*)( ===)} $record {\2}]
      } elseif {[regexp $rgxrev $record]} {
         # this line contains the checkin message:
         regexp $rgxtime $record time
         regexp $rgxrev $record rev
         regexp $rgxuser $record usertag
         set numrev [expr { $maxrev - [dict get $revnums $rev] }]
         lappend out "\n$date $time ==> $numrev:$rev $usertag"

         regsub $rgxuser $record "" record
         regsub $time    $record "" record
         regsub $rgxrev  $record "" record


         ###### patch ######
         lappend out $record


         continue    ;###### for now we skip the line wrapping....
         ###### patch ######

         set message [string trim $record]
         set words [split $message]
         set line $indent[lindex $words 0]
         set len [string length $line]








<




>


|
>
>
|







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
         set date [regsub {(=== )(.*)( ===)} $record {\2}]
      } elseif {[regexp $rgxrev $record]} {
         # this line contains the checkin message:
         regexp $rgxtime $record time
         regexp $rgxrev $record rev
         regexp $rgxuser $record usertag
         set numrev [expr { $maxrev - [dict get $revnums $rev] }]


         regsub $rgxuser $record "" record
         regsub $time    $record "" record
         regsub $rgxrev  $record "" record
         set record "[string trim $record]"

         ###### patch ######
         #lappend out $record
         lappend out "\n$date $time $numrev:$rev $record $usertag"
         ###### the following line wrapping does not work anymore for current format. delete or adjust....
         continue    
         ###### patch ######

         set message [string trim $record]
         set words [split $message]
         set line $indent[lindex $words 0]
         set len [string length $line]