From 4ac2553282ccaf793d62a3129a142a2fb10de06d Mon Sep 17 00:00:00 2001 From: "szager@chromium.org" Date: Mon, 16 Dec 2013 22:07:02 +0000 Subject: [PATCH] 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 --- git_cl.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git_cl.py b/git_cl.py index fa04059d9b..5675104d65 100755 --- a/git_cl.py +++ b/git_cl.py @@ -340,6 +340,11 @@ class Settings(object): 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()