Skip to content

Commit 12b681c

Browse files
committed
Merge branch 'jn/svn-fe'
* jn/svn-fe: (36 commits) vcs-svn: suppress a -Wtype-limits warning vcs-svn: allow import of > 4GiB files vcs-svn: rename check_overflow arguments for clarity vcs-svn/svndiff.c: squelch false "unused" warning from gcc vcs-svn: reset first_commit_done in fast_export_init vcs-svn: do not initialize report_buffer twice vcs-svn: avoid hangs from corrupt deltas vcs-svn: guard against overflow when computing preimage length vcs-svn: cap number of bytes read from sliding view test-svn-fe: split off "test-svn-fe -d" into a separate function vcs-svn: implement text-delta handling vcs-svn: let deltas use data from preimage vcs-svn: let deltas use data from postimage vcs-svn: verify that deltas consume all inline data vcs-svn: implement copyfrom_data delta instruction vcs-svn: read instructions from deltas vcs-svn: read inline data from deltas vcs-svn: read the preimage when applying deltas vcs-svn: parse svndiff0 window header vcs-svn: skeleton of an svn delta parser ...
2 parents 53828bb + 3f79000 commit 12b681c

28 files changed

+1448
-1366
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,13 @@
181181
/test-line-buffer
182182
/test-match-trees
183183
/test-mktemp
184-
/test-obj-pool
185184
/test-parse-options
186185
/test-path-utils
187186
/test-run-command
188187
/test-sha1
189188
/test-sigchain
190-
/test-string-pool
191189
/test-subprocess
192190
/test-svn-fe
193-
/test-treap
194191
/common-cmds.h
195192
*.tar.gz
196193
*.dsc

Makefile

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ BUILTIN_OBJS =
377377
BUILT_INS =
378378
COMPAT_CFLAGS =
379379
COMPAT_OBJS =
380+
XDIFF_H =
381+
XDIFF_OBJS =
382+
VCSSVN_H =
383+
VCSSVN_OBJS =
384+
VCSSVN_TEST_OBJS =
380385
EXTRA_CPPFLAGS =
381386
LIB_H =
382387
LIB_OBJS =
@@ -469,16 +474,13 @@ TEST_PROGRAMS_NEED_X += test-index-version
469474
TEST_PROGRAMS_NEED_X += test-line-buffer
470475
TEST_PROGRAMS_NEED_X += test-match-trees
471476
TEST_PROGRAMS_NEED_X += test-mktemp
472-
TEST_PROGRAMS_NEED_X += test-obj-pool
473477
TEST_PROGRAMS_NEED_X += test-parse-options
474478
TEST_PROGRAMS_NEED_X += test-path-utils
475479
TEST_PROGRAMS_NEED_X += test-run-command
476480
TEST_PROGRAMS_NEED_X += test-sha1
477481
TEST_PROGRAMS_NEED_X += test-sigchain
478-
TEST_PROGRAMS_NEED_X += test-string-pool
479482
TEST_PROGRAMS_NEED_X += test-subprocess
480483
TEST_PROGRAMS_NEED_X += test-svn-fe
481-
TEST_PROGRAMS_NEED_X += test-treap
482484

483485
TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
484486

@@ -1993,12 +1995,24 @@ GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
19931995
ifndef NO_CURL
19941996
GIT_OBJS += http.o http-walker.o remote-curl.o
19951997
endif
1996-
XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
1997-
xdiff/xmerge.o xdiff/xpatience.o xdiff/xhistogram.o
1998-
VCSSVN_OBJS = vcs-svn/string_pool.o vcs-svn/line_buffer.o \
1999-
vcs-svn/repo_tree.o vcs-svn/fast_export.o vcs-svn/svndump.o
2000-
VCSSVN_TEST_OBJS = test-obj-pool.o test-string-pool.o \
2001-
test-line-buffer.o test-treap.o
1998+
1999+
XDIFF_OBJS += xdiff/xdiffi.o
2000+
XDIFF_OBJS += xdiff/xprepare.o
2001+
XDIFF_OBJS += xdiff/xutils.o
2002+
XDIFF_OBJS += xdiff/xemit.o
2003+
XDIFF_OBJS += xdiff/xmerge.o
2004+
XDIFF_OBJS += xdiff/xpatience.o
2005+
XDIFF_OBJS += xdiff/xhistogram.o
2006+
2007+
VCSSVN_OBJS += vcs-svn/line_buffer.o
2008+
VCSSVN_OBJS += vcs-svn/sliding_window.o
2009+
VCSSVN_OBJS += vcs-svn/repo_tree.o
2010+
VCSSVN_OBJS += vcs-svn/fast_export.o
2011+
VCSSVN_OBJS += vcs-svn/svndiff.o
2012+
VCSSVN_OBJS += vcs-svn/svndump.o
2013+
2014+
VCSSVN_TEST_OBJS += test-line-buffer.o
2015+
20022016
OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS) $(VCSSVN_OBJS)
20032017

20042018
dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
@@ -2117,16 +2131,25 @@ connect.o transport.o url.o http-backend.o: url.h
21172131
http-fetch.o http-walker.o remote-curl.o transport.o walker.o: walker.h
21182132
http.o http-walker.o http-push.o http-fetch.o remote-curl.o: http.h url.h
21192133

2120-
xdiff-interface.o $(XDIFF_OBJS): \
2121-
xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
2122-
xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
2134+
XDIFF_H += xdiff/xinclude.h
2135+
XDIFF_H += xdiff/xmacros.h
2136+
XDIFF_H += xdiff/xdiff.h
2137+
XDIFF_H += xdiff/xtypes.h
2138+
XDIFF_H += xdiff/xutils.h
2139+
XDIFF_H += xdiff/xprepare.h
2140+
XDIFF_H += xdiff/xdiffi.h
2141+
XDIFF_H += xdiff/xemit.h
2142+
2143+
xdiff-interface.o $(XDIFF_OBJS): $(XDIFF_H)
21232144

2124-
$(VCSSVN_OBJS) $(VCSSVN_TEST_OBJS): $(LIB_H) \
2125-
vcs-svn/obj_pool.h vcs-svn/trp.h vcs-svn/string_pool.h \
2126-
vcs-svn/line_buffer.h vcs-svn/repo_tree.h vcs-svn/fast_export.h \
2127-
vcs-svn/svndump.h
2145+
VCSSVN_H += vcs-svn/line_buffer.h
2146+
VCSSVN_H += vcs-svn/sliding_window.h
2147+
VCSSVN_H += vcs-svn/repo_tree.h
2148+
VCSSVN_H += vcs-svn/fast_export.h
2149+
VCSSVN_H += vcs-svn/svndiff.h
2150+
VCSSVN_H += vcs-svn/svndump.h
21282151

2129-
test-svn-fe.o: vcs-svn/svndump.h
2152+
$(VCSSVN_OBJS) $(VCSSVN_TEST_OBJS): $(LIB_H) $(VCSSVN_H)
21302153
endif
21312154

21322155
exec_cmd.sp exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \
@@ -2354,8 +2377,6 @@ test-line-buffer$X: vcs-svn/lib.a
23542377

23552378
test-parse-options$X: parse-options.o parse-options-cb.o
23562379

2357-
test-string-pool$X: vcs-svn/lib.a
2358-
23592380
test-svn-fe$X: vcs-svn/lib.a
23602381

23612382
.PRECIOUS: $(TEST_OBJS)

contrib/svn-fe/svn-fe.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ svn-fe - convert an SVN "dumpfile" to a fast-import stream
88
SYNOPSIS
99
--------
1010
[verse]
11-
svnadmin dump --incremental REPO | svn-fe [url] | git fast-import
11+
mkfifo backchannel &&
12+
svnadmin dump --deltas REPO |
13+
svn-fe [url] 3<backchannel |
14+
git fast-import --cat-blob-fd=3 3>backchannel
1215

1316
DESCRIPTION
1417
-----------
@@ -29,9 +32,6 @@ Subversion's repository dump format is documented in full in
2932
Files in this format can be generated using the 'svnadmin dump' or
3033
'svk admin dump' command.
3134

32-
Dumps produced with 'svnadmin dump --deltas' (dumpfile format v3)
33-
are not supported.
34-
3535
OUTPUT FORMAT
3636
-------------
3737
The fast-import format is documented by the git-fast-import(1)

t/t0080-vcs-svn.sh

Lines changed: 0 additions & 117 deletions
This file was deleted.

0 commit comments

Comments
 (0)