Honor svn-remote.*.rewriteRoot option.

MatchSvnGlob uses the root url to grep for existing svn commits by
matching the git-svn-id lines in the commit messages.  If there is a
rewriteRoot config, then the git-svn-id lines will have the
rewritten url's, and the code should match against that.

R=blundell@chromium.org,maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@241043 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index fa04059..5675104 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -340,6 +340,11 @@
           if match:
             remote = match.group(1)
             base_url = match.group(2)
+            rewrite_root = RunGit(
+                ['config', 'svn-remote.%s.rewriteRoot' % remote],
+                error_ok=True).strip()
+            if rewrite_root:
+              base_url = rewrite_root
             fetch_spec = RunGit(
                 ['config', 'svn-remote.%s.fetch' % remote],
                 error_ok=True).strip()