From 9cfdbf9bef8ba8694fde7e9c562b124d2f46d69d Mon Sep 17 00:00:00 2001 From: StephenB Date: Thu, 6 Jan 2011 19:06:51 +0000 Subject: [PATCH 1/2] git svn: fix the final example in man page 'git-remote add' creates a remote.origin.fetch entry in the config, we want to replace this entry rather than add another one (which will cause 'git fetch' to error). This adds 'git config --remove-section remote.origin' after the fetch for encouraging users to only use "git svn" for future updates. [ew: rewording of commit message for present tense] Acked-by: Eric Wong Signed-off-by: StephenB --- Documentation/git-svn.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 254d0441b3..0ade2ce54e 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -729,8 +729,11 @@ have each person clone that repository with 'git clone': cd project git init git remote add origin server:/pub/project - git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*' + git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*' git fetch +# Prevent fetch/pull from remote git server in the future, +# we only want to use git svn for future updates + git config --remove-section remote.origin # Create a local branch from one of the branches just fetched git checkout -b master FETCH_HEAD # Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server) From e17aa8a9dca972ca278dd91a097873101066e964 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 6 Jan 2011 18:29:23 +0000 Subject: [PATCH 2/2] t9157-*.sh: Add an svn version check Acked-by: Eric Wong Acked-by: Steven Walter Signed-off-by: Ramsay Jones --- t/t9157-git-svn-fetch-merge.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh index da582c5382..accf61eb03 100755 --- a/t/t9157-git-svn-fetch-merge.sh +++ b/t/t9157-git-svn-fetch-merge.sh @@ -6,6 +6,14 @@ test_description='git svn merge detection' . ./lib-git-svn.sh +svn_ver="$(svn --version --quiet)" +case $svn_ver in +[0-1].[0-4].[0-6]) + skip_all="skipping git-svn test - SVN too old ($svn_ver)" + test_done + ;; +esac + test_expect_success 'initialize source svn repo' ' svn_cmd mkdir -m x "$svnrepo"/trunk && svn_cmd mkdir -m x "$svnrepo"/branches &&