Browse Source

git-svn: remove support for the svn command-line client

Using the command-line client was great for prototyping and
getting something working quickly.  Eventually I found time
to study the library documentation and add support for using
the libraries which are much faster and more flexible when
it comes to supporting new features.

Note that we require version 1.1 of the SVN libraries, whereas
we supported the command-line svn client down to version 1.0.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Eric Wong 18 years ago committed by Junio C Hamano
parent
commit
b9c8518722
  1. 883
      git-svn.perl
  2. 10
      t/Makefile
  3. 15
      t/lib-git-svn.sh
  4. 4
      t/t9100-git-svn-basic.sh
  5. 7
      t/t9104-git-svn-follow-parent.sh
  6. 7
      t/t9105-git-svn-commit-diff.sh
  7. 7
      t/t9106-git-svn-commit-diff-clobber.sh

883
git-svn.perl

File diff suppressed because it is too large Load Diff

10
t/Makefile

@ -23,13 +23,9 @@ clean:


# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
full-svn-test: full-svn-test:
$(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_DELTA_FETCH=1 \ $(MAKE) $(TSVN) GIT_SVN_DELTA_FETCH=1 \
GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
$(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
$(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \
LC_ALL=en_US.UTF-8
$(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \
LC_ALL=en_US.UTF-8


.PHONY: $(T) clean .PHONY: $(T) clean
.NOTPARALLEL: .NOTPARALLEL:

15
t/lib-git-svn.sh

@ -7,17 +7,18 @@ then
exit exit
fi fi


GIT_DIR=$PWD/.git perl -e 'use SVN::Core; $SVN::Core::VERSION gt "1.1.0" or die' >/dev/null 2>&1
GIT_SVN_DIR=$GIT_DIR/svn/git-svn
SVN_TREE=$GIT_SVN_DIR/svn-tree

perl -e 'use SVN::Core' >/dev/null 2>&1
if test $? -ne 0 if test $? -ne 0
then then
echo 'Perl SVN libraries not found, tests requiring those will be skipped' test_expect_success 'Perl SVN libraries not found, skipping test' :
GIT_SVN_NO_LIB=1 test_done
exit
fi fi


GIT_DIR=$PWD/.git
GIT_SVN_DIR=$GIT_DIR/svn/git-svn
SVN_TREE=$GIT_SVN_DIR/svn-tree

svnadmin >/dev/null 2>&1 svnadmin >/dev/null 2>&1
if test $? -ne 1 if test $? -ne 1
then then

4
t/t9100-git-svn-basic.sh

@ -229,9 +229,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e
tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4 tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
EOF EOF


if test -z "$GIT_SVN_NO_LIB" || test "$GIT_SVN_NO_LIB" -eq 0; then echo tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 >> expected
echo tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 >> expected
fi


test_expect_success "$name" "diff -u a expected" test_expect_success "$name" "diff -u a expected"



7
t/t9104-git-svn-follow-parent.sh

@ -6,13 +6,6 @@
test_description='git-svn --follow-parent fetching' test_description='git-svn --follow-parent fetching'
. ./lib-git-svn.sh . ./lib-git-svn.sh


if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
then
echo 'Skipping: --follow-parent needs SVN libraries'
test_done
exit 0
fi

test_expect_success 'initialize repo' " test_expect_success 'initialize repo' "
mkdir import && mkdir import &&
cd import && cd import &&

7
t/t9105-git-svn-commit-diff.sh

@ -4,13 +4,6 @@
test_description='git-svn commit-diff' test_description='git-svn commit-diff'
. ./lib-git-svn.sh . ./lib-git-svn.sh


if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
then
echo 'Skipping: commit-diff needs SVN libraries'
test_done
exit 0
fi

test_expect_success 'initialize repo' " test_expect_success 'initialize repo' "
mkdir import && mkdir import &&
cd import && cd import &&

7
t/t9106-git-svn-commit-diff-clobber.sh

@ -4,13 +4,6 @@
test_description='git-svn commit-diff clobber' test_description='git-svn commit-diff clobber'
. ./lib-git-svn.sh . ./lib-git-svn.sh


if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
then
echo 'Skipping: commit-diff clobber needs SVN libraries'
test_done
exit 0
fi

test_expect_success 'initialize repo' " test_expect_success 'initialize repo' "
mkdir import && mkdir import &&
cd import && cd import &&

Loading…
Cancel
Save