sorry this happened to you.
is this native plan9, p9p, or 9vx?
so, are you using fossil or do you run cwfs or kfs or somthing else?
do you definitely have fossil and venti running?
a missing archive/main looks like you don't
have archival dumps enabled in fossil.conf?
perhaps you have snapshots enabled?
what happens if you run 9fs snap?
Here is an implementation of context grep,
I think its erik's code but I cannot remember.
#!/bin/rc
# cgrep - context grep
# NB: /dev/null in list of files to force printing source
# files when there is just one file supplied
grep -n $* /dev/null |
sed 's/^(.*):([0-9]*): .*$/\1 \2/' |
while(loc=`{read}){
echo $loc(1)^:$loc(2)
start=`{echo 'if(' $loc(2) ' > 2) print(' $loc(2) ' -
2) else print 0' | hoc}
tail -n +^$start $loc(1) | sed 's/^/ /; 6q'
}
-Steve