Make git-rebase-update a bit more robust

  * When aborting a failed rebase, don't cascade errors if the abort itself
    fails.
  * When starting a rebase-update cycle, cd to the root of the repo. This avoids
    an issue when you run rebase-update from inside of a branch which adds a
    new folder.

R=agable@chromium.org
BUG=499031

Review URL: https://codereview.chromium.org/1180673003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295637 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_common.py b/git_common.py
index 2df4936..22f14cd 100644
--- a/git_common.py
+++ b/git_common.py
@@ -525,7 +525,7 @@
     return RebaseRet(True, '', '')
   except subprocess2.CalledProcessError as cpe:
     if abort:
-      run('rebase', '--abort')
+      run_with_retcode('rebase', '--abort')  # ignore failure
     return RebaseRet(False, cpe.stdout, cpe.stderr)