Commit 9c99943d authored by agable@chromium.org's avatar agable@chromium.org

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
parent 44ae4fb5
......@@ -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.'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment