@matheusbsbs / matheus-bagliano / commits / 60d02ccc18
Fork 0

git-svn: migrate out of contrib

Allow NO_SVN_TESTS to be defined to skip git-svn tests. These tests are time-consuming due to SVN being slow, and even more so if SVN Perl libraries are not available. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Eric Wong committed Jul 6, 2006 at 00:14 UTC 60d02ccc18408e54ace8692532fcc73d4035b3c2
14 files changed +28 -61
.gitignore
+1
@@ -107,6 +107,7 @@ git-ssh-push
107 git-ssh-upload
108 git-status
109 git-stripspace
110 +git-svn
111 git-svnimport
112 git-symbolic-ref
113 git-tag
Documentation/git-svn.txt renamed
Makefile
+5 -1
@@ -33,6 +33,10 @@ all:
33 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
34 # Enable it on Windows. By default, symrefs are still used.
35 #
36 +# Define NO_SVN_TESTS if you want to skip time-consuming SVN interopability
37 +# tests. These tests take up a significant amount of the total test time
38 +# but are not needed unless you plan to talk to SVN repos.
39 +#
40 # Define PPC_SHA1 environment variable when running make to make use of
41 # a bundled SHA1 routine optimized for PowerPC.
42 #
@@ -134,7 +138,7 @@ SCRIPT_PERL = \
138 git-shortlog.perl git-rerere.perl \
139 git-annotate.perl git-cvsserver.perl \
140 git-svnimport.perl git-mv.perl git-cvsexportcommit.perl \
137 - git-send-email.perl
141 + git-send-email.perl git-svn.perl
142
143 SCRIPT_PYTHON = \
144 git-merge-recursive.py
contrib/git-svn/.gitignore deleted
-4
@@ -1,4 +0,0 @@
1 -git-svn
2 -git-svn.xml
3 -git-svn.html
4 -git-svn.1
contrib/git-svn/Makefile deleted
-44
@@ -1,44 +0,0 @@
1 -all: git-svn
2 -
3 -prefix?=$(HOME)
4 -bindir=$(prefix)/bin
5 -mandir=$(prefix)/man
6 -man1=$(mandir)/man1
7 -INSTALL?=install
8 -doc_conf=../../Documentation/asciidoc.conf
9 --include ../../config.mak
10 -
11 -git-svn: git-svn.perl
12 - cp $< $@
13 - chmod +x $@
14 -
15 -install: all
16 - $(INSTALL) -d -m755 $(DESTDIR)$(bindir)
17 - $(INSTALL) git-svn $(DESTDIR)$(bindir)
18 -
19 -install-doc: doc
20 - $(INSTALL) git-svn.1 $(DESTDIR)$(man1)
21 -
22 -doc: git-svn.1
23 -git-svn.1 : git-svn.xml
24 - xmlto man git-svn.xml
25 -git-svn.xml : git-svn.txt
26 - asciidoc -b docbook -d manpage \
27 - -f ../../Documentation/asciidoc.conf $<
28 -git-svn.html : git-svn.txt
29 - asciidoc -b xhtml11 -d manpage \
30 - -f ../../Documentation/asciidoc.conf $<
31 -test: git-svn
32 - cd t && for i in t????-*.sh; do $(SHELL) ./$$i $(TEST_FLAGS); done
33 -
34 -# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
35 -full-test:
36 - $(MAKE) test GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
37 - $(MAKE) test GIT_SVN_NO_LIB=0 GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
38 - $(MAKE) test GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \
39 - LC_ALL=en_US.UTF-8
40 - $(MAKE) test GIT_SVN_NO_LIB=0 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \
41 - LC_ALL=en_US.UTF-8
42 -
43 -clean:
44 - rm -f git-svn *.xml *.html *.1
git-svn.perl renamed
+1 -1
@@ -8,7 +8,7 @@ use vars qw/ $AUTHOR $VERSION
8 $GIT_SVN_INDEX $GIT_SVN
9 $GIT_DIR $GIT_SVN_DIR $REVDB/;
10 $AUTHOR = 'Eric Wong <normalperson@yhbt.net>';
11 -$VERSION = '1.1.1-broken';
11 +$VERSION = '@@GIT_VERSION@@';
12
13 use Cwd qw/abs_path/;
14 $GIT_DIR = abs_path($ENV{GIT_DIR} || '.git');
t/Makefile
+10
@@ -11,6 +11,7 @@ TAR ?= $(TAR)
11 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
12
13 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
14 +TSVN = $(wildcard t91[0-9][0-9]-*.sh)
15
16 ifdef NO_PYTHON
17 GIT_TEST_OPTS += --no-python
@@ -24,6 +25,15 @@ $(T):
25 clean:
26 rm -fr trash
27
28 +# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
29 +full-svn-test:
30 + $(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
31 + $(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
32 + $(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \
33 + LC_ALL=en_US.UTF-8
34 + $(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \
35 + LC_ALL=en_US.UTF-8
36 +
37 .PHONY: $(T) clean
38 .NOTPARALLEL:
39
t/lib-git-svn.sh renamed
+8 -10
@@ -1,14 +1,12 @@
1 -PATH=$PWD/../:$PATH
2 -if test -d ../../../t
1 +. ./test-lib.sh
2 +
3 +if test -n "$NO_SVN_TESTS"
4 then
4 - cd ../../../t
5 -else
6 - echo "Must be run in contrib/git-svn/t" >&2
7 - exit 1
5 + test_expect_success 'skipping git-svn tests, NO_SVN_TESTS defined' :
6 + test_done
7 + exit
8 fi
9
10 -. ./test-lib.sh
11 -
10 GIT_DIR=$PWD/.git
11 GIT_SVN_DIR=$GIT_DIR/svn/git-svn
12 SVN_TREE=$GIT_SVN_DIR/svn-tree
@@ -16,7 +14,7 @@ SVN_TREE=$GIT_SVN_DIR/svn-tree
14 svnadmin >/dev/null 2>&1
15 if test $? != 1
16 then
19 - test_expect_success 'skipping contrib/git-svn test' :
17 + test_expect_success 'skipping git-svn tests, svnadmin not found' :
18 test_done
19 exit
20 fi
@@ -24,7 +22,7 @@ fi
22 svn >/dev/null 2>&1
23 if test $? != 1
24 then
27 - test_expect_success 'skipping contrib/git-svn test' :
25 + test_expect_success 'skipping git-svn tests, svn not found' :
26 test_done
27 exit
28 fi
t/t9100-git-svn-basic.sh renamed
+3 -1
@@ -3,7 +3,7 @@
3 # Copyright (c) 2006 Eric Wong
4 #
5
6 -test_description='git-svn tests'
6 +test_description='git-svn basic tests'
7 GIT_SVN_LC_ALL=$LC_ALL
8
9 case "$LC_ALL" in
@@ -17,6 +17,8 @@ esac
17
18 . ./lib-git-svn.sh
19
20 +echo 'define NO_SVN_TESTS to skip git-svn tests'
21 +
22 mkdir import
23 cd import
24
t/t9101-git-svn-props.sh renamed
t/t9102-git-svn-deep-rmdir.sh renamed
t/t9103-git-svn-graft-branches.sh renamed
t/t9104-git-svn-follow-parent.sh renamed
t/t9105-git-svn-commit-diff.sh renamed