From 9c99943d3577a30ae90f3c665a694a6d7cab32c7 Mon Sep 17 00:00:00 2001 From: "agable@chromium.org" Date: Fri, 24 Oct 2014 08:13:03 +0000 Subject: [PATCH] Make git auto-svn idempotent. By directly using git-config rather than git-svn-init, this ensures that crazy values don't get set. It could be "safer" (e.g. check to see if any other git-svn configuration already exists and prompt before overwriting it), but I think that simplicity is better here. R=pgervais@chromium.org BUG=425838 Review URL: https://codereview.chromium.org/675713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292640 0039d316-1c4b-4281-b951-d872f2087c98 --- git_auto_svn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_auto_svn.py b/git_auto_svn.py index 8a35143c5..114f82d60 100755 --- a/git_auto_svn.py +++ b/git_auto_svn.py @@ -84,7 +84,7 @@ def main(argv): print 'Found upstream svn repo %s and path %s' % (svn_repo, svn_path) prefix = upstream.rsplit('/')[0] - run_git('svn', 'init', '--prefix=%s' % prefix, '-T', svn_path, svn_repo) + set_config('svn-remote.svn.url', svn_repo) set_config('svn-remote.svn.fetch', '%s:refs/remotes/%s' % (svn_path, upstream)) print 'Configured metadata, running "git svn fetch". This may take some time.'