Add update pull request command

+ More fixes for the 'too much data' problem

``` diff
From c7973c2bb5d7e3ee2739318be109422d695c7d16 Mon Sep 17 00:00:00 2001
From: Jason Mobarak <jam@cozybit.com>
Date: Wed, 14 Aug 2013 12:52:33 -0700
Subject: [PATCH 1/9] install PyGithub if needed

---
 install.sh |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/install.sh b/install.sh
index 6be8bc5..780395a 100755
--- a/install.sh
+++ b/install.sh
@@ -106,3 +106,15 @@ if [[ $install_hub =~ [Yy] ]]; then
     _popd
     rm -rf $install_dir
 fi
+
+pygithub_url=https://github.com/jacquev6/PyGithub
+install_pygithub=
+
+if ! Q python -c "import github"; then
+    cecho "Looks like the 'github' Python library is missing ($pygithub_url)..." $yellow
+    install_pygithub=y
+fi
+
+if [[ $install_pygithub =~ [Yy] ]]; then
+    echo_eval sudo pip install PyGithub
+fi
-- 
1.7.10.4


From 9ad82b8ec9add9f966ee3b6a5888f5a7507ddc73 Mon Sep 17 00:00:00 2001
From: Jason Mobarak <jam@cozybit.com>
Date: Wed, 14 Aug 2013 15:59:59 -0700
Subject: [PATCH 2/9] install git python module too

---
 install.sh |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/install.sh b/install.sh
index 780395a..0cb08d8 100755
--- a/install.sh
+++ b/install.sh
@@ -118,3 +118,15 @@ fi
 if [[ $install_pygithub =~ [Yy] ]]; then
     echo_eval sudo pip install PyGithub
 fi
+
+pygit_url=https://github.com/gitpython-developers/GitPython
+install_pygit=
+
+if ! Q python -c "import git"; then
+    cecho "Looks like the 'git' Python library is missing ($pygit_url)..." $yellow
+    install_pygit=y
+fi
+
+if [[ $install_pygit =~ [Yy] ]]; then
+    echo_eval sudo pip install GitPython
+fi
-- 
1.7.10.4


From 5d5df0c94de0d83e9a7a2effec2fbd2353f55f9d Mon Sep 17 00:00:00 2001
From: Jason Mobarak <jam@cozybit.com>
Date: Wed, 14 Aug 2013 16:34:10 -0700
Subject: [PATCH 3/9] foo

---
 install.sh |    1 +
 1 file changed, 1 insertion(+)

diff --git a/install.sh b/install.sh
index 0cb08d8..95fa69b 100755
--- a/install.sh
+++ b/install.sh
@@ -130,3 +130,4 @@ fi
 if [[ $install_pygit =~ [Yy] ]]; then
     echo_eval sudo pip install GitPython
 fi
+#foo
-- 
1.7.10.4


From 143d75107d7926c3bc2a660dcc4c93591a407641 Mon Sep 17 00:00:00 2001
From: Jason Mobarak <jam@cozybit.com>
Date: Thu, 15 Aug 2013 11:08:06 -0700
Subject: [PATCH 4/9] fix the Q command to handle quotes

---
 common.sh  |    4 ++--
 install.sh |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common.sh b/common.sh
index e834af8..2168a36 100644
--- a/common.sh
+++ b/common.sh
@@ -11,9 +11,9 @@ function die () {
 # usage: Q <anything>
 function Q () {
         if [ "${VERBOSE}" == "1" ]; then
-                $*
+                "$@"
         else
-                $* &> /dev/null
+                "$@" &> /dev/null
         fi
 }
 
diff --git a/install.sh b/install.sh
index 95fa69b..0aba703 100755
--- a/install.sh
+++ b/install.sh
@@ -110,7 +110,7 @@ fi
 pygithub_url=https://github.com/jacquev6/PyGithub
 install_pygithub=
 
-if ! Q python -c "import github"; then
+if ! Q python -c 'import github'; then
     cecho "Looks like the 'github' Python library is missing ($pygithub_url)..." $yellow
     install_pygithub=y
 fi
@@ -122,7 +122,7 @@ fi
 pygit_url=https://github.com/gitpython-developers/GitPython
 install_pygit=
 
-if ! Q python -c "import git"; then
+if ! Q python -c 'import git'; then
     cecho "Looks like the 'git' Python library is missing ($pygit_url)..." $yellow
     install_pygit=y
 fi
-- 
1.7.10.4


From 09d5aa31db52b24e23ee8658858e355497488ed3 Mon Sep 17 00:00:00 2001
From: Jason Mobarak <jam@cozybit.com>
Date: Thu, 15 Aug 2013 11:08:24 -0700
Subject: [PATCH 5/9] add command to update a pr

---
 git-update-pr |  144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 144 insertions(+)
 create mode 100755 git-update-pr

diff --git a/git-update-pr b/git-update-pr
new file mode 100755
index 0000000..a13f122
--- /dev/null
+++ b/git-update-pr
@@ -0,0 +1,144 @@
+#!/usr/bin/env python
+
+import re
+import os
+import sys
+
+from subprocess import check_output
+from subprocess import call
+from subprocess import Popen
+from subprocess import PIPE
+
+from getpass import getpass
+
+from tempfile import NamedTemporaryFile
+
+from git import Repo
+from github import Github
+
+from github.GithubException import UnknownObjectException
+
+
+import github
+#github.enable_console_debug_logging()
+
+PR_REGEX = re.compile("``` diff.*```", re.DOTALL)
+GITHUB_TOKEN = os.path.expanduser("~/.git_pull_req_auth")
+github = None
+
+if not os.path.exists(GITHUB_TOKEN):
+
+    user = raw_input("GitHub username: ")
+    pw = getpass("GitHub password: ")
+
+    github = Github(user, pw)
+    user = github.get_user()
+
+    auth = user.create_authorization(
+            scopes=["repo"],
+            note="git-update-pr",
+            note_url="https://github.com/cozybit/cozyreview")
+
+    open(GITHUB_TOKEN, 'w').write(auth.token)
+
+    token = auth.token
+
+else:
+
+    token = open(GITHUB_TOKEN, 'r').read()
+
+
+github = Github(token)
+
+user = github.get_user()
+print 'Username:', user.login
+
+try:
+    gitrepo = Repo(os.getcwd())
+except:
+    sys.stderr.write('ERROR: Failed to find git repository
')
+    sys.exit(1)
+
+try:
+    remote_url = gitrepo.config_reader().get('remote "origin"', "url")
+except:
+    sys.stderr.write("ERROR: Failed to find remote named 'origin'
")
+    sys.exit(1)
+
+if not remote_url.startswith("git@github.com"):
+    sys.stderr.write("ERROR: Expected remote to start with 'git@github.com'
")
+    sys.exit(1)
+
+if not remote_url.endswith(".git"):
+    sys.stderr.write("ERROR: Expected remote to end with '.git'
")
+    sys.exit(1)
+
+if ':' not in remote_url:
+    sys.stderr.write("ERROR: Expected remote contain ':'
")
+    sys.exit(1)
+
+_, orgprojgit = remote_url.split(":")
+orgname, projgit = orgprojgit.split('/')
+projname = projgit.rstrip(".git")
+
+try:
+    org = github.get_organization(orgname)
+except UnknownObjectException:
+    org = github.get_user(orgname)
+
+ghrepo = org.get_repo(projname)
+
+print 'Project:', ghrepo.html_url
+
+active_branch_name = gitrepo.active_branch.name
+
+os.spawnvp(os.P_WAIT, "git", ["git", "re
```