# # patch "ChangeLog" # from [dd5fc6917d93552b2ee40af4cfdb366cb813e958] # to [c9cfc57ae443a76e41d94fcce45bc8be04b7520e] # # patch "contrib/mtbrowse.sh" # from [a97e1412853098d6472fc5747bb659dca3bfdbe3] # to [f8d866a9eb798aecc974120b90aad5ca40ad4a4b] # ======================================================================== --- ChangeLog dd5fc6917d93552b2ee40af4cfdb366cb813e958 +++ ChangeLog c9cfc57ae443a76e41d94fcce45bc8be04b7520e @@ -1,3 +1,15 @@ +2005-11-21 Henry Nestler
+ + * contrib/mtbrowse.sh: Version 0.1.13 + Handle authors without '@'. Minor box sizing. + Get Version of monotone before starts anything. + DEPTH_LAST detects for version >0.19, no save to config. + 'cat revision' replaced with 'automate get_revision'. + ANCESTORS "M" changed to "A". Default "L" (monotone log --brief). + Warn user about misconfigurations. Temp files without tailing dot. + New option: Sort by Date/Time, up or down. + Fix: Parents of merge, if certs list from cache (ncolor). + 2005-11-21 Matthew Gregan * NEWS: Minor spelling tweaks. ======================================================================== --- contrib/mtbrowse.sh a97e1412853098d6472fc5747bb659dca3bfdbe3 +++ contrib/mtbrowse.sh f8d866a9eb798aecc974120b90aad5ca40ad4a4b @@ -99,12 +99,23 @@ # Automatic author color. # Date have inverse color for last selection. # Expand revision after input, if not 40 chars. (parents don't allow short rev) +# +# 2005-11-20 Version 0.1.13 address@hidden +# Handle authors without '@'. +# Minor box sizing. +# Get Version of monotone before starts anything. +# DEPTH_LAST detects for version >0.19, no save to config. +# 'cat revision' replaced with 'automate get_revision' (mt >0.22). +# ANCESTORS "M" changed to "A". Default "L" (monotone log --brief). +# Warn user about misconfigurations. +# Temp files without tailing dot. +# New option: Sort by Date/Time with up or down. +# Fix: Parent of merge, if certs list from cache (ncolor). # Known Bugs / ToDo-List: -# * For Monotone Version >0.19 s/--depth/--last/, remove the fallback # * better make "sed -n -e '1p'" for merge two different branches. -VERSION="0.1.12" +VERSION="0.1.13" # Save users settings # Default values, can overwrite on .mtbrowserc @@ -112,20 +123,21 @@ # Store lists for menu here TEMPDIR="$HOME/.mtbrowse" -TEMPFILE="$TEMPDIR/.tmp" +TEMPFILE="$TEMPDIR/tmp" # Called with filename. VISUAL="vim -R" # Called with stdin redirection. # Set VISUAL empty to use PAGER! -# Don't VISUAL and PAGER to use internal viewer. +# If VISUAL and PAGER are empty, than use an internal viewer. PAGER="less" # 1=Certs Cached, 0=Clean at end (slow and save mode) CACHE="1" -# T=Toposort revisions, D=Date sort (reverse toposort) +# T=Toposort revisions, D=Date sort, R=Date reverse (reverse toposort), +# N=None (unsorted from list) TOPOSORT="T" # count of certs to get from DB, "0" for all @@ -137,10 +149,10 @@ # Format for Date/Time FORMAT_DATE="L" -# Format Branch Full,Short,None +# Format Branch: F=Full,S=Short,N=None FORMAT_BRANCH="N" -# Format author (strip domain from mail address) +# Format author: F=Full, S=strip domain from mail address, N=None FORMAT_AUTHOR="S" # Changelog format @@ -149,15 +161,10 @@ # Author coloring? FORMAT_COLOR="\\Z7\\Zb" -# "log --depth=n" was changed to "log --last=n", see -# Author: address@hidden, Date: 2005-05-30T00:15:27 -# Autodetect this and fallback for a while. -# TODO: Remove in future -DEPTH_LAST="--last" +# How get automate ancestors: I=interal function, A=automate ancestors, +# L=Log brief +ANCESTORS="L" -# automate ancestors (I)nteral function, (M)onotone -ANCESTORS="I" - # read saved settings if [ -f $CONFIGFILE ] then @@ -236,7 +243,7 @@ { rm -f $TEMPFILE.branches $TEMPFILE.ancestors $TEMPFILE.toposort \ $TEMPFILE.action-select $TEMPFILE.menu $TEMPFILE.input \ - $TEMPFILE.ncolor $TEMPFILE.c + $TEMPFILE.ncolor $TEMPFILE.tfc if [ "$CACHE" != "1" ] then @@ -281,7 +288,7 @@ { local in_file=$1 local out_file=$2 - local short_hash dat bra aut log lineno color count + local short_hash dat bra aut log lineno color count tfc line_count=`wc -l < $in_file` if [ "$line_count" -eq 0 ] @@ -291,6 +298,8 @@ lineno=0 rm -f $out_file + tfc=$TEMPFILE.tfc + # Read Key and Date value from certs cat $in_file | \ while read hash @@ -305,8 +314,7 @@ short_hash=`echo $hash | cut -c 1-$HASH_TRIM` - # get all certs of revision, check cached first - tfc=$TEMPFILE.c + # get certs of revision, cache it monotone --db=$DB list certs $hash > $tfc # Date format @@ -361,7 +369,7 @@ ;; S) # short aut=`sed -n -r -e \ - '/^Name : author/,+1s/Value : (.{1,10})address@hidden/\1/p' \ + '/^Name : author/,+1s/Value : (.{1,10}).*[@ ].+$/\1/p' \ < $tfc | sed -n -e '1p'` ;; esac @@ -385,6 +393,7 @@ then # Bug in dialog: Don't allow empty string after \\Zn test -z "$log" && log=" " + if [ "$last_aut" != "$aut" ] then # Automatic color by author? @@ -414,7 +423,7 @@ echo "$short_hash \"$dat$bra\\ZR$aut$log\"" >> $out_file fi done | dialog --gauge "$line_count certs reading" 6 60 - rm $TEMPFILE.c.tmp + rm $tfc } @@ -515,7 +524,6 @@ SHORT_HEAD=`echo $HEAD | cut -c 1-$HASH_TRIM` rm -f $TEMPFILE.heads -# do_clear_cache } @@ -542,17 +550,9 @@ # LOG # 0.19 monotone log --depth=n id file # 0.19+ monotone log --last=n id file - if ! monotone --db=$DB log $DEPTH_LAST=1 --revision=$REVISION \ - > $TEMPFILE.change.log - then - DEPTH_LAST="--depth" - echo "Fallback to --depth usage." + monotone --db=$DB log $DEPTH_LAST=1 --revision=$REVISION \ + > $TEMPFILE.change.log || exit 200 - # Try again - monotone --db=$DB log $DEPTH_LAST=1 --revision=$REVISION \ - > $TEMPFILE.change.log || exit 200 - fi - do_pager $TEMPFILE.change.log ;; P) @@ -563,6 +563,9 @@ then # multiple parents (from merge) + # Create, if used a cached list + touch $TEMPFILE.ncolor + # Set DATE/KEY information fill_date_key $TEMPFILE.parents $TEMPFILE.certs3tmp @@ -637,11 +640,13 @@ do_pager $TEMPFILE.certs.log ;; F) - # List changed files - monotone --db=$DB cat revision $REVISION > $TEMPFILE.rev.changed \ - || exit 200 - do_pager $TEMPFILE.rev.changed - ;; + # List changed files + # 0.22: monotone cat revision