The unified diff between revisions [207d9f9c..] and [418b3d44..] is displayed below. It can also be downloaded as a raw diff.

#
#
# patch "README"
#  from [eeb66f8af92a50e96191697652f60c1c61a3bb3e]
#    to [685cbbbb6971899333a80d0e8c8658e2a71df42c]
#
# patch "dostuff.sh"
#  from [b9a363eea7ebc562feea50641d054540b8ea5548]
#    to [4c50b216f667bd699d78058e2a35f2a0bd96001b]
#
============================================================
--- README	eeb66f8af92a50e96191697652f60c1c61a3bb3e
+++ README	685cbbbb6971899333a80d0e8c8658e2a71df42c
@@ -1,8 +1,22 @@
-To run this, use the dostuff.sh script.
+Example usage (run from its own dir, creates lots of mess):

+./dostuff.sh ~/src/mto-head commands.cc 30
+
+
+You'll need to set MONOTONE in dostuff.sh
+Note that dostuff.sh overwrites stuff from previous runs.
+
+
 It'll find the linear path from "log" in a given directory of a certain file
 - hack the source if you want something different.

-Example usage (run from its own dir, creates lots of mess):
+Basic approach:
+1) get the log, reverse it with some python.
+2) put each full file in a local db.
+3) get all the deltas against the base file, or the linear path
+4) print results.

+Requirements:
+python
+zsh
+monotone
-./dostuff.sh ~/src/mto-head commands.cc 30
============================================================
--- dostuff.sh	b9a363eea7ebc562feea50641d054540b8ea5548
+++ dostuff.sh	4c50b216f667bd699d78058e2a35f2a0bd96001b
@@ -7,6 +7,8 @@ fi
     exit 1
 fi

+echo "Doing stuff. this might be slow."
+
 ROOT=$1
 FILENAME=$2
 NUM=$3
@@ -20,12 +22,11 @@ $MONOTONE db init -d $DB
 rm -f $DB
 $MONOTONE db init -d $DB

-(cd $ROOT && $MONOTONE log --diffs --merges $FILENAME --last=$NUM) | ./parsedels | ./muniq > dels
+#(cd $ROOT && $MONOTONE log --diffs --merges $FILENAME --last=$NUM) | ./parsedels | ./muniq > dels

 cat dels | xargs -n1 | ./muniq | xargs -n1 > linear
 echo "deltas:"
 cat dels
-echo

 cat linear | xargs -n1 ./addfile

@@ -34,6 +35,8 @@ n=1
 SRC=$BASE
 n=1

+echo
+echo linear:
 rm lins
 for id in `tail +2 linear`; do
     DST=$id
@@ -41,7 +44,7 @@ for id in `tail +2 linear`; do
     d=$(($n+1))
     fn=del_${s}_${d}
     $MONOTONE -d $DB fdelta $SRC $DST | ./cleandelta > $fn
-    echo "$s->$d ($SRC -> $DST) `wc -c $fn`"
+    echo "$s->$d\t($SRC -> $DST) `wc -c $fn`"
     SRC=$DST
     cat $fn >> lins
     n=$d
@@ -49,6 +52,9 @@ done
 done


+echo
+echo against-base:
+echo "(del_1_2 see above)"
 s=1
 d=3
 cp del_1_2 againsts
@@ -56,13 +62,15 @@ for id in `tail +3 linear`; do
     DST=$id
     fn=del_${s}_${d}
     $MONOTONE -d $DB fdelta $BASE $DST | ./cleandelta > $fn
-    echo "$s->$d ($SRC -> $DST) `wc -c $fn`"
+    echo "$s->$d\t($SRC -> $DST) `wc -c $fn`"
     d=$(($d+1))
     cat $fn >> againsts
 done

 last=$(($d-1))
 echo
-echo "        base file: `$MONOTONE -d $DB auto get_file $BASE | wc -c` bytes"
+echo "        base file: `$MONOTONE -d $DB auto get_file $BASE | wc -c` bytes (`$MONOTONE -d $DB auto get_file $BASE | gzip | wc -c` gzipped)"
 echo "      linear path: `cat lins | wc -c` bytes (`cat lins | gzip | wc -c` gzipped)"
 echo "against-base path: `cat againsts | wc -c` bytes (`cat againsts | gzip | wc -c` gzipped)"
+echo "($FILENAME, $NUM log length)"
+