changeset 301:228f11416f28

Merge
author Augie Fackler <raf@durin42.com>
date Mon, 12 Nov 2012 16:41:19 -0600
parents 276c14c5eec0 (current diff) 142fb39e4e55 (diff)
children a9e3c2ca6fa5
files
diffstat 3 files changed, 48 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/.elisp/settings/40.modes.el
+++ b/.elisp/settings/40.modes.el
@@ -48,6 +48,7 @@ point."
                                     (local-set-key (kbd "RET")
                                                    'reindent-then-newline-and-indent)))
 (defun af-python-mode-hook ()
+  (flyspell-prog-mode)
   ; highlight tabs in Python
   (make-variable-buffer-local 'font-lock-mode-hook)
   (make-variable-buffer-local 'python-indent)
--- a/.elisp/settings/90.keybindings.el
+++ b/.elisp/settings/90.keybindings.el
@@ -20,6 +20,11 @@
 (global-set-key [(control backspace)] 'kill-word)
 
 (global-set-key [f3] 'next-error)
+(defun af-dwim-f4 () (interactive)
+  (cond ((string-match "\\.t$" buffer-file-name)
+         (textmate-start-compile-in-root
+          (concat "make " (file-name-nondirectory buffer-file-name))))))
+(global-set-key [f4] 'af-dwim-f4)
 (global-set-key [f5] 'diff-apply-hunk)
 
 ;; M-j for jump to function definition
--- a/.shell.d/50.hg_functions.sh
+++ b/.shell.d/50.hg_functions.sh
@@ -15,16 +15,27 @@ alias mq-snapshot=mq_snapshot
 function hg_rebase_all () {
     hg sum | egrep 'commit: .*\(clean\)$' || (echo 'abort: wc not clean' ; return 1) || return 1
     if [ "x$1" = "x" ] ; then
-	echo 'abort: give destination for rebase'
-	return 2
+        echo 'abort: give destination for rebase'
+        return 2
     fi
     if [ "$1" = "tip" ] ; then
-	echo 'abort: tip is essentially never what you mean here'
-	return 2
+        echo 'abort: tip is essentially never what you mean here'
+        return 2
     fi
     for b in $(hg book | sed 's/^ \*/  /' | awk '{ print $1 }') ; do
-	hg co --clean $b
-	hg rebase -d "$1"
+        echo "About to rebase $b"
+        hg co --clean $b
+        out=$(hg rebase -d "$1")
+        code=$?
+        grep "nothing to rebase" <(echo $out)
+        if [ $? = 0 ] ; then
+            echo 'moving on'
+        else
+            if [ $out -ne 0 ] ; then
+                echo "rebase exited with status $out"
+                return 3
+            fi
+        fi
     done
 }
 alias hg-rebase-all=hg_rebase_all
@@ -45,18 +56,18 @@ alias hg-svn-merge-branch=hgsvnmergebran
 function hgsvnrebaseall() {
     for b in `hg log -u 'Augie Fackler <durin42@gmail.com>' --template '{branches}\n' | sort | uniq`
     do
-	echo "rebase $b"
-	hg co $b
-	if [[ "$?" != "0" ]] ; then
-	    echo "abort: could not checkout $b"
-	    return
-	fi
-	hg parent --svn > /dev/null
-	if [[ "$?" == "0" ]] ; then
-	    hg rebase --svn || return
-	else
-	    echo "Skip $b since it has a merge."
-	fi
+        echo "rebase $b"
+        hg co $b
+        if [[ "$?" != "0" ]] ; then
+            echo "abort: could not checkout $b"
+            return
+        fi
+        hg parent --svn > /dev/null
+        if [[ "$?" == "0" ]] ; then
+            hg rebase --svn || return
+        else
+            echo "Skip $b since it has a merge."
+        fi
     done
 }
 alias hg-svn-rebase-all=hgsvnrebaseall
@@ -79,22 +90,22 @@ function hgsvnmkbranch() {
     upstream=$(hg paths default | sed 's%/*$%%')
     local branchname
     if [ "x$1" = "x" ] ; then
-	echo 'Must provide new branch name.'
-	return 1
+        echo 'Must provide new branch name.'
+        return 1
     fi
     local d=`hg svn info | grep URL | sed 's/.*://'`
     local br=`echo $d | awk '{
-	    if ( index($1, "trunk") ) {
-		    print  "trunk"
-		} else {
-		    x = index($1, "branches") ;
-		    if ( x != 0 ) {
-			    sub(".*/branches/", "");
-			    sub("/.*", "");
-			    print $0
-			}
-		}
-		}'`
+            if ( index($1, "trunk") ) {
+                    print  "trunk"
+                } else {
+                    x = index($1, "branches") ;
+                    if ( x != 0 ) {
+                            sub(".*/branches/", "");
+                            sub("/.*", "");
+                            print $0
+                        }
+                }
+                }'`
 
     branchname=$br
     echo svn cp $upstream/$branchname $upstream/branches/$1