add hg options to allow e.g. confining diffs to a certain named branch for some repos
authorRobert Kaiser <robert@notebook.(none)>
Sun, 31 Jan 2010 20:16:12 +0000 (21:16 +0100)
committerRobert Kaiser <robert@notebook.(none)>
Sun, 31 Jan 2010 20:16:12 +0000 (21:16 +0100)
origdiff

index 4acd26818bd0cbe0ebff6598408d8407efe56b47..a62ca895c2654a8645993ae06e4b9a43b15adc1a 100755 (executable)
--- a/origdiff
+++ b/origdiff
@@ -11,24 +11,30 @@ if [ -n "$1" ]; then
   DST_DATE=`TZ=America/Los_Angeles date +%Y-%m-%d`
 
   HG_COMM_DIR=/mnt/mozilla/hg/comm-central
+  COMM_HG_OPTIONS=
   COMM_DIR=suite/themes/classic/
   COMM_LOG=$RUN_DIR/themelog-suitedefault.$SRC_DATE.$DST_DATE.log
 
   HG_MOZ_DIR=/mnt/mozilla/hg/comm-central/mozilla
+  MOZ_HG_OPTIONS=
   MOZ_DIR=toolkit/themes/winstripe/
   MOZ_LOG=$RUN_DIR/themelog-tkwinstripe.$SRC_DATE.$DST_DATE.log
 
   HG_DOMI_DIR=/mnt/mozilla/hg/comm-central/mozilla/extensions/inspector
+  DOMI_HG_OPTIONS=
   DOMI_DIR=resources/skin/classic/
   DOMI_LOG=$RUN_DIR/themelog-domiclassic.$SRC_DATE.$DST_DATE.log
 
   HG_CZ_DIR=/mnt/mozilla/hg/comm-central/mozilla/extensions/irc
+  CZ_HG_OPTIONS=
   CZ_DIR=xul/skin/
   CZ_LOG=$RUN_DIR/themelog-chatzilla.$SRC_DATE.$DST_DATE.log
 
   for repo in $REPO_LIST; do
     HG_DIR_VAR="HG_${repo}_DIR"
     HG_DIR=${!HG_DIR_VAR}
+    HG_OPTIONS_VAR="${repo}_HG_OPTIONS"
+    HG_OPTIONS=${!HG_OPTIONS_VAR}
     SKIN_DIR_VAR="${repo}_DIR"
     SKIN_DIR=${!SKIN_DIR_VAR}
     LOG_VAR="${repo}_LOG"
@@ -36,7 +42,7 @@ if [ -n "$1" ]; then
     if [ ! -e $LOG_NAME ]; then
       echo "Getting $LOG_NAME..."
       cd $HG_DIR
-      LC_ALL=C hg log -d ">$SRC_DATE" $SKIN_DIR > $LOG_NAME
+      LC_ALL=C hg log -d ">$SRC_DATE" $HG_OPTIONS $SKIN_DIR > $LOG_NAME
     fi
   done
   cd $RUN_DIR