{"thread":{"id":"49154","subject":"[RFC/PATCH] drop vcs-svn experiment","startedAt":"2018-08-17T19:03:20Z","lastAt":"2018-10-04T04:16:31Z","messageCount":6,"participants":["Jeff King","Todd Zullinger","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"355932","messageId":"20180817190310.GA5360@sigill.intra.peff.net","threadId":"49154","inReplyTo":null,"subject":"[RFC/PATCH] drop vcs-svn experiment","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-08-17T19:03:10Z","receivedAt":"2018-08-17T19:03:20Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The code in vcs-svn was started in 2010 as an attempt to\nbuild a remote-helper for interacting with svn repositories\n(as opposed to git-svn). However, we never got as far as\nshipping a mature remote helper, and the last substantive\ncommit was e99d012a6bc in 2012.\n\nWe do have a git-remote-testsvn, and it is even installed as\npart of \"make install\". But given the name, it seems\nunlikely to be used by anybody (you'd have to explicitly\n\"git clone testsvn::$url\", and there have been zero mentions\nof that on the mailing list since 2013, and even that\nincludes the phrase \"you might need to hack a bit to get it\nworking properly\"[1]).\n\nWe also ship contrib/svn-fe, which builds on the vcs-svn\nwork. However, it does not seem to build out of the box for\nme, as the link step misses some required libraries for\nusing libgit.a. Curiously, the original build breakage\nbisects for me to eff80a9fd9 (Allow custom \"comment char\",\n2013-01-16), which seems unrelated. There was an attempt to\nfix it in da011cb0e7 (contrib/svn-fe: fix Makefile,\n2014-08-28), but on my system that only switches the error\nmessage.\n\nSo it seems like the result is not really usable by anybody\nin practice. It would be wonderful if somebody wanted to\npick up the topic again, and potentially it's worth carrying\naround for that reason. But the flip side is that people\ndoing a tree-wide operations have to deal with this code.\nAnd you can see the list with (replace \"HEAD\" with this\ncommit as appropriate):\n\n  {\n    echo \"--\"\n    git diff-tree --diff-filter=D -r --name-only HEAD^ HEAD\n  } |\n  git log e99d012a6bc.. --stdin\n\nwhich shows 58 times somebody had to deal with the code,\ngenerally due to a compile or test failure, or a tree-wide\nstyle fix or API change. Let's drop it and let anybody who\nwants to pick it up do so by resurrecting it from the git\nhistory.\n\n[1] https://public-inbox.org/git/CALkWK0mPHzKfzFKKpZkfAus3YVC9NFYDbFnt+5JQYVKipk3bQQ@mail.gmail.com/\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nOf course, I could be completely wrong about people using this. Maybe\nsvn-fe builds are just completely broken on my system, and maybe people\nreally do use testsvn::. But if so, they certainly aren't talking about\nit on the mailing list. :)\n\nI'm cc-ing Jonathan as the only currently-active developer who seems to\nhave put significant work into this code. Maybe you have a more informed\nopinion.\n\n .gitignore                     |   1 -\n Makefile                       |  22 --\n contrib/svn-fe/.gitignore      |   4 -\n contrib/svn-fe/Makefile        | 105 -------\n contrib/svn-fe/svn-fe.c        |  18 --\n contrib/svn-fe/svn-fe.txt      |  71 -----\n contrib/svn-fe/svnrdump_sim.py |  68 -----\n remote-testsvn.c               | 337 --------------------\n t/helper/test-line-buffer.c    |  81 -----\n t/helper/test-svn-fe.c         |  52 ----\n t/t9020-remote-svn.sh          |  89 ------\n vcs-svn/LICENSE                |  32 --\n vcs-svn/fast_export.c          | 365 ----------------------\n vcs-svn/fast_export.h          |  34 ---\n vcs-svn/line_buffer.c          | 126 --------\n vcs-svn/line_buffer.h          |  30 --\n vcs-svn/line_buffer.txt        |  77 -----\n vcs-svn/sliding_window.c       |  79 -----\n vcs-svn/sliding_window.h       |  18 --\n vcs-svn/svndiff.c              | 309 -------------------\n vcs-svn/svndiff.h              |  10 -\n vcs-svn/svndump.c              | 540 ---------------------------------\n vcs-svn/svndump.h              |  10 -\n 23 files changed, 2478 deletions(-)\n delete mode 100644 contrib/svn-fe/.gitignore\n delete mode 100644 contrib/svn-fe/Makefile\n delete mode 100644 contrib/svn-fe/svn-fe.c\n delete mode 100644 contrib/svn-fe/svn-fe.txt\n delete mode 100755 contrib/svn-fe/svnrdump_sim.py\n delete mode 100644 remote-testsvn.c\n delete mode 100644 t/helper/test-line-buffer.c\n delete mode 100644 t/helper/test-svn-fe.c\n delete mode 100755 t/t9020-remote-svn.sh\n delete mode 100644 vcs-svn/LICENSE\n delete mode 100644 vcs-svn/fast_export.c\n delete mode 100644 vcs-svn/fast_export.h\n delete mode 100644 vcs-svn/line_buffer.c\n delete mode 100644 vcs-svn/line_buffer.h\n delete mode 100644 vcs-svn/line_buffer.txt\n delete mode 100644 vcs-svn/sliding_window.c\n delete mode 100644 vcs-svn/sliding_window.h\n delete mode 100644 vcs-svn/svndiff.c\n delete mode 100644 vcs-svn/svndiff.h\n delete mode 100644 vcs-svn/svndump.c\n delete mode 100644 vcs-svn/svndump.h\n\ndiff --git a/.gitignore b/.gitignore\nindex 3524803da5..fe022dbeb0 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -131,7 +131,6 @@\n /git-remote-ext\n /git-remote-testgit\n /git-remote-testpy\n-/git-remote-testsvn\n /git-repack\n /git-replace\n /git-request-pull\ndiff --git a/Makefile b/Makefile\nindex e3364a42a5..8a890e28e9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -695,7 +695,6 @@ PROGRAM_OBJS += http-backend.o\n PROGRAM_OBJS += imap-send.o\n PROGRAM_OBJS += sh-i18n--envsubst.o\n PROGRAM_OBJS += shell.o\n-PROGRAM_OBJS += remote-testsvn.o\n \n # Binary suffix, set to .exe for Windows builds\n X =\n@@ -743,10 +742,8 @@ TEST_BUILTINS_OBJS += test-write-cache.o\n TEST_PROGRAMS_NEED_X += test-dump-fsmonitor\n TEST_PROGRAMS_NEED_X += test-dump-untracked-cache\n TEST_PROGRAMS_NEED_X += test-fake-ssh\n-TEST_PROGRAMS_NEED_X += test-line-buffer\n TEST_PROGRAMS_NEED_X += test-parse-options\n TEST_PROGRAMS_NEED_X += test-pkt-line\n-TEST_PROGRAMS_NEED_X += test-svn-fe\n TEST_PROGRAMS_NEED_X += test-tool\n \n TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))\n@@ -800,7 +797,6 @@ TEST_SHELL_PATH = $(SHELL_PATH)\n \n LIB_FILE = libgit.a\n XDIFF_LIB = xdiff/lib.a\n-VCSSVN_LIB = vcs-svn/lib.a\n \n GENERATED_H += command-list.h\n \n@@ -2229,16 +2225,9 @@ XDIFF_OBJS += xdiff/xmerge.o\n XDIFF_OBJS += xdiff/xpatience.o\n XDIFF_OBJS += xdiff/xhistogram.o\n \n-VCSSVN_OBJS += vcs-svn/line_buffer.o\n-VCSSVN_OBJS += vcs-svn/sliding_window.o\n-VCSSVN_OBJS += vcs-svn/fast_export.o\n-VCSSVN_OBJS += vcs-svn/svndiff.o\n-VCSSVN_OBJS += vcs-svn/svndump.o\n-\n TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))\n OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \\\n \t$(XDIFF_OBJS) \\\n-\t$(VCSSVN_OBJS) \\\n \tcommon-main.o \\\n \tgit.o\n ifndef NO_CURL\n@@ -2352,10 +2341,6 @@ git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS)\n \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n \t\t$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)\n \n-git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)\n-\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) \\\n-\t$(VCSSVN_LIB)\n-\n $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)\n \t$(QUIET_LNCP)$(RM) $@ && \\\n \tln $< $@ 2>/dev/null || \\\n@@ -2372,9 +2357,6 @@ $(LIB_FILE): $(LIB_OBJS)\n $(XDIFF_LIB): $(XDIFF_OBJS)\n \t$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^\n \n-$(VCSSVN_LIB): $(VCSSVN_OBJS)\n-\t$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^\n-\n export DEFAULT_EDITOR DEFAULT_PAGER\n \n .PHONY: doc man man-perl html info pdf\n@@ -2642,10 +2624,6 @@ perf: all\n \n .PHONY: test perf\n \n-t/helper/test-line-buffer$X: $(VCSSVN_LIB)\n-\n-t/helper/test-svn-fe$X: $(VCSSVN_LIB)\n-\n .PRECIOUS: $(TEST_OBJS)\n \n t/helper/test-tool$X: $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))\ndiff --git a/contrib/svn-fe/.gitignore b/contrib/svn-fe/.gitignore\ndeleted file mode 100644\nindex 02a7791585..0000000000\n--- a/contrib/svn-fe/.gitignore\n+++ /dev/null\n@@ -1,4 +0,0 @@\n-/*.xml\n-/*.1\n-/*.html\n-/svn-fe\ndiff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile\ndeleted file mode 100644\nindex e8651aaf4b..0000000000\n--- a/contrib/svn-fe/Makefile\n+++ /dev/null\n@@ -1,105 +0,0 @@\n-all:: svn-fe$X\n-\n-CC = cc\n-RM = rm -f\n-MV = mv\n-\n-CFLAGS = -g -O2 -Wall\n-LDFLAGS =\n-EXTLIBS = -lz\n-\n-include ../../config.mak.uname\n--include ../../config.mak.autogen\n--include ../../config.mak\n-\n-ifeq ($(uname_S),Darwin)\n-\tifndef NO_FINK\n-\t\tifeq ($(shell test -d /sw/lib && echo y),y)\n-\t\t\tCFLAGS += -I/sw/include\n-\t\t\tLDFLAGS += -L/sw/lib\n-\t\tendif\n-\tendif\n-\tifndef NO_DARWIN_PORTS\n-\t\tifeq ($(shell test -d /opt/local/lib && echo y),y)\n-\t\t\tCFLAGS += -I/opt/local/include\n-\t\t\tLDFLAGS += -L/opt/local/lib\n-\t\tendif\n-\tendif\n-endif\n-\n-ifndef NO_OPENSSL\n-\tEXTLIBS += -lssl\n-\tifdef NEEDS_CRYPTO_WITH_SSL\n-\t\tEXTLIBS += -lcrypto\n-\tendif\n-endif\n-\n-ifndef NO_PTHREADS\n-\tCFLAGS += $(PTHREADS_CFLAGS)\n-\tEXTLIBS += $(PTHREAD_LIBS)\n-endif\n-\n-ifdef HAVE_CLOCK_GETTIME\n-\tCFLAGS += -DHAVE_CLOCK_GETTIME\n-\tEXTLIBS += -lrt\n-endif\n-\n-ifdef NEEDS_LIBICONV\n-\tEXTLIBS += -liconv\n-endif\n-\n-GIT_LIB = ../../libgit.a\n-VCSSVN_LIB = ../../vcs-svn/lib.a\n-XDIFF_LIB = ../../xdiff/lib.a\n-\n-LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(XDIFF_LIB)\n-\n-QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir\n-QUIET_SUBDIR1 =\n-\n-ifneq ($(findstring $(MAKEFLAGS),w),w)\n-PRINT_DIR = --no-print-directory\n-else # \"make -w\"\n-NO_SUBDIR = :\n-endif\n-\n-ifneq ($(findstring $(MAKEFLAGS),s),s)\n-ifndef V\n-\tQUIET_CC      = @echo '   ' CC $@;\n-\tQUIET_LINK    = @echo '   ' LINK $@;\n-\tQUIET_SUBDIR0 = +@subdir=\n-\tQUIET_SUBDIR1 = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \\\n-\t                $(MAKE) $(PRINT_DIR) -C $$subdir\n-endif\n-endif\n-\n-svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)\n-\t$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)\n-\n-svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h\n-\t$(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<\n-\n-svn-fe.html: svn-fe.txt\n-\t$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \\\n-\t\tMAN_TXT=../contrib/svn-fe/svn-fe.txt \\\n-\t\t../contrib/svn-fe/$@\n-\n-svn-fe.1: svn-fe.txt\n-\t$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \\\n-\t\tMAN_TXT=../contrib/svn-fe/svn-fe.txt \\\n-\t\t../contrib/svn-fe/$@\n-\t$(MV) ../../Documentation/svn-fe.1 .\n-\n-../../vcs-svn/lib.a: FORCE\n-\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a\n-\n-../../xdiff/lib.a: FORCE\n-\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) xdiff/lib.a\n-\n-../../libgit.a: FORCE\n-\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a\n-\n-clean:\n-\t$(RM) svn-fe$X svn-fe.o svn-fe.html svn-fe.xml svn-fe.1\n-\n-.PHONY: all clean FORCE\ndiff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c\ndeleted file mode 100644\nindex f363505abb..0000000000\n--- a/contrib/svn-fe/svn-fe.c\n+++ /dev/null\n@@ -1,18 +0,0 @@\n-/*\n- * This file is in the public domain.\n- * You may freely use, modify, distribute, and relicense it.\n- */\n-\n-#include <stdlib.h>\n-#include \"svndump.h\"\n-\n-int main(int argc, char **argv)\n-{\n-\tif (svndump_init(NULL))\n-\t\treturn 1;\n-\tsvndump_read((argc > 1) ? argv[1] : NULL, \"refs/heads/master\",\n-\t\t\t\"refs/notes/svn/revs\");\n-\tsvndump_deinit();\n-\tsvndump_reset();\n-\treturn 0;\n-}\ndiff --git a/contrib/svn-fe/svn-fe.txt b/contrib/svn-fe/svn-fe.txt\ndeleted file mode 100644\nindex a3425f4770..0000000000\n--- a/contrib/svn-fe/svn-fe.txt\n+++ /dev/null\n@@ -1,71 +0,0 @@\n-svn-fe(1)\n-=========\n-\n-NAME\n-----\n-svn-fe - convert an SVN \"dumpfile\" to a fast-import stream\n-\n-SYNOPSIS\n---------\n-[verse]\n-mkfifo backchannel &&\n-svnadmin dump --deltas REPO |\n-\tsvn-fe [url] 3<backchannel |\n-\tgit fast-import --cat-blob-fd=3 3>backchannel\n-\n-DESCRIPTION\n------------\n-\n-Converts a Subversion dumpfile into input suitable for\n-git-fast-import(1) and similar importers. REPO is a path to a\n-Subversion repository mirrored on the local disk. Remote Subversion\n-repositories can be mirrored on local disk using the `svnsync`\n-command.\n-\n-Note: this tool is very young.  The details of its commandline\n-interface may change in backward incompatible ways.\n-\n-INPUT FORMAT\n-------------\n-Subversion's repository dump format is documented in full in\n-`notes/dump-load-format.txt` from the Subversion source tree.\n-Files in this format can be generated using the 'svnadmin dump' or\n-'svk admin dump' command.\n-\n-OUTPUT FORMAT\n--------------\n-The fast-import format is documented by the git-fast-import(1)\n-manual page.\n-\n-NOTES\n------\n-Subversion dumps do not record a separate author and committer for\n-each revision, nor do they record a separate display name and email\n-address for each author.  Like git-svn(1), 'svn-fe' will use the name\n-\n----------\n-user <user@UUID>\n----------\n-\n-as committer, where 'user' is the value of the `svn:author` property\n-and 'UUID' the repository's identifier.\n-\n-To support incremental imports, 'svn-fe' puts a `git-svn-id` line at\n-the end of each commit log message if passed a URL on the command\n-line.  This line has the form `git-svn-id: URL@REVNO UUID`.\n-\n-The resulting repository will generally require further processing\n-to put each project in its own repository and to separate the history\n-of each branch.  The 'git filter-branch --subdirectory-filter' command\n-may be useful for this purpose.\n-\n-BUGS\n-----\n-Empty directories and unknown properties are silently discarded.\n-\n-The exit status does not reflect whether an error was detected.\n-\n-SEE ALSO\n---------\n-git-svn(1), svn2git(1), svk(1), git-filter-branch(1), git-fast-import(1),\n-https://svn.apache.org/repos/asf/subversion/trunk/notes/dump-load-format.txt\ndiff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py\ndeleted file mode 100755\nindex 11ac6f6927..0000000000\n--- a/contrib/svn-fe/svnrdump_sim.py\n+++ /dev/null\n@@ -1,68 +0,0 @@\n-#!/usr/bin/python\n-\"\"\"\n-Simulates svnrdump by replaying an existing dump from a file, taking care\n-of the specified revision range.\n-To simulate incremental imports the environment variable SVNRMAX can be set\n-to the highest revision that should be available.\n-\"\"\"\n-import sys\n-import os\n-\n-if sys.hexversion < 0x02040000:\n-    # The limiter is the ValueError() calls. This may be too conservative\n-    sys.stderr.write(\"svnrdump-sim.py: requires Python 2.4 or later.\\n\")\n-    sys.exit(1)\n-\n-\n-def getrevlimit():\n-    var = 'SVNRMAX'\n-    if var in os.environ:\n-        return os.environ[var]\n-    return None\n-\n-\n-def writedump(url, lower, upper):\n-    if url.startswith('sim://'):\n-        filename = url[6:]\n-        if filename[-1] == '/':\n-            filename = filename[:-1]  # remove terminating slash\n-    else:\n-        raise ValueError('sim:// url required')\n-    f = open(filename, 'r')\n-    state = 'header'\n-    wroterev = False\n-    while(True):\n-        l = f.readline()\n-        if l == '':\n-            break\n-        if state == 'header' and l.startswith('Revision-number: '):\n-            state = 'prefix'\n-        if state == 'prefix' and l == 'Revision-number: %s\\n' % lower:\n-            state = 'selection'\n-        if not upper == 'HEAD' and state == 'selection' and \\\n-                l == 'Revision-number: %s\\n' % upper:\n-            break\n-\n-        if state == 'header' or state == 'selection':\n-            if state == 'selection':\n-                wroterev = True\n-            sys.stdout.write(l)\n-    return wroterev\n-\n-if __name__ == \"__main__\":\n-    if not (len(sys.argv) in (3, 4, 5)):\n-        print(\"usage: %s dump URL -rLOWER:UPPER\")\n-        sys.exit(1)\n-    if not sys.argv[1] == 'dump':\n-        raise NotImplementedError('only \"dump\" is suppported.')\n-    url = sys.argv[2]\n-    r = ('0', 'HEAD')\n-    if len(sys.argv) == 4 and sys.argv[3][0:2] == '-r':\n-        r = sys.argv[3][2:].lstrip().split(':')\n-    if not getrevlimit() is None:\n-        r[1] = getrevlimit()\n-    if writedump(url, r[0], r[1]):\n-        ret = 0\n-    else:\n-        ret = 1\n-    sys.exit(ret)\ndiff --git a/remote-testsvn.c b/remote-testsvn.c\ndeleted file mode 100644\nindex 3af708c5b6..0000000000\n--- a/remote-testsvn.c\n+++ /dev/null\n@@ -1,337 +0,0 @@\n-#include \"cache.h\"\n-#include \"refs.h\"\n-#include \"remote.h\"\n-#include \"object-store.h\"\n-#include \"strbuf.h\"\n-#include \"url.h\"\n-#include \"exec-cmd.h\"\n-#include \"run-command.h\"\n-#include \"vcs-svn/svndump.h\"\n-#include \"notes.h\"\n-#include \"argv-array.h\"\n-\n-static const char *url;\n-static int dump_from_file;\n-static const char *private_ref;\n-static const char *remote_ref = \"refs/heads/master\";\n-static const char *marksfilename, *notes_ref;\n-struct rev_note { unsigned int rev_nr; };\n-\n-static int cmd_capabilities(const char *line);\n-static int cmd_import(const char *line);\n-static int cmd_list(const char *line);\n-\n-typedef int (*input_command_handler)(const char *);\n-struct input_command_entry {\n-\tconst char *name;\n-\tinput_command_handler fn;\n-\tunsigned char batchable;\t/* whether the command starts or is part of a batch */\n-};\n-\n-static const struct input_command_entry input_command_list[] = {\n-\t{ \"capabilities\", cmd_capabilities, 0 },\n-\t{ \"import\", cmd_import, 1 },\n-\t{ \"list\", cmd_list, 0 },\n-\t{ NULL, NULL }\n-};\n-\n-static int cmd_capabilities(const char *line)\n-{\n-\tprintf(\"import\\n\");\n-\tprintf(\"bidi-import\\n\");\n-\tprintf(\"refspec %s:%s\\n\\n\", remote_ref, private_ref);\n-\tfflush(stdout);\n-\treturn 0;\n-}\n-\n-static void terminate_batch(void)\n-{\n-\t/* terminate a current batch's fast-import stream */\n-\tprintf(\"done\\n\");\n-\tfflush(stdout);\n-}\n-\n-/* NOTE: 'ref' refers to a git reference, while 'rev' refers to a svn revision. */\n-static char *read_ref_note(const struct object_id *oid)\n-{\n-\tconst struct object_id *note_oid;\n-\tchar *msg = NULL;\n-\tunsigned long msglen;\n-\tenum object_type type;\n-\n-\tinit_notes(NULL, notes_ref, NULL, 0);\n-\tif (!(note_oid = get_note(NULL, oid)))\n-\t\treturn NULL;\t/* note tree not found */\n-\tif (!(msg = read_object_file(note_oid, &type, &msglen)))\n-\t\terror(\"Empty notes tree. %s\", notes_ref);\n-\telse if (!msglen || type != OBJ_BLOB) {\n-\t\terror(\"Note contains unusable content. \"\n-\t\t\t\"Is something else using this notes tree? %s\", notes_ref);\n-\t\tFREE_AND_NULL(msg);\n-\t}\n-\tfree_notes(NULL);\n-\treturn msg;\n-}\n-\n-static int parse_rev_note(const char *msg, struct rev_note *res)\n-{\n-\tconst char *key, *value, *end;\n-\tsize_t len;\n-\n-\twhile (*msg) {\n-\t\tend = strchrnul(msg, '\\n');\n-\t\tlen = end - msg;\n-\n-\t\tkey = \"Revision-number: \";\n-\t\tif (starts_with(msg, key)) {\n-\t\t\tlong i;\n-\t\t\tchar *end;\n-\t\t\tvalue = msg + strlen(key);\n-\t\t\ti = strtol(value, &end, 0);\n-\t\t\tif (end == value || i < 0 || i > UINT32_MAX)\n-\t\t\t\treturn -1;\n-\t\t\tres->rev_nr = i;\n-\t\t\treturn 0;\n-\t\t}\n-\t\tmsg += len + 1;\n-\t}\n-\t/* didn't find it */\n-\treturn -1;\n-}\n-\n-static int note2mark_cb(const struct object_id *object_oid,\n-\t\tconst struct object_id *note_oid, char *note_path,\n-\t\tvoid *cb_data)\n-{\n-\tFILE *file = (FILE *)cb_data;\n-\tchar *msg;\n-\tunsigned long msglen;\n-\tenum object_type type;\n-\tstruct rev_note note;\n-\n-\tif (!(msg = read_object_file(note_oid, &type, &msglen)) ||\n-\t\t\t!msglen || type != OBJ_BLOB) {\n-\t\tfree(msg);\n-\t\treturn 1;\n-\t}\n-\tif (parse_rev_note(msg, &note))\n-\t\treturn 2;\n-\tif (fprintf(file, \":%d %s\\n\", note.rev_nr, oid_to_hex(object_oid)) < 1)\n-\t\treturn 3;\n-\treturn 0;\n-}\n-\n-static void regenerate_marks(void)\n-{\n-\tint ret;\n-\tFILE *marksfile = xfopen(marksfilename, \"w+\");\n-\n-\tret = for_each_note(NULL, 0, note2mark_cb, marksfile);\n-\tif (ret)\n-\t\tdie(\"Regeneration of marks failed, returned %d.\", ret);\n-\tfclose(marksfile);\n-}\n-\n-static void check_or_regenerate_marks(int latestrev)\n-{\n-\tFILE *marksfile;\n-\tstruct strbuf sb = STRBUF_INIT;\n-\tstruct strbuf line = STRBUF_INIT;\n-\tint found = 0;\n-\n-\tif (latestrev < 1)\n-\t\treturn;\n-\n-\tinit_notes(NULL, notes_ref, NULL, 0);\n-\tmarksfile = fopen(marksfilename, \"r\");\n-\tif (!marksfile) {\n-\t\tregenerate_marks();\n-\t\tmarksfile = xfopen(marksfilename, \"r\");\n-\t\tfclose(marksfile);\n-\t} else {\n-\t\tstrbuf_addf(&sb, \":%d \", latestrev);\n-\t\twhile (strbuf_getline_lf(&line, marksfile) != EOF) {\n-\t\t\tif (starts_with(line.buf, sb.buf)) {\n-\t\t\t\tfound++;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t}\n-\t\tfclose(marksfile);\n-\t\tif (!found)\n-\t\t\tregenerate_marks();\n-\t}\n-\tfree_notes(NULL);\n-\tstrbuf_release(&sb);\n-\tstrbuf_release(&line);\n-}\n-\n-static int cmd_import(const char *line)\n-{\n-\tint code;\n-\tint dumpin_fd;\n-\tchar *note_msg;\n-\tstruct object_id head_oid;\n-\tunsigned int startrev;\n-\tstruct child_process svndump_proc = CHILD_PROCESS_INIT;\n-\tconst char *command = \"svnrdump\";\n-\n-\tif (read_ref(private_ref, &head_oid))\n-\t\tstartrev = 0;\n-\telse {\n-\t\tnote_msg = read_ref_note(&head_oid);\n-\t\tif(note_msg == NULL) {\n-\t\t\twarning(\"No note found for %s.\", private_ref);\n-\t\t\tstartrev = 0;\n-\t\t} else {\n-\t\t\tstruct rev_note note = { 0 };\n-\t\t\tif (parse_rev_note(note_msg, &note))\n-\t\t\t\tdie(\"Revision number couldn't be parsed from note.\");\n-\t\t\tstartrev = note.rev_nr + 1;\n-\t\t\tfree(note_msg);\n-\t\t}\n-\t}\n-\tcheck_or_regenerate_marks(startrev - 1);\n-\n-\tif (dump_from_file) {\n-\t\tdumpin_fd = open(url, O_RDONLY);\n-\t\tif(dumpin_fd < 0)\n-\t\t\tdie_errno(\"Couldn't open svn dump file %s.\", url);\n-\t} else {\n-\t\tsvndump_proc.out = -1;\n-\t\targv_array_push(&svndump_proc.args, command);\n-\t\targv_array_push(&svndump_proc.args, \"dump\");\n-\t\targv_array_push(&svndump_proc.args, url);\n-\t\targv_array_pushf(&svndump_proc.args, \"-r%u:HEAD\", startrev);\n-\n-\t\tcode = start_command(&svndump_proc);\n-\t\tif (code)\n-\t\t\tdie(\"Unable to start %s, code %d\", command, code);\n-\t\tdumpin_fd = svndump_proc.out;\n-\t}\n-\t/* setup marks file import/export */\n-\tprintf(\"feature import-marks-if-exists=%s\\n\"\n-\t\t\t\"feature export-marks=%s\\n\", marksfilename, marksfilename);\n-\n-\tsvndump_init_fd(dumpin_fd, STDIN_FILENO);\n-\tsvndump_read(url, private_ref, notes_ref);\n-\tsvndump_deinit();\n-\tsvndump_reset();\n-\n-\tclose(dumpin_fd);\n-\tif (!dump_from_file) {\n-\t\tcode = finish_command(&svndump_proc);\n-\t\tif (code)\n-\t\t\twarning(\"%s, returned %d\", command, code);\n-\t}\n-\n-\treturn 0;\n-}\n-\n-static int cmd_list(const char *line)\n-{\n-\tprintf(\"? %s\\n\\n\", remote_ref);\n-\tfflush(stdout);\n-\treturn 0;\n-}\n-\n-static int do_command(struct strbuf *line)\n-{\n-\tconst struct input_command_entry *p = input_command_list;\n-\tstatic struct string_list batchlines = STRING_LIST_INIT_DUP;\n-\tstatic const struct input_command_entry *batch_cmd;\n-\t/*\n-\t * commands can be grouped together in a batch.\n-\t * Batches are ended by \\n. If no batch is active the program ends.\n-\t * During a batch all lines are buffered and passed to the handler function\n-\t * when the batch is terminated.\n-\t */\n-\tif (line->len == 0) {\n-\t\tif (batch_cmd) {\n-\t\t\tstruct string_list_item *item;\n-\t\t\tfor_each_string_list_item(item, &batchlines)\n-\t\t\t\tbatch_cmd->fn(item->string);\n-\t\t\tterminate_batch();\n-\t\t\tbatch_cmd = NULL;\n-\t\t\tstring_list_clear(&batchlines, 0);\n-\t\t\treturn 0;\t/* end of the batch, continue reading other commands. */\n-\t\t}\n-\t\treturn 1;\t/* end of command stream, quit */\n-\t}\n-\tif (batch_cmd) {\n-\t\tif (!starts_with(batch_cmd->name, line->buf))\n-\t\t\tdie(\"Active %s batch interrupted by %s\", batch_cmd->name, line->buf);\n-\t\t/* buffer batch lines */\n-\t\tstring_list_append(&batchlines, line->buf);\n-\t\treturn 0;\n-\t}\n-\n-\tfor (p = input_command_list; p->name; p++) {\n-\t\tif (starts_with(line->buf, p->name) && (strlen(p->name) == line->len ||\n-\t\t\t\tline->buf[strlen(p->name)] == ' ')) {\n-\t\t\tif (p->batchable) {\n-\t\t\t\tbatch_cmd = p;\n-\t\t\t\tstring_list_append(&batchlines, line->buf);\n-\t\t\t\treturn 0;\n-\t\t\t}\n-\t\t\treturn p->fn(line->buf);\n-\t\t}\n-\t}\n-\tdie(\"Unknown command '%s'\\n\", line->buf);\n-\treturn 0;\n-}\n-\n-int cmd_main(int argc, const char **argv)\n-{\n-\tstruct strbuf buf = STRBUF_INIT, url_sb = STRBUF_INIT,\n-\t\t\tprivate_ref_sb = STRBUF_INIT, marksfilename_sb = STRBUF_INIT,\n-\t\t\tnotes_ref_sb = STRBUF_INIT;\n-\tstatic struct remote *remote;\n-\tconst char *url_in;\n-\n-\tsetup_git_directory();\n-\tif (argc < 2 || argc > 3) {\n-\t\tusage(\"git-remote-svn <remote-name> [<url>]\");\n-\t\treturn 1;\n-\t}\n-\n-\tremote = remote_get(argv[1]);\n-\turl_in = (argc == 3) ? argv[2] : remote->url[0];\n-\n-\tif (starts_with(url_in, \"file://\")) {\n-\t\tdump_from_file = 1;\n-\t\turl = url_decode(url_in + sizeof(\"file://\")-1);\n-\t} else {\n-\t\tdump_from_file = 0;\n-\t\tend_url_with_slash(&url_sb, url_in);\n-\t\turl = url_sb.buf;\n-\t}\n-\n-\tstrbuf_addf(&private_ref_sb, \"refs/svn/%s/master\", remote->name);\n-\tprivate_ref = private_ref_sb.buf;\n-\n-\tstrbuf_addf(&notes_ref_sb, \"refs/notes/%s/revs\", remote->name);\n-\tnotes_ref = notes_ref_sb.buf;\n-\n-\tstrbuf_addf(&marksfilename_sb, \"%s/info/fast-import/remote-svn/%s.marks\",\n-\t\tget_git_dir(), remote->name);\n-\tmarksfilename = marksfilename_sb.buf;\n-\n-\twhile (1) {\n-\t\tif (strbuf_getline_lf(&buf, stdin) == EOF) {\n-\t\t\tif (ferror(stdin))\n-\t\t\t\tdie(\"Error reading command stream\");\n-\t\t\telse\n-\t\t\t\tdie(\"Unexpected end of command stream\");\n-\t\t}\n-\t\tif (do_command(&buf))\n-\t\t\tbreak;\n-\t\tstrbuf_reset(&buf);\n-\t}\n-\n-\tstrbuf_release(&buf);\n-\tstrbuf_release(&url_sb);\n-\tstrbuf_release(&private_ref_sb);\n-\tstrbuf_release(&notes_ref_sb);\n-\tstrbuf_release(&marksfilename_sb);\n-\treturn 0;\n-}\ndiff --git a/t/helper/test-line-buffer.c b/t/helper/test-line-buffer.c\ndeleted file mode 100644\nindex 078dd7e29d..0000000000\n--- a/t/helper/test-line-buffer.c\n+++ /dev/null\n@@ -1,81 +0,0 @@\n-/*\n- * test-line-buffer.c: code to exercise the svn importer's input helper\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"strbuf.h\"\n-#include \"vcs-svn/line_buffer.h\"\n-\n-static uint32_t strtouint32(const char *s)\n-{\n-\tchar *end;\n-\tuintmax_t n = strtoumax(s, &end, 10);\n-\tif (*s == '\\0' || *end != '\\0')\n-\t\tdie(\"invalid count: %s\", s);\n-\treturn (uint32_t) n;\n-}\n-\n-static void handle_command(const char *command, const char *arg, struct line_buffer *buf)\n-{\n-\tif (starts_with(command, \"binary \")) {\n-\t\tstruct strbuf sb = STRBUF_INIT;\n-\t\tstrbuf_addch(&sb, '>');\n-\t\tbuffer_read_binary(buf, &sb, strtouint32(arg));\n-\t\tfwrite(sb.buf, 1, sb.len, stdout);\n-\t\tstrbuf_release(&sb);\n-\t} else if (starts_with(command, \"copy \")) {\n-\t\tbuffer_copy_bytes(buf, strtouint32(arg));\n-\t} else if (starts_with(command, \"skip \")) {\n-\t\tbuffer_skip_bytes(buf, strtouint32(arg));\n-\t} else {\n-\t\tdie(\"unrecognized command: %s\", command);\n-\t}\n-}\n-\n-static void handle_line(const char *line, struct line_buffer *stdin_buf)\n-{\n-\tconst char *arg = strchr(line, ' ');\n-\tif (!arg)\n-\t\tdie(\"no argument in line: %s\", line);\n-\thandle_command(line, arg + 1, stdin_buf);\n-}\n-\n-int cmd_main(int argc, const char **argv)\n-{\n-\tstruct line_buffer stdin_buf = LINE_BUFFER_INIT;\n-\tstruct line_buffer file_buf = LINE_BUFFER_INIT;\n-\tstruct line_buffer *input = &stdin_buf;\n-\tconst char *filename;\n-\tchar *s;\n-\n-\tif (argc == 1)\n-\t\tfilename = NULL;\n-\telse if (argc == 2)\n-\t\tfilename = argv[1];\n-\telse\n-\t\tusage(\"test-line-buffer [file | &fd] < script\");\n-\n-\tif (buffer_init(&stdin_buf, NULL))\n-\t\tdie_errno(\"open error\");\n-\tif (filename) {\n-\t\tif (*filename == '&') {\n-\t\t\tif (buffer_fdinit(&file_buf, strtouint32(filename + 1)))\n-\t\t\t\tdie_errno(\"error opening fd %s\", filename + 1);\n-\t\t} else {\n-\t\t\tif (buffer_init(&file_buf, filename))\n-\t\t\t\tdie_errno(\"error opening %s\", filename);\n-\t\t}\n-\t\tinput = &file_buf;\n-\t}\n-\n-\twhile ((s = buffer_read_line(&stdin_buf)))\n-\t\thandle_line(s, input);\n-\n-\tif (filename && buffer_deinit(&file_buf))\n-\t\tdie(\"error reading from %s\", filename);\n-\tif (buffer_deinit(&stdin_buf))\n-\t\tdie(\"input error\");\n-\tif (ferror(stdout))\n-\t\tdie(\"output error\");\n-\treturn 0;\n-}\ndiff --git a/t/helper/test-svn-fe.c b/t/helper/test-svn-fe.c\ndeleted file mode 100644\nindex 7667c0803f..0000000000\n--- a/t/helper/test-svn-fe.c\n+++ /dev/null\n@@ -1,52 +0,0 @@\n-/*\n- * test-svn-fe: Code to exercise the svn import lib\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"vcs-svn/svndump.h\"\n-#include \"vcs-svn/svndiff.h\"\n-#include \"vcs-svn/sliding_window.h\"\n-#include \"vcs-svn/line_buffer.h\"\n-\n-static const char test_svnfe_usage[] =\n-\t\"test-svn-fe (<dumpfile> | [-d] <preimage> <delta> <len>)\";\n-\n-static int apply_delta(int argc, const char **argv)\n-{\n-\tstruct line_buffer preimage = LINE_BUFFER_INIT;\n-\tstruct line_buffer delta = LINE_BUFFER_INIT;\n-\tstruct sliding_view preimage_view = SLIDING_VIEW_INIT(&preimage, -1);\n-\n-\tif (argc != 5)\n-\t\tusage(test_svnfe_usage);\n-\n-\tif (buffer_init(&preimage, argv[2]))\n-\t\tdie_errno(\"cannot open preimage\");\n-\tif (buffer_init(&delta, argv[3]))\n-\t\tdie_errno(\"cannot open delta\");\n-\tif (svndiff0_apply(&delta, (off_t) strtoumax(argv[4], NULL, 0),\n-\t\t\t\t\t&preimage_view, stdout))\n-\t\treturn 1;\n-\tif (buffer_deinit(&preimage))\n-\t\tdie_errno(\"cannot close preimage\");\n-\tif (buffer_deinit(&delta))\n-\t\tdie_errno(\"cannot close delta\");\n-\tstrbuf_release(&preimage_view.buf);\n-\treturn 0;\n-}\n-\n-int cmd_main(int argc, const char **argv)\n-{\n-\tif (argc == 2) {\n-\t\tif (svndump_init(argv[1]))\n-\t\t\treturn 1;\n-\t\tsvndump_read(NULL, \"refs/heads/master\", \"refs/notes/svn/revs\");\n-\t\tsvndump_deinit();\n-\t\tsvndump_reset();\n-\t\treturn 0;\n-\t}\n-\n-\tif (argc >= 2 && !strcmp(argv[1], \"-d\"))\n-\t\treturn apply_delta(argc, argv);\n-\tusage(test_svnfe_usage);\n-}\ndiff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\ndeleted file mode 100755\nindex 6fca08e5e3..0000000000\n--- a/t/t9020-remote-svn.sh\n+++ /dev/null\n@@ -1,89 +0,0 @@\n-#!/bin/sh\n-\n-test_description='tests remote-svn'\n-\n-. ./test-lib.sh\n-\n-MARKSPATH=.git/info/fast-import/remote-svn\n-\n-if ! test_have_prereq PYTHON\n-then\n-\tskip_all='skipping remote-svn tests, python not available'\n-\ttest_done\n-fi\n-\n-# Override svnrdump with our simulator\n-PATH=\"$HOME:$PATH\"\n-export PATH PYTHON_PATH GIT_BUILD_DIR\n-\n-write_script \"$HOME/svnrdump\" <<\\EOF\n-exec \"$PYTHON_PATH\" \"$GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py\" \"$@\"\n-EOF\n-\n-init_git () {\n-\trm -fr .git &&\n-\tgit init &&\n-\t#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump\n-\t# let's reuse an existing dump file!?\n-\tgit remote add svnsim \"testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump\"\n-\tgit remote add svnfile \"testsvn::file://$TEST_DIRECTORY/t9154/svn.dump\"\n-}\n-\n-if test -e \"$GIT_BUILD_DIR/git-remote-testsvn\"\n-then\n-\ttest_set_prereq REMOTE_SVN\n-fi\n-\n-test_debug '\n-\tgit --version\n-\ttype git\n-\ttype svnrdump\n-'\n-\n-test_expect_success REMOTE_SVN 'simple fetch' '\n-\tinit_git &&\n-\tgit fetch svnsim &&\n-\ttest_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master  &&\n-\tcp .git/refs/remotes/svnsim/master master.good\n-'\n-\n-test_debug '\n-\tcat .git/refs/svn/svnsim/master\n-\tcat .git/refs/remotes/svnsim/master\n-'\n-\n-test_expect_success REMOTE_SVN 'repeated fetch, nothing shall change' '\n-\tgit fetch svnsim &&\n-\ttest_cmp master.good .git/refs/remotes/svnsim/master\n-'\n-\n-test_expect_success REMOTE_SVN 'fetch from a file:// url gives the same result' '\n-\tgit fetch svnfile\n-'\n-\n-test_expect_failure REMOTE_SVN 'the sha1 differ because the git-svn-id line in the commit msg contains the url' '\n-\ttest_cmp .git/refs/remotes/svnfile/master .git/refs/remotes/svnsim/master\n-'\n-\n-test_expect_success REMOTE_SVN 'mark-file regeneration' '\n-\t# filter out any other marks, that can not be regenerated. Only up to 3 digit revisions are allowed here\n-\tgrep \":[0-9]\\{1,3\\} \" $MARKSPATH/svnsim.marks > $MARKSPATH/svnsim.marks.old &&\n-\trm $MARKSPATH/svnsim.marks &&\n-\tgit fetch svnsim &&\n-\ttest_cmp $MARKSPATH/svnsim.marks.old $MARKSPATH/svnsim.marks\n-'\n-\n-test_expect_success REMOTE_SVN 'incremental imports must lead to the same head' '\n-\tSVNRMAX=3 &&\n-\texport SVNRMAX &&\n-\tinit_git &&\n-\tgit fetch svnsim &&\n-\ttest_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master  &&\n-\tunset SVNRMAX &&\n-\tgit fetch svnsim &&\n-\ttest_cmp master.good .git/refs/remotes/svnsim/master\n-'\n-\n-test_debug 'git branch -a'\n-\n-test_done\ndiff --git a/vcs-svn/LICENSE b/vcs-svn/LICENSE\ndeleted file mode 100644\nindex eb91858b82..0000000000\n--- a/vcs-svn/LICENSE\n+++ /dev/null\n@@ -1,32 +0,0 @@\n-Copyright (C) 2010 David Barr <david.barr@cordelta.com>.\n-All rights reserved.\n-\n-Copyright (C) 2010 Jonathan Nieder <jrnieder@gmail.com>.\n-\n-Copyright (C) 2005 Stefan Hegny, hydrografix Consulting GmbH,\n-Frankfurt/Main, Germany\n-and others, see http://svn2cc.sarovar.org\n-\n-Redistribution and use in source and binary forms, with or without\n-modification, are permitted provided that the following conditions\n-are met:\n-1. Redistributions of source code must retain the above copyright\n-   notice(s), this list of conditions and the following disclaimer\n-   unmodified other than the allowable addition of one or more\n-   copyright notices.\n-2. Redistributions in binary form must reproduce the above copyright\n-   notice(s), this list of conditions and the following disclaimer in\n-   the documentation and/or other materials provided with the\n-   distribution.\n-\n-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY\n-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n-PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE\n-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ndiff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c\ndeleted file mode 100644\nindex b5b8913cb0..0000000000\n--- a/vcs-svn/fast_export.c\n+++ /dev/null\n@@ -1,365 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"cache.h\"\n-#include \"quote.h\"\n-#include \"fast_export.h\"\n-#include \"strbuf.h\"\n-#include \"svndiff.h\"\n-#include \"sliding_window.h\"\n-#include \"line_buffer.h\"\n-\n-#define MAX_GITSVN_LINE_LEN 4096\n-\n-static uint32_t first_commit_done;\n-static struct line_buffer postimage = LINE_BUFFER_INIT;\n-static struct line_buffer report_buffer = LINE_BUFFER_INIT;\n-\n-/* NEEDSWORK: move to fast_export_init() */\n-static int init_postimage(void)\n-{\n-\tstatic int postimage_initialized;\n-\tif (postimage_initialized)\n-\t\treturn 0;\n-\tpostimage_initialized = 1;\n-\treturn buffer_tmpfile_init(&postimage);\n-}\n-\n-void fast_export_init(int fd)\n-{\n-\tfirst_commit_done = 0;\n-\tif (buffer_fdinit(&report_buffer, fd))\n-\t\tdie_errno(\"cannot read from file descriptor %d\", fd);\n-}\n-\n-void fast_export_deinit(void)\n-{\n-\tif (buffer_deinit(&report_buffer))\n-\t\tdie_errno(\"error closing fast-import feedback stream\");\n-}\n-\n-void fast_export_delete(const char *path)\n-{\n-\tputchar('D');\n-\tputchar(' ');\n-\tquote_c_style(path, NULL, stdout, 0);\n-\tputchar('\\n');\n-}\n-\n-static void fast_export_truncate(const char *path, uint32_t mode)\n-{\n-\tfast_export_modify(path, mode, \"inline\");\n-\tprintf(\"data 0\\n\\n\");\n-}\n-\n-void fast_export_modify(const char *path, uint32_t mode, const char *dataref)\n-{\n-\t/* Mode must be 100644, 100755, 120000, or 160000. */\n-\tif (!dataref) {\n-\t\tfast_export_truncate(path, mode);\n-\t\treturn;\n-\t}\n-\tprintf(\"M %06\"PRIo32\" %s \", mode, dataref);\n-\tquote_c_style(path, NULL, stdout, 0);\n-\tputchar('\\n');\n-}\n-\n-void fast_export_begin_note(uint32_t revision, const char *author,\n-\t\tconst char *log, timestamp_t timestamp, const char *note_ref)\n-{\n-\tstatic int firstnote = 1;\n-\tsize_t loglen = strlen(log);\n-\tprintf(\"commit %s\\n\", note_ref);\n-\tprintf(\"committer %s <%s@%s> %\"PRItime\" +0000\\n\", author, author, \"local\", timestamp);\n-\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t)loglen);\n-\tfwrite(log, loglen, 1, stdout);\n-\tif (firstnote) {\n-\t\tif (revision > 1)\n-\t\t\tprintf(\"from %s^0\", note_ref);\n-\t\tfirstnote = 0;\n-\t}\n-\tfputc('\\n', stdout);\n-}\n-\n-void fast_export_note(const char *committish, const char *dataref)\n-{\n-\tprintf(\"N %s %s\\n\", dataref, committish);\n-}\n-\n-static char gitsvnline[MAX_GITSVN_LINE_LEN];\n-void fast_export_begin_commit(uint32_t revision, const char *author,\n-\t\t\tconst struct strbuf *log,\n-\t\t\tconst char *uuid, const char *url,\n-\t\t\ttimestamp_t timestamp, const char *local_ref)\n-{\n-\tstatic const struct strbuf empty = STRBUF_INIT;\n-\tif (!log)\n-\t\tlog = &empty;\n-\tif (*uuid && *url) {\n-\t\tsnprintf(gitsvnline, MAX_GITSVN_LINE_LEN,\n-\t\t\t\t\"\\n\\ngit-svn-id: %s@%\"PRIu32\" %s\\n\",\n-\t\t\t\t url, revision, uuid);\n-\t} else {\n-\t\t*gitsvnline = '\\0';\n-\t}\n-\tprintf(\"commit %s\\n\", local_ref);\n-\tprintf(\"mark :%\"PRIu32\"\\n\", revision);\n-\tprintf(\"committer %s <%s@%s> %\"PRItime\" +0000\\n\",\n-\t\t   *author ? author : \"nobody\",\n-\t\t   *author ? author : \"nobody\",\n-\t\t   *uuid ? uuid : \"local\", timestamp);\n-\tprintf(\"data %\"PRIuMAX\"\\n\",\n-\t\t(uintmax_t) (log->len + strlen(gitsvnline)));\n-\tfwrite(log->buf, log->len, 1, stdout);\n-\tprintf(\"%s\\n\", gitsvnline);\n-\tif (!first_commit_done) {\n-\t\tif (revision > 1)\n-\t\t\tprintf(\"from :%\"PRIu32\"\\n\", revision - 1);\n-\t\tfirst_commit_done = 1;\n-\t}\n-}\n-\n-void fast_export_end_commit(uint32_t revision)\n-{\n-\tprintf(\"progress Imported commit %\"PRIu32\".\\n\\n\", revision);\n-}\n-\n-static void ls_from_rev(uint32_t rev, const char *path)\n-{\n-\t/* ls :5 path/to/old/file */\n-\tprintf(\"ls :%\"PRIu32\" \", rev);\n-\tquote_c_style(path, NULL, stdout, 0);\n-\tputchar('\\n');\n-\tfflush(stdout);\n-}\n-\n-static void ls_from_active_commit(const char *path)\n-{\n-\t/* ls \"path/to/file\" */\n-\tprintf(\"ls \\\"\");\n-\tquote_c_style(path, NULL, stdout, 1);\n-\tprintf(\"\\\"\\n\");\n-\tfflush(stdout);\n-}\n-\n-static const char *get_response_line(void)\n-{\n-\tconst char *line = buffer_read_line(&report_buffer);\n-\tif (line)\n-\t\treturn line;\n-\tif (buffer_ferror(&report_buffer))\n-\t\tdie_errno(\"error reading from fast-import\");\n-\tdie(\"unexpected end of fast-import feedback\");\n-}\n-\n-static void die_short_read(struct line_buffer *input)\n-{\n-\tif (buffer_ferror(input))\n-\t\tdie_errno(\"error reading dump file\");\n-\tdie(\"invalid dump: unexpected end of file\");\n-}\n-\n-static int parse_cat_response_line(const char *header, off_t *len)\n-{\n-\tuintmax_t n;\n-\tconst char *type;\n-\tconst char *end;\n-\n-\tif (ends_with(header, \" missing\"))\n-\t\treturn error(\"cat-blob reports missing blob: %s\", header);\n-\ttype = strstr(header, \" blob \");\n-\tif (!type)\n-\t\treturn error(\"cat-blob header has wrong object type: %s\", header);\n-\tn = strtoumax(type + strlen(\" blob \"), (char **) &end, 10);\n-\tif (end == type + strlen(\" blob \"))\n-\t\treturn error(\"cat-blob header does not contain length: %s\", header);\n-\tif (memchr(type + strlen(\" blob \"), '-', end - type - strlen(\" blob \")))\n-\t\treturn error(\"cat-blob header contains negative length: %s\", header);\n-\tif (n == UINTMAX_MAX || n > maximum_signed_value_of_type(off_t))\n-\t\treturn error(\"blob too large for current definition of off_t\");\n-\t*len = n;\n-\tif (*end)\n-\t\treturn error(\"cat-blob header contains garbage after length: %s\", header);\n-\treturn 0;\n-}\n-\n-static void check_preimage_overflow(off_t a, off_t b)\n-{\n-\tif (signed_add_overflows(a, b))\n-\t\tdie(\"blob too large for current definition of off_t\");\n-}\n-\n-static long apply_delta(off_t len, struct line_buffer *input,\n-\t\t\tconst char *old_data, uint32_t old_mode)\n-{\n-\tlong ret;\n-\tstruct sliding_view preimage = SLIDING_VIEW_INIT(&report_buffer, 0);\n-\tFILE *out;\n-\n-\tif (init_postimage() || !(out = buffer_tmpfile_rewind(&postimage)))\n-\t\tdie(\"cannot open temporary file for blob retrieval\");\n-\tif (old_data) {\n-\t\tconst char *response;\n-\t\tprintf(\"cat-blob %s\\n\", old_data);\n-\t\tfflush(stdout);\n-\t\tresponse = get_response_line();\n-\t\tif (parse_cat_response_line(response, &preimage.max_off))\n-\t\t\tdie(\"invalid cat-blob response: %s\", response);\n-\t\tcheck_preimage_overflow(preimage.max_off, 1);\n-\t}\n-\tif (old_mode == S_IFLNK) {\n-\t\tstrbuf_addstr(&preimage.buf, \"link \");\n-\t\tcheck_preimage_overflow(preimage.max_off, strlen(\"link \"));\n-\t\tpreimage.max_off += strlen(\"link \");\n-\t\tcheck_preimage_overflow(preimage.max_off, 1);\n-\t}\n-\tif (svndiff0_apply(input, len, &preimage, out))\n-\t\tdie(\"cannot apply delta\");\n-\tif (old_data) {\n-\t\t/* Read the remainder of preimage and trailing newline. */\n-\t\tassert(!signed_add_overflows(preimage.max_off, 1));\n-\t\tpreimage.max_off++;\t/* room for newline */\n-\t\tif (move_window(&preimage, preimage.max_off - 1, 1))\n-\t\t\tdie(\"cannot seek to end of input\");\n-\t\tif (preimage.buf.buf[0] != '\\n')\n-\t\t\tdie(\"missing newline after cat-blob response\");\n-\t}\n-\tret = buffer_tmpfile_prepare_to_read(&postimage);\n-\tif (ret < 0)\n-\t\tdie(\"cannot read temporary file for blob retrieval\");\n-\tstrbuf_release(&preimage.buf);\n-\treturn ret;\n-}\n-\n-void fast_export_buf_to_data(const struct strbuf *data)\n-{\n-\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t)data->len);\n-\tfwrite(data->buf, data->len, 1, stdout);\n-\tfputc('\\n', stdout);\n-}\n-\n-void fast_export_data(uint32_t mode, off_t len, struct line_buffer *input)\n-{\n-\tassert(len >= 0);\n-\tif (mode == S_IFLNK) {\n-\t\t/* svn symlink blobs start with \"link \" */\n-\t\tif (len < 5)\n-\t\t\tdie(\"invalid dump: symlink too short for \\\"link\\\" prefix\");\n-\t\tlen -= 5;\n-\t\tif (buffer_skip_bytes(input, 5) != 5)\n-\t\t\tdie_short_read(input);\n-\t}\n-\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t) len);\n-\tif (buffer_copy_bytes(input, len) != len)\n-\t\tdie_short_read(input);\n-\tfputc('\\n', stdout);\n-}\n-\n-static int parse_ls_response(const char *response, uint32_t *mode,\n-\t\t\t\t\tstruct strbuf *dataref)\n-{\n-\tconst char *tab;\n-\tconst char *response_end;\n-\n-\tassert(response);\n-\tresponse_end = response + strlen(response);\n-\n-\tif (*response == 'm') {\t/* Missing. */\n-\t\terrno = ENOENT;\n-\t\treturn -1;\n-\t}\n-\n-\t/* Mode. */\n-\tif (response_end - response < (signed) strlen(\"100644\") ||\n-\t    response[strlen(\"100644\")] != ' ')\n-\t\tdie(\"invalid ls response: missing mode: %s\", response);\n-\t*mode = 0;\n-\tfor (; *response != ' '; response++) {\n-\t\tchar ch = *response;\n-\t\tif (ch < '0' || ch > '7')\n-\t\t\tdie(\"invalid ls response: mode is not octal: %s\", response);\n-\t\t*mode *= 8;\n-\t\t*mode += ch - '0';\n-\t}\n-\n-\t/* ' blob ' or ' tree ' */\n-\tif (response_end - response < (signed) strlen(\" blob \") ||\n-\t    (response[1] != 'b' && response[1] != 't'))\n-\t\tdie(\"unexpected ls response: not a tree or blob: %s\", response);\n-\tresponse += strlen(\" blob \");\n-\n-\t/* Dataref. */\n-\ttab = memchr(response, '\\t', response_end - response);\n-\tif (!tab)\n-\t\tdie(\"invalid ls response: missing tab: %s\", response);\n-\tstrbuf_add(dataref, response, tab - response);\n-\treturn 0;\n-}\n-\n-int fast_export_ls_rev(uint32_t rev, const char *path,\n-\t\t\t\tuint32_t *mode, struct strbuf *dataref)\n-{\n-\tls_from_rev(rev, path);\n-\treturn parse_ls_response(get_response_line(), mode, dataref);\n-}\n-\n-int fast_export_ls(const char *path, uint32_t *mode, struct strbuf *dataref)\n-{\n-\tls_from_active_commit(path);\n-\treturn parse_ls_response(get_response_line(), mode, dataref);\n-}\n-\n-const char *fast_export_read_path(const char *path, uint32_t *mode_out)\n-{\n-\tint err;\n-\tstatic struct strbuf buf = STRBUF_INIT;\n-\n-\tstrbuf_reset(&buf);\n-\terr = fast_export_ls(path, mode_out, &buf);\n-\tif (err) {\n-\t\tif (errno != ENOENT)\n-\t\t\tBUG(\"unexpected fast_export_ls error: %s\",\n-\t\t\t    strerror(errno));\n-\t\t/* Treat missing paths as directories. */\n-\t\t*mode_out = S_IFDIR;\n-\t\treturn NULL;\n-\t}\n-\treturn buf.buf;\n-}\n-\n-void fast_export_copy(uint32_t revision, const char *src, const char *dst)\n-{\n-\tint err;\n-\tuint32_t mode;\n-\tstatic struct strbuf data = STRBUF_INIT;\n-\n-\tstrbuf_reset(&data);\n-\terr = fast_export_ls_rev(revision, src, &mode, &data);\n-\tif (err) {\n-\t\tif (errno != ENOENT)\n-\t\t\tBUG(\"unexpected fast_export_ls_rev error: %s\",\n-\t\t\t    strerror(errno));\n-\t\tfast_export_delete(dst);\n-\t\treturn;\n-\t}\n-\tfast_export_modify(dst, mode, data.buf);\n-}\n-\n-void fast_export_blob_delta(uint32_t mode,\n-\t\t\t\tuint32_t old_mode, const char *old_data,\n-\t\t\t\toff_t len, struct line_buffer *input)\n-{\n-\tlong postimage_len;\n-\n-\tassert(len >= 0);\n-\tpostimage_len = apply_delta(len, input, old_data, old_mode);\n-\tif (mode == S_IFLNK) {\n-\t\tbuffer_skip_bytes(&postimage, strlen(\"link \"));\n-\t\tpostimage_len -= strlen(\"link \");\n-\t}\n-\tprintf(\"data %ld\\n\", postimage_len);\n-\tbuffer_copy_bytes(&postimage, postimage_len);\n-\tfputc('\\n', stdout);\n-}\ndiff --git a/vcs-svn/fast_export.h b/vcs-svn/fast_export.h\ndeleted file mode 100644\nindex 60b79c35b9..0000000000\n--- a/vcs-svn/fast_export.h\n+++ /dev/null\n@@ -1,34 +0,0 @@\n-#ifndef FAST_EXPORT_H_\n-#define FAST_EXPORT_H_\n-\n-struct strbuf;\n-struct line_buffer;\n-\n-void fast_export_init(int fd);\n-void fast_export_deinit(void);\n-\n-void fast_export_delete(const char *path);\n-void fast_export_modify(const char *path, uint32_t mode, const char *dataref);\n-void fast_export_note(const char *committish, const char *dataref);\n-void fast_export_begin_note(uint32_t revision, const char *author,\n-\t\tconst char *log, timestamp_t timestamp, const char *note_ref);\n-void fast_export_begin_commit(uint32_t revision, const char *author,\n-\t\t\tconst struct strbuf *log, const char *uuid,const char *url,\n-\t\t\ttimestamp_t timestamp, const char *local_ref);\n-void fast_export_end_commit(uint32_t revision);\n-void fast_export_data(uint32_t mode, off_t len, struct line_buffer *input);\n-void fast_export_buf_to_data(const struct strbuf *data);\n-void fast_export_blob_delta(uint32_t mode,\n-\t\t\tuint32_t old_mode, const char *old_data,\n-\t\t\toff_t len, struct line_buffer *input);\n-\n-/* If there is no such file at that rev, returns -1, errno == ENOENT. */\n-int fast_export_ls_rev(uint32_t rev, const char *path,\n-\t\t\tuint32_t *mode_out, struct strbuf *dataref_out);\n-int fast_export_ls(const char *path,\n-\t\t\tuint32_t *mode_out, struct strbuf *dataref_out);\n-\n-void fast_export_copy(uint32_t revision, const char *src, const char *dst);\n-const char *fast_export_read_path(const char *path, uint32_t *mode_out);\n-\n-#endif\ndiff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c\ndeleted file mode 100644\nindex e416caf8a4..0000000000\n--- a/vcs-svn/line_buffer.c\n+++ /dev/null\n@@ -1,126 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"line_buffer.h\"\n-#include \"strbuf.h\"\n-\n-#define COPY_BUFFER_LEN 4096\n-\n-int buffer_init(struct line_buffer *buf, const char *filename)\n-{\n-\tbuf->infile = filename ? fopen(filename, \"r\") : stdin;\n-\tif (!buf->infile)\n-\t\treturn -1;\n-\treturn 0;\n-}\n-\n-int buffer_fdinit(struct line_buffer *buf, int fd)\n-{\n-\tbuf->infile = fdopen(fd, \"r\");\n-\tif (!buf->infile)\n-\t\treturn -1;\n-\treturn 0;\n-}\n-\n-int buffer_tmpfile_init(struct line_buffer *buf)\n-{\n-\tbuf->infile = tmpfile();\n-\tif (!buf->infile)\n-\t\treturn -1;\n-\treturn 0;\n-}\n-\n-int buffer_deinit(struct line_buffer *buf)\n-{\n-\tint err;\n-\tif (buf->infile == stdin)\n-\t\treturn ferror(buf->infile);\n-\terr = ferror(buf->infile);\n-\terr |= fclose(buf->infile);\n-\treturn err;\n-}\n-\n-FILE *buffer_tmpfile_rewind(struct line_buffer *buf)\n-{\n-\trewind(buf->infile);\n-\treturn buf->infile;\n-}\n-\n-long buffer_tmpfile_prepare_to_read(struct line_buffer *buf)\n-{\n-\tlong pos = ftell(buf->infile);\n-\tif (pos < 0)\n-\t\treturn error_errno(\"ftell error\");\n-\tif (fseek(buf->infile, 0, SEEK_SET))\n-\t\treturn error_errno(\"seek error\");\n-\treturn pos;\n-}\n-\n-int buffer_ferror(struct line_buffer *buf)\n-{\n-\treturn ferror(buf->infile);\n-}\n-\n-int buffer_read_char(struct line_buffer *buf)\n-{\n-\treturn fgetc(buf->infile);\n-}\n-\n-/* Read a line without trailing newline. */\n-char *buffer_read_line(struct line_buffer *buf)\n-{\n-\tchar *end;\n-\tif (!fgets(buf->line_buffer, sizeof(buf->line_buffer), buf->infile))\n-\t\t/* Error or data exhausted. */\n-\t\treturn NULL;\n-\tend = buf->line_buffer + strlen(buf->line_buffer);\n-\tif (end[-1] == '\\n')\n-\t\tend[-1] = '\\0';\n-\telse if (feof(buf->infile))\n-\t\t; /* No newline at end of file.  That's fine. */\n-\telse\n-\t\t/*\n-\t\t * Line was too long.\n-\t\t * There is probably a saner way to deal with this,\n-\t\t * but for now let's return an error.\n-\t\t */\n-\t\treturn NULL;\n-\treturn buf->line_buffer;\n-}\n-\n-size_t buffer_read_binary(struct line_buffer *buf,\n-\t\t\t\tstruct strbuf *sb, size_t size)\n-{\n-\treturn strbuf_fread(sb, size, buf->infile);\n-}\n-\n-off_t buffer_copy_bytes(struct line_buffer *buf, off_t nbytes)\n-{\n-\tchar byte_buffer[COPY_BUFFER_LEN];\n-\toff_t done = 0;\n-\twhile (done < nbytes && !feof(buf->infile) && !ferror(buf->infile)) {\n-\t\toff_t len = nbytes - done;\n-\t\tsize_t in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;\n-\t\tin = fread(byte_buffer, 1, in, buf->infile);\n-\t\tdone += in;\n-\t\tfwrite(byte_buffer, 1, in, stdout);\n-\t\tif (ferror(stdout))\n-\t\t\treturn done + buffer_skip_bytes(buf, nbytes - done);\n-\t}\n-\treturn done;\n-}\n-\n-off_t buffer_skip_bytes(struct line_buffer *buf, off_t nbytes)\n-{\n-\tchar byte_buffer[COPY_BUFFER_LEN];\n-\toff_t done = 0;\n-\twhile (done < nbytes && !feof(buf->infile) && !ferror(buf->infile)) {\n-\t\toff_t len = nbytes - done;\n-\t\tsize_t in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;\n-\t\tdone += fread(byte_buffer, 1, in, buf->infile);\n-\t}\n-\treturn done;\n-}\ndiff --git a/vcs-svn/line_buffer.h b/vcs-svn/line_buffer.h\ndeleted file mode 100644\nindex ee23b4f490..0000000000\n--- a/vcs-svn/line_buffer.h\n+++ /dev/null\n@@ -1,30 +0,0 @@\n-#ifndef LINE_BUFFER_H_\n-#define LINE_BUFFER_H_\n-\n-#include \"strbuf.h\"\n-\n-#define LINE_BUFFER_LEN 10000\n-\n-struct line_buffer {\n-\tchar line_buffer[LINE_BUFFER_LEN];\n-\tFILE *infile;\n-};\n-#define LINE_BUFFER_INIT { \"\", NULL }\n-\n-int buffer_init(struct line_buffer *buf, const char *filename);\n-int buffer_fdinit(struct line_buffer *buf, int fd);\n-int buffer_deinit(struct line_buffer *buf);\n-\n-int buffer_tmpfile_init(struct line_buffer *buf);\n-FILE *buffer_tmpfile_rewind(struct line_buffer *buf);\t/* prepare to write. */\n-long buffer_tmpfile_prepare_to_read(struct line_buffer *buf);\n-\n-int buffer_ferror(struct line_buffer *buf);\n-char *buffer_read_line(struct line_buffer *buf);\n-int buffer_read_char(struct line_buffer *buf);\n-size_t buffer_read_binary(struct line_buffer *buf, struct strbuf *sb, size_t len);\n-/* Returns number of bytes read (not necessarily written). */\n-off_t buffer_copy_bytes(struct line_buffer *buf, off_t len);\n-off_t buffer_skip_bytes(struct line_buffer *buf, off_t len);\n-\n-#endif\ndiff --git a/vcs-svn/line_buffer.txt b/vcs-svn/line_buffer.txt\ndeleted file mode 100644\nindex 8e139eb22d..0000000000\n--- a/vcs-svn/line_buffer.txt\n+++ /dev/null\n@@ -1,77 +0,0 @@\n-line_buffer API\n-===============\n-\n-The line_buffer library provides a convenient interface for\n-mostly-line-oriented input.\n-\n-Each line is not permitted to exceed 10000 bytes.  The provided\n-functions are not thread-safe or async-signal-safe, and like\n-`fgets()`, they generally do not function correctly if interrupted\n-by a signal without SA_RESTART set.\n-\n-Calling sequence\n-----------------\n-\n-The calling program:\n-\n- - initializes a `struct line_buffer` to LINE_BUFFER_INIT\n- - specifies a file to read with `buffer_init`\n- - processes input with `buffer_read_line`, `buffer_skip_bytes`,\n-   and `buffer_copy_bytes`\n- - closes the file with `buffer_deinit`, perhaps to start over and\n-   read another file.\n-\n-When finished, the caller can use `buffer_reset` to deallocate\n-resources.\n-\n-Using temporary files\n----------------------\n-\n-Temporary files provide a place to store data that should not outlive\n-the calling program.  A program\n-\n- - initializes a `struct line_buffer` to LINE_BUFFER_INIT\n- - requests a temporary file with `buffer_tmpfile_init`\n- - acquires an output handle by calling `buffer_tmpfile_rewind`\n- - uses standard I/O functions like `fprintf` and `fwrite` to fill\n-   the temporary file\n- - declares writing is over with `buffer_tmpfile_prepare_to_read`\n- - can re-read what was written with `buffer_read_line`,\n-   `buffer_copy_bytes`, and so on\n- - can reuse the temporary file by calling `buffer_tmpfile_rewind`\n-   again\n- - removes the temporary file with `buffer_deinit`, perhaps to\n-   reuse the line_buffer for some other file.\n-\n-When finished, the calling program can use `buffer_reset` to deallocate\n-resources.\n-\n-Functions\n----------\n-\n-`buffer_init`, `buffer_fdinit`::\n-\tOpen the named file or file descriptor for input.\n-\tbuffer_init(buf, NULL) prepares to read from stdin.\n-\tOn failure, returns -1 (with errno indicating the nature\n-\tof the failure).\n-\n-`buffer_deinit`::\n-\tStop reading from the current file (closing it unless\n-\tit was stdin).  Returns nonzero if `fclose` fails or\n-\tthe error indicator was set.\n-\n-`buffer_read_line`::\n-\tRead a line and strip off the trailing newline.\n-\tOn failure or end of file, returns NULL.\n-\n-`buffer_copy_bytes`::\n-\tRead `len` bytes of input and dump them to the standard output\n-\tstream.  Returns early for error or end of file.\n-\n-`buffer_skip_bytes`::\n-\tDiscards `len` bytes from the input stream (stopping early\n-\tif necessary because of an error or eof).  Return value is\n-\tthe number of bytes successfully read.\n-\n-`buffer_reset`::\n-\tDeallocates non-static buffers.\ndiff --git a/vcs-svn/sliding_window.c b/vcs-svn/sliding_window.c\ndeleted file mode 100644\nindex 06d273c9e8..0000000000\n--- a/vcs-svn/sliding_window.c\n+++ /dev/null\n@@ -1,79 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"sliding_window.h\"\n-#include \"line_buffer.h\"\n-#include \"strbuf.h\"\n-\n-static int input_error(struct line_buffer *file)\n-{\n-\tif (!buffer_ferror(file))\n-\t\treturn error(\"delta preimage ends early\");\n-\treturn error_errno(\"cannot read delta preimage\");\n-}\n-\n-static int skip_or_whine(struct line_buffer *file, off_t gap)\n-{\n-\tif (buffer_skip_bytes(file, gap) != gap)\n-\t\treturn input_error(file);\n-\treturn 0;\n-}\n-\n-static int read_to_fill_or_whine(struct line_buffer *file,\n-\t\t\t\tstruct strbuf *buf, size_t width)\n-{\n-\tbuffer_read_binary(file, buf, width - buf->len);\n-\tif (buf->len != width)\n-\t\treturn input_error(file);\n-\treturn 0;\n-}\n-\n-static int check_offset_overflow(off_t offset, uintmax_t len)\n-{\n-\tif (len > maximum_signed_value_of_type(off_t))\n-\t\treturn error(\"unrepresentable length in delta: \"\n-\t\t\t\t\"%\"PRIuMAX\" > OFF_MAX\", len);\n-\tif (signed_add_overflows(offset, (off_t) len))\n-\t\treturn error(\"unrepresentable offset in delta: \"\n-\t\t\t\t\"%\"PRIuMAX\" + %\"PRIuMAX\" > OFF_MAX\",\n-\t\t\t\t(uintmax_t) offset, len);\n-\treturn 0;\n-}\n-\n-int move_window(struct sliding_view *view, off_t off, size_t width)\n-{\n-\toff_t file_offset;\n-\tassert(view);\n-\tassert(view->width <= view->buf.len);\n-\tassert(!check_offset_overflow(view->off, view->buf.len));\n-\n-\tif (check_offset_overflow(off, width))\n-\t\treturn -1;\n-\tif (off < view->off || off + width < view->off + view->width)\n-\t\treturn error(\"invalid delta: window slides left\");\n-\tif (view->max_off >= 0 && view->max_off < off + (off_t) width)\n-\t\treturn error(\"delta preimage ends early\");\n-\n-\tfile_offset = view->off + view->buf.len;\n-\tif (off < file_offset) {\n-\t\t/* Move the overlapping region into place. */\n-\t\tstrbuf_remove(&view->buf, 0, off - view->off);\n-\t} else {\n-\t\t/* Seek ahead to skip the gap. */\n-\t\tif (skip_or_whine(view->file, off - file_offset))\n-\t\t\treturn -1;\n-\t\tstrbuf_setlen(&view->buf, 0);\n-\t}\n-\n-\tif (view->buf.len > width)\n-\t\t; /* Already read. */\n-\telse if (read_to_fill_or_whine(view->file, &view->buf, width))\n-\t\treturn -1;\n-\n-\tview->off = off;\n-\tview->width = width;\n-\treturn 0;\n-}\ndiff --git a/vcs-svn/sliding_window.h b/vcs-svn/sliding_window.h\ndeleted file mode 100644\nindex b43a825cba..0000000000\n--- a/vcs-svn/sliding_window.h\n+++ /dev/null\n@@ -1,18 +0,0 @@\n-#ifndef SLIDING_WINDOW_H_\n-#define SLIDING_WINDOW_H_\n-\n-#include \"strbuf.h\"\n-\n-struct sliding_view {\n-\tstruct line_buffer *file;\n-\toff_t off;\n-\tsize_t width;\n-\toff_t max_off;\t/* -1 means unlimited */\n-\tstruct strbuf buf;\n-};\n-\n-#define SLIDING_VIEW_INIT(input, len)\t{ (input), 0, 0, (len), STRBUF_INIT }\n-\n-extern int move_window(struct sliding_view *view, off_t off, size_t width);\n-\n-#endif\ndiff --git a/vcs-svn/svndiff.c b/vcs-svn/svndiff.c\ndeleted file mode 100644\nindex 75c753162a..0000000000\n--- a/vcs-svn/svndiff.c\n+++ /dev/null\n@@ -1,309 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"sliding_window.h\"\n-#include \"line_buffer.h\"\n-#include \"svndiff.h\"\n-\n-/*\n- * svndiff0 applier\n- *\n- * See http://svn.apache.org/repos/asf/subversion/trunk/notes/svndiff.\n- *\n- * svndiff0 ::= 'SVN\\0' window*\n- * window ::= int int int int int instructions inline_data;\n- * instructions ::= instruction*;\n- * instruction ::= view_selector int int\n- *   | copyfrom_data int\n- *   | packed_view_selector int\n- *   | packed_copyfrom_data\n- *   ;\n- * view_selector ::= copyfrom_source\n- *   | copyfrom_target\n- *   ;\n- * copyfrom_source ::= # binary 00 000000;\n- * copyfrom_target ::= # binary 01 000000;\n- * copyfrom_data ::= # binary 10 000000;\n- * packed_view_selector ::= # view_selector OR-ed with 6 bit value;\n- * packed_copyfrom_data ::= # copyfrom_data OR-ed with 6 bit value;\n- * int ::= highdigit* lowdigit;\n- * highdigit ::= # binary 1000 0000 OR-ed with 7 bit value;\n- * lowdigit ::= # 7 bit value;\n- */\n-\n-#define INSN_MASK\t0xc0\n-#define INSN_COPYFROM_SOURCE\t0x00\n-#define INSN_COPYFROM_TARGET\t0x40\n-#define INSN_COPYFROM_DATA\t0x80\n-#define OPERAND_MASK\t0x3f\n-\n-#define VLI_CONTINUE\t0x80\n-#define VLI_DIGIT_MASK\t0x7f\n-#define VLI_BITS_PER_DIGIT 7\n-\n-struct window {\n-\tstruct sliding_view *in;\n-\tstruct strbuf out;\n-\tstruct strbuf instructions;\n-\tstruct strbuf data;\n-};\n-\n-#define WINDOW_INIT(w)\t{ (w), STRBUF_INIT, STRBUF_INIT, STRBUF_INIT }\n-\n-static void window_release(struct window *ctx)\n-{\n-\tstrbuf_release(&ctx->out);\n-\tstrbuf_release(&ctx->instructions);\n-\tstrbuf_release(&ctx->data);\n-}\n-\n-static int write_strbuf(struct strbuf *sb, FILE *out)\n-{\n-\tif (fwrite(sb->buf, 1, sb->len, out) == sb->len)\t/* Success. */\n-\t\treturn 0;\n-\treturn error_errno(\"cannot write delta postimage\");\n-}\n-\n-static int error_short_read(struct line_buffer *input)\n-{\n-\tif (buffer_ferror(input))\n-\t\treturn error_errno(\"error reading delta\");\n-\treturn error(\"invalid delta: unexpected end of file\");\n-}\n-\n-static int read_chunk(struct line_buffer *delta, off_t *delta_len,\n-\t\t      struct strbuf *buf, size_t len)\n-{\n-\tassert(*delta_len >= 0);\n-\tstrbuf_reset(buf);\n-\tif (len > (uintmax_t) *delta_len ||\n-\t    buffer_read_binary(delta, buf, len) != len)\n-\t\treturn error_short_read(delta);\n-\t*delta_len -= buf->len;\n-\treturn 0;\n-}\n-\n-static int read_magic(struct line_buffer *in, off_t *len)\n-{\n-\tstatic const char magic[] = {'S', 'V', 'N', '\\0'};\n-\tstruct strbuf sb = STRBUF_INIT;\n-\n-\tif (read_chunk(in, len, &sb, sizeof(magic))) {\n-\t\tstrbuf_release(&sb);\n-\t\treturn -1;\n-\t}\n-\tif (memcmp(sb.buf, magic, sizeof(magic))) {\n-\t\tstrbuf_release(&sb);\n-\t\treturn error(\"invalid delta: unrecognized file type\");\n-\t}\n-\tstrbuf_release(&sb);\n-\treturn 0;\n-}\n-\n-static int read_int(struct line_buffer *in, uintmax_t *result, off_t *len)\n-{\n-\tuintmax_t rv = 0;\n-\toff_t sz;\n-\tfor (sz = *len; sz; sz--) {\n-\t\tconst int ch = buffer_read_char(in);\n-\t\tif (ch == EOF)\n-\t\t\tbreak;\n-\n-\t\trv <<= VLI_BITS_PER_DIGIT;\n-\t\trv += (ch & VLI_DIGIT_MASK);\n-\t\tif (ch & VLI_CONTINUE)\n-\t\t\tcontinue;\n-\n-\t\t*result = rv;\n-\t\t*len = sz - 1;\n-\t\treturn 0;\n-\t}\n-\treturn error_short_read(in);\n-}\n-\n-static int parse_int(const char **buf, size_t *result, const char *end)\n-{\n-\tsize_t rv = 0;\n-\tconst char *pos;\n-\tfor (pos = *buf; pos != end; pos++) {\n-\t\tunsigned char ch = *pos;\n-\n-\t\trv <<= VLI_BITS_PER_DIGIT;\n-\t\trv += (ch & VLI_DIGIT_MASK);\n-\t\tif (ch & VLI_CONTINUE)\n-\t\t\tcontinue;\n-\n-\t\t*result = rv;\n-\t\t*buf = pos + 1;\n-\t\treturn 0;\n-\t}\n-\treturn error(\"invalid delta: unexpected end of instructions section\");\n-}\n-\n-static int read_offset(struct line_buffer *in, off_t *result, off_t *len)\n-{\n-\tuintmax_t val;\n-\tif (read_int(in, &val, len))\n-\t\treturn -1;\n-\tif (val > maximum_signed_value_of_type(off_t))\n-\t\treturn error(\"unrepresentable offset in delta: %\"PRIuMAX\"\", val);\n-\t*result = val;\n-\treturn 0;\n-}\n-\n-static int read_length(struct line_buffer *in, size_t *result, off_t *len)\n-{\n-\tuintmax_t val;\n-\tif (read_int(in, &val, len))\n-\t\treturn -1;\n-\tif (val > SIZE_MAX)\n-\t\treturn error(\"unrepresentable length in delta: %\"PRIuMAX\"\", val);\n-\t*result = val;\n-\treturn 0;\n-}\n-\n-static int copyfrom_source(struct window *ctx, const char **instructions,\n-\t\t\t   size_t nbytes, const char *insns_end)\n-{\n-\tsize_t offset;\n-\tif (parse_int(instructions, &offset, insns_end))\n-\t\treturn -1;\n-\tif (unsigned_add_overflows(offset, nbytes) ||\n-\t    offset + nbytes > ctx->in->width)\n-\t\treturn error(\"invalid delta: copies source data outside view\");\n-\tstrbuf_add(&ctx->out, ctx->in->buf.buf + offset, nbytes);\n-\treturn 0;\n-}\n-\n-static int copyfrom_target(struct window *ctx, const char **instructions,\n-\t\t\t   size_t nbytes, const char *instructions_end)\n-{\n-\tsize_t offset;\n-\tif (parse_int(instructions, &offset, instructions_end))\n-\t\treturn -1;\n-\tif (offset >= ctx->out.len)\n-\t\treturn error(\"invalid delta: copies from the future\");\n-\tfor (; nbytes > 0; nbytes--)\n-\t\tstrbuf_addch(&ctx->out, ctx->out.buf[offset++]);\n-\treturn 0;\n-}\n-\n-static int copyfrom_data(struct window *ctx, size_t *data_pos, size_t nbytes)\n-{\n-\tconst size_t pos = *data_pos;\n-\tif (unsigned_add_overflows(pos, nbytes) ||\n-\t    pos + nbytes > ctx->data.len)\n-\t\treturn error(\"invalid delta: copies unavailable inline data\");\n-\tstrbuf_add(&ctx->out, ctx->data.buf + pos, nbytes);\n-\t*data_pos += nbytes;\n-\treturn 0;\n-}\n-\n-static int parse_first_operand(const char **buf, size_t *out, const char *end)\n-{\n-\tsize_t result = (unsigned char) *(*buf)++ & OPERAND_MASK;\n-\tif (result) {\t/* immediate operand */\n-\t\t*out = result;\n-\t\treturn 0;\n-\t}\n-\treturn parse_int(buf, out, end);\n-}\n-\n-static int execute_one_instruction(struct window *ctx,\n-\t\t\t\tconst char **instructions, size_t *data_pos)\n-{\n-\tunsigned int instruction;\n-\tconst char *insns_end = ctx->instructions.buf + ctx->instructions.len;\n-\tsize_t nbytes;\n-\tassert(ctx);\n-\tassert(instructions && *instructions);\n-\tassert(data_pos);\n-\n-\tinstruction = (unsigned char) **instructions;\n-\tif (parse_first_operand(instructions, &nbytes, insns_end))\n-\t\treturn -1;\n-\tswitch (instruction & INSN_MASK) {\n-\tcase INSN_COPYFROM_SOURCE:\n-\t\treturn copyfrom_source(ctx, instructions, nbytes, insns_end);\n-\tcase INSN_COPYFROM_TARGET:\n-\t\treturn copyfrom_target(ctx, instructions, nbytes, insns_end);\n-\tcase INSN_COPYFROM_DATA:\n-\t\treturn copyfrom_data(ctx, data_pos, nbytes);\n-\tdefault:\n-\t\treturn error(\"invalid delta: unrecognized instruction\");\n-\t}\n-}\n-\n-static int apply_window_in_core(struct window *ctx)\n-{\n-\tconst char *instructions;\n-\tsize_t data_pos = 0;\n-\n-\t/*\n-\t * Fill ctx->out.buf using data from the source, target,\n-\t * and inline data views.\n-\t */\n-\tfor (instructions = ctx->instructions.buf;\n-\t     instructions != ctx->instructions.buf + ctx->instructions.len;\n-\t     )\n-\t\tif (execute_one_instruction(ctx, &instructions, &data_pos))\n-\t\t\treturn -1;\n-\tif (data_pos != ctx->data.len)\n-\t\treturn error(\"invalid delta: does not copy all inline data\");\n-\treturn 0;\n-}\n-\n-static int apply_one_window(struct line_buffer *delta, off_t *delta_len,\n-\t\t\t    struct sliding_view *preimage, FILE *out)\n-{\n-\tint rv = -1;\n-\tstruct window ctx = WINDOW_INIT(preimage);\n-\tsize_t out_len;\n-\tsize_t instructions_len;\n-\tsize_t data_len;\n-\tassert(delta_len);\n-\n-\t/* \"source view\" offset and length already handled; */\n-\tif (read_length(delta, &out_len, delta_len) ||\n-\t    read_length(delta, &instructions_len, delta_len) ||\n-\t    read_length(delta, &data_len, delta_len) ||\n-\t    read_chunk(delta, delta_len, &ctx.instructions, instructions_len) ||\n-\t    read_chunk(delta, delta_len, &ctx.data, data_len))\n-\t\tgoto error_out;\n-\tstrbuf_grow(&ctx.out, out_len);\n-\tif (apply_window_in_core(&ctx))\n-\t\tgoto error_out;\n-\tif (ctx.out.len != out_len) {\n-\t\trv = error(\"invalid delta: incorrect postimage length\");\n-\t\tgoto error_out;\n-\t}\n-\tif (write_strbuf(&ctx.out, out))\n-\t\tgoto error_out;\n-\trv = 0;\n-error_out:\n-\twindow_release(&ctx);\n-\treturn rv;\n-}\n-\n-int svndiff0_apply(struct line_buffer *delta, off_t delta_len,\n-\t\t\tstruct sliding_view *preimage, FILE *postimage)\n-{\n-\tassert(delta && preimage && postimage && delta_len >= 0);\n-\n-\tif (read_magic(delta, &delta_len))\n-\t\treturn -1;\n-\twhile (delta_len) {\t/* For each window: */\n-\t\toff_t pre_off = -1;\n-\t\tsize_t pre_len;\n-\n-\t\tif (read_offset(delta, &pre_off, &delta_len) ||\n-\t\t    read_length(delta, &pre_len, &delta_len) ||\n-\t\t    move_window(preimage, pre_off, pre_len) ||\n-\t\t    apply_one_window(delta, &delta_len, preimage, postimage))\n-\t\t\treturn -1;\n-\t}\n-\treturn 0;\n-}\ndiff --git a/vcs-svn/svndiff.h b/vcs-svn/svndiff.h\ndeleted file mode 100644\nindex 74eb464bab..0000000000\n--- a/vcs-svn/svndiff.h\n+++ /dev/null\n@@ -1,10 +0,0 @@\n-#ifndef SVNDIFF_H_\n-#define SVNDIFF_H_\n-\n-struct line_buffer;\n-struct sliding_view;\n-\n-extern int svndiff0_apply(struct line_buffer *delta, off_t delta_len,\n-\t\tstruct sliding_view *preimage, FILE *postimage);\n-\n-#endif\ndiff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c\ndeleted file mode 100644\nindex 08d136b8cc..0000000000\n--- a/vcs-svn/svndump.c\n+++ /dev/null\n@@ -1,540 +0,0 @@\n-/*\n- * Parse and rearrange a svnadmin dump.\n- * Create the dump with:\n- * svnadmin dump --incremental -r<startrev>:<endrev> <repository> >outfile\n- *\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"cache.h\"\n-#include \"fast_export.h\"\n-#include \"line_buffer.h\"\n-#include \"strbuf.h\"\n-#include \"svndump.h\"\n-\n-/*\n- * Compare start of string to literal of equal length;\n- * must be guarded by length test.\n- */\n-#define constcmp(s, ref) memcmp(s, ref, sizeof(ref) - 1)\n-\n-#define REPORT_FILENO 3\n-\n-#define NODEACT_REPLACE 4\n-#define NODEACT_DELETE 3\n-#define NODEACT_ADD 2\n-#define NODEACT_CHANGE 1\n-#define NODEACT_UNKNOWN 0\n-\n-/* States: */\n-#define DUMP_CTX 0\t/* dump metadata */\n-#define REV_CTX  1\t/* revision metadata */\n-#define NODE_CTX 2\t/* node metadata */\n-#define INTERNODE_CTX 3\t/* between nodes */\n-\n-#define DATE_RFC2822_LEN 31\n-\n-static struct line_buffer input = LINE_BUFFER_INIT;\n-\n-static struct {\n-\tuint32_t action, srcRev, type;\n-\toff_t prop_length, text_length;\n-\tstruct strbuf src, dst;\n-\tuint32_t text_delta, prop_delta;\n-} node_ctx;\n-\n-static struct {\n-\tuint32_t revision;\n-\ttimestamp_t timestamp;\n-\tstruct strbuf log, author, note;\n-} rev_ctx;\n-\n-static struct {\n-\tuint32_t version;\n-\tstruct strbuf uuid, url;\n-} dump_ctx;\n-\n-static void reset_node_ctx(char *fname)\n-{\n-\tnode_ctx.type = 0;\n-\tnode_ctx.action = NODEACT_UNKNOWN;\n-\tnode_ctx.prop_length = -1;\n-\tnode_ctx.text_length = -1;\n-\tstrbuf_reset(&node_ctx.src);\n-\tnode_ctx.srcRev = 0;\n-\tstrbuf_reset(&node_ctx.dst);\n-\tif (fname)\n-\t\tstrbuf_addstr(&node_ctx.dst, fname);\n-\tnode_ctx.text_delta = 0;\n-\tnode_ctx.prop_delta = 0;\n-}\n-\n-static void reset_rev_ctx(uint32_t revision)\n-{\n-\trev_ctx.revision = revision;\n-\trev_ctx.timestamp = 0;\n-\tstrbuf_reset(&rev_ctx.log);\n-\tstrbuf_reset(&rev_ctx.author);\n-\tstrbuf_reset(&rev_ctx.note);\n-}\n-\n-static void reset_dump_ctx(const char *url)\n-{\n-\tstrbuf_reset(&dump_ctx.url);\n-\tif (url)\n-\t\tstrbuf_addstr(&dump_ctx.url, url);\n-\tdump_ctx.version = 1;\n-\tstrbuf_reset(&dump_ctx.uuid);\n-}\n-\n-static void handle_property(const struct strbuf *key_buf,\n-\t\t\t\tstruct strbuf *val,\n-\t\t\t\tuint32_t *type_set)\n-{\n-\tconst char *key = key_buf->buf;\n-\tsize_t keylen = key_buf->len;\n-\n-\tswitch (keylen + 1) {\n-\tcase sizeof(\"svn:log\"):\n-\t\tif (constcmp(key, \"svn:log\"))\n-\t\t\tbreak;\n-\t\tif (!val)\n-\t\t\tdie(\"invalid dump: unsets svn:log\");\n-\t\tstrbuf_swap(&rev_ctx.log, val);\n-\t\tbreak;\n-\tcase sizeof(\"svn:author\"):\n-\t\tif (constcmp(key, \"svn:author\"))\n-\t\t\tbreak;\n-\t\tif (!val)\n-\t\t\tstrbuf_reset(&rev_ctx.author);\n-\t\telse\n-\t\t\tstrbuf_swap(&rev_ctx.author, val);\n-\t\tbreak;\n-\tcase sizeof(\"svn:date\"):\n-\t\tif (constcmp(key, \"svn:date\"))\n-\t\t\tbreak;\n-\t\tif (!val)\n-\t\t\tdie(\"invalid dump: unsets svn:date\");\n-\t\tif (parse_date_basic(val->buf, &rev_ctx.timestamp, NULL))\n-\t\t\twarning(\"invalid timestamp: %s\", val->buf);\n-\t\tbreak;\n-\tcase sizeof(\"svn:executable\"):\n-\tcase sizeof(\"svn:special\"):\n-\t\tif (keylen == strlen(\"svn:executable\") &&\n-\t\t    constcmp(key, \"svn:executable\"))\n-\t\t\tbreak;\n-\t\tif (keylen == strlen(\"svn:special\") &&\n-\t\t    constcmp(key, \"svn:special\"))\n-\t\t\tbreak;\n-\t\tif (*type_set) {\n-\t\t\tif (!val)\n-\t\t\t\treturn;\n-\t\t\tdie(\"invalid dump: sets type twice\");\n-\t\t}\n-\t\tif (!val) {\n-\t\t\tnode_ctx.type = S_IFREG | 0644;\n-\t\t\treturn;\n-\t\t}\n-\t\t*type_set = 1;\n-\t\tnode_ctx.type = keylen == strlen(\"svn:executable\") ?\n-\t\t\t\t(S_IFREG | 0755) :\n-\t\t\t\tS_IFLNK;\n-\t}\n-}\n-\n-static void die_short_read(void)\n-{\n-\tif (buffer_ferror(&input))\n-\t\tdie_errno(\"error reading dump file\");\n-\tdie(\"invalid dump: unexpected end of file\");\n-}\n-\n-static void read_props(void)\n-{\n-\tstatic struct strbuf key = STRBUF_INIT;\n-\tstatic struct strbuf val = STRBUF_INIT;\n-\tconst char *t;\n-\t/*\n-\t * NEEDSWORK: to support simple mode changes like\n-\t *\tK 11\n-\t *\tsvn:special\n-\t *\tV 1\n-\t *\t*\n-\t *\tD 14\n-\t *\tsvn:executable\n-\t * we keep track of whether a mode has been set and reset to\n-\t * plain file only if not.  We should be keeping track of the\n-\t * symlink and executable bits separately instead.\n-\t */\n-\tuint32_t type_set = 0;\n-\twhile ((t = buffer_read_line(&input)) && strcmp(t, \"PROPS-END\")) {\n-\t\tuint32_t len;\n-\t\tconst char type = t[0];\n-\t\tint ch;\n-\n-\t\tif (!type || t[1] != ' ')\n-\t\t\tdie(\"invalid property line: %s\", t);\n-\t\tlen = atoi(&t[2]);\n-\t\tstrbuf_reset(&val);\n-\t\tbuffer_read_binary(&input, &val, len);\n-\t\tif (val.len < len)\n-\t\t\tdie_short_read();\n-\n-\t\t/* Discard trailing newline. */\n-\t\tch = buffer_read_char(&input);\n-\t\tif (ch == EOF)\n-\t\t\tdie_short_read();\n-\t\tif (ch != '\\n')\n-\t\t\tdie(\"invalid dump: expected newline after %s\", val.buf);\n-\n-\t\tswitch (type) {\n-\t\tcase 'K':\n-\t\t\tstrbuf_swap(&key, &val);\n-\t\t\tcontinue;\n-\t\tcase 'D':\n-\t\t\thandle_property(&val, NULL, &type_set);\n-\t\t\tcontinue;\n-\t\tcase 'V':\n-\t\t\thandle_property(&key, &val, &type_set);\n-\t\t\tstrbuf_reset(&key);\n-\t\t\tcontinue;\n-\t\tdefault:\n-\t\t\tdie(\"invalid property line: %s\", t);\n-\t\t}\n-\t}\n-}\n-\n-static void handle_node(void)\n-{\n-\tconst uint32_t type = node_ctx.type;\n-\tconst int have_props = node_ctx.prop_length != -1;\n-\tconst int have_text = node_ctx.text_length != -1;\n-\t/*\n-\t * Old text for this node:\n-\t *  NULL\t- directory or bug\n-\t *  empty_blob\t- empty\n-\t *  \"<dataref>\"\t- data retrievable from fast-import\n-\t */\n-\tstatic const char *const empty_blob = \"::empty::\";\n-\tconst char *old_data = NULL;\n-\tuint32_t old_mode = S_IFREG | 0644;\n-\n-\tif (node_ctx.action == NODEACT_DELETE) {\n-\t\tif (have_text || have_props || node_ctx.srcRev)\n-\t\t\tdie(\"invalid dump: deletion node has \"\n-\t\t\t\t\"copyfrom info, text, or properties\");\n-\t\tfast_export_delete(node_ctx.dst.buf);\n-\t\treturn;\n-\t}\n-\tif (node_ctx.action == NODEACT_REPLACE) {\n-\t\tfast_export_delete(node_ctx.dst.buf);\n-\t\tnode_ctx.action = NODEACT_ADD;\n-\t}\n-\tif (node_ctx.srcRev) {\n-\t\tfast_export_copy(node_ctx.srcRev, node_ctx.src.buf, node_ctx.dst.buf);\n-\t\tif (node_ctx.action == NODEACT_ADD)\n-\t\t\tnode_ctx.action = NODEACT_CHANGE;\n-\t}\n-\tif (have_text && type == S_IFDIR)\n-\t\tdie(\"invalid dump: directories cannot have text attached\");\n-\n-\t/*\n-\t * Find old content (old_data) and decide on the new mode.\n-\t */\n-\tif (node_ctx.action == NODEACT_CHANGE && !*node_ctx.dst.buf) {\n-\t\tif (type != S_IFDIR)\n-\t\t\tdie(\"invalid dump: root of tree is not a regular file\");\n-\t\told_data = NULL;\n-\t} else if (node_ctx.action == NODEACT_CHANGE) {\n-\t\tuint32_t mode;\n-\t\told_data = fast_export_read_path(node_ctx.dst.buf, &mode);\n-\t\tif (mode == S_IFDIR && type != S_IFDIR)\n-\t\t\tdie(\"invalid dump: cannot modify a directory into a file\");\n-\t\tif (mode != S_IFDIR && type == S_IFDIR)\n-\t\t\tdie(\"invalid dump: cannot modify a file into a directory\");\n-\t\tnode_ctx.type = mode;\n-\t\told_mode = mode;\n-\t} else if (node_ctx.action == NODEACT_ADD) {\n-\t\tif (type == S_IFDIR)\n-\t\t\told_data = NULL;\n-\t\telse if (have_text)\n-\t\t\told_data = empty_blob;\n-\t\telse\n-\t\t\tdie(\"invalid dump: adds node without text\");\n-\t} else {\n-\t\tdie(\"invalid dump: Node-path block lacks Node-action\");\n-\t}\n-\n-\t/*\n-\t * Adjust mode to reflect properties.\n-\t */\n-\tif (have_props) {\n-\t\tif (!node_ctx.prop_delta)\n-\t\t\tnode_ctx.type = type;\n-\t\tif (node_ctx.prop_length)\n-\t\t\tread_props();\n-\t}\n-\n-\t/*\n-\t * Save the result.\n-\t */\n-\tif (type == S_IFDIR)\t/* directories are not tracked. */\n-\t\treturn;\n-\tassert(old_data);\n-\tif (old_data == empty_blob)\n-\t\t/* For the fast_export_* functions, NULL means empty. */\n-\t\told_data = NULL;\n-\tif (!have_text) {\n-\t\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, old_data);\n-\t\treturn;\n-\t}\n-\tif (!node_ctx.text_delta) {\n-\t\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, \"inline\");\n-\t\tfast_export_data(node_ctx.type, node_ctx.text_length, &input);\n-\t\treturn;\n-\t}\n-\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, \"inline\");\n-\tfast_export_blob_delta(node_ctx.type, old_mode, old_data,\n-\t\t\t\tnode_ctx.text_length, &input);\n-}\n-\n-static void begin_revision(const char *remote_ref)\n-{\n-\tif (!rev_ctx.revision)\t/* revision 0 gets no git commit. */\n-\t\treturn;\n-\tfast_export_begin_commit(rev_ctx.revision, rev_ctx.author.buf,\n-\t\t&rev_ctx.log, dump_ctx.uuid.buf, dump_ctx.url.buf,\n-\t\trev_ctx.timestamp, remote_ref);\n-}\n-\n-static void end_revision(const char *note_ref)\n-{\n-\tstruct strbuf mark = STRBUF_INIT;\n-\tif (rev_ctx.revision) {\n-\t\tfast_export_end_commit(rev_ctx.revision);\n-\t\tfast_export_begin_note(rev_ctx.revision, \"remote-svn\",\n-\t\t\t\t\"Note created by remote-svn.\", rev_ctx.timestamp, note_ref);\n-\t\tstrbuf_addf(&mark, \":%\"PRIu32, rev_ctx.revision);\n-\t\tfast_export_note(mark.buf, \"inline\");\n-\t\tfast_export_buf_to_data(&rev_ctx.note);\n-\t\tstrbuf_release(&mark);\n-\t}\n-}\n-\n-void svndump_read(const char *url, const char *local_ref, const char *notes_ref)\n-{\n-\tchar *val;\n-\tchar *t;\n-\tuint32_t active_ctx = DUMP_CTX;\n-\tuint32_t len;\n-\n-\treset_dump_ctx(url);\n-\twhile ((t = buffer_read_line(&input))) {\n-\t\tval = strchr(t, ':');\n-\t\tif (!val)\n-\t\t\tcontinue;\n-\t\tval++;\n-\t\tif (*val != ' ')\n-\t\t\tcontinue;\n-\t\tval++;\n-\n-\t\t/* strlen(key) + 1 */\n-\t\tswitch (val - t - 1) {\n-\t\tcase sizeof(\"SVN-fs-dump-format-version\"):\n-\t\t\tif (constcmp(t, \"SVN-fs-dump-format-version\"))\n-\t\t\t\tcontinue;\n-\t\t\tdump_ctx.version = atoi(val);\n-\t\t\tif (dump_ctx.version > 3)\n-\t\t\t\tdie(\"expected svn dump format version <= 3, found %\"PRIu32,\n-\t\t\t\t    dump_ctx.version);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"UUID\"):\n-\t\t\tif (constcmp(t, \"UUID\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_reset(&dump_ctx.uuid);\n-\t\t\tstrbuf_addstr(&dump_ctx.uuid, val);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Revision-number\"):\n-\t\t\tif (constcmp(t, \"Revision-number\"))\n-\t\t\t\tcontinue;\n-\t\t\tif (active_ctx == NODE_CTX)\n-\t\t\t\thandle_node();\n-\t\t\tif (active_ctx == REV_CTX)\n-\t\t\t\tbegin_revision(local_ref);\n-\t\t\tif (active_ctx != DUMP_CTX)\n-\t\t\t\tend_revision(notes_ref);\n-\t\t\tactive_ctx = REV_CTX;\n-\t\t\treset_rev_ctx(atoi(val));\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-path\"):\n-\t\t\tif (constcmp(t, \"Node-\"))\n-\t\t\t\tcontinue;\n-\t\t\tif (!constcmp(t + strlen(\"Node-\"), \"path\")) {\n-\t\t\t\tif (active_ctx == NODE_CTX)\n-\t\t\t\t\thandle_node();\n-\t\t\t\tif (active_ctx == REV_CTX)\n-\t\t\t\t\tbegin_revision(local_ref);\n-\t\t\t\tactive_ctx = NODE_CTX;\n-\t\t\t\treset_node_ctx(val);\n-\t\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\tif (constcmp(t + strlen(\"Node-\"), \"kind\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tif (!strcmp(val, \"dir\"))\n-\t\t\t\tnode_ctx.type = S_IFDIR;\n-\t\t\telse if (!strcmp(val, \"file\"))\n-\t\t\t\tnode_ctx.type = S_IFREG | 0644;\n-\t\t\telse\n-\t\t\t\tfprintf(stderr, \"Unknown node-kind: %s\\n\", val);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-action\"):\n-\t\t\tif (constcmp(t, \"Node-action\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tif (!strcmp(val, \"delete\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_DELETE;\n-\t\t\t} else if (!strcmp(val, \"add\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_ADD;\n-\t\t\t} else if (!strcmp(val, \"change\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_CHANGE;\n-\t\t\t} else if (!strcmp(val, \"replace\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_REPLACE;\n-\t\t\t} else {\n-\t\t\t\tfprintf(stderr, \"Unknown node-action: %s\\n\", val);\n-\t\t\t\tnode_ctx.action = NODEACT_UNKNOWN;\n-\t\t\t}\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-copyfrom-path\"):\n-\t\t\tif (constcmp(t, \"Node-copyfrom-path\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_reset(&node_ctx.src);\n-\t\t\tstrbuf_addstr(&node_ctx.src, val);\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-copyfrom-rev\"):\n-\t\t\tif (constcmp(t, \"Node-copyfrom-rev\"))\n-\t\t\t\tcontinue;\n-\t\t\tnode_ctx.srcRev = atoi(val);\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Text-content-length\"):\n-\t\t\tif (constcmp(t, \"Text\") && constcmp(t, \"Prop\"))\n-\t\t\t\tcontinue;\n-\t\t\tif (constcmp(t + 4, \"-content-length\"))\n-\t\t\t\tcontinue;\n-\t\t\t{\n-\t\t\t\tchar *end;\n-\t\t\t\tuintmax_t len;\n-\n-\t\t\t\tlen = strtoumax(val, &end, 10);\n-\t\t\t\tif (!isdigit(*val) || *end)\n-\t\t\t\t\tdie(\"invalid dump: non-numeric length %s\", val);\n-\t\t\t\tif (len > maximum_signed_value_of_type(off_t))\n-\t\t\t\t\tdie(\"unrepresentable length in dump: %s\", val);\n-\n-\t\t\t\tif (*t == 'T')\n-\t\t\t\t\tnode_ctx.text_length = (off_t) len;\n-\t\t\t\telse\n-\t\t\t\t\tnode_ctx.prop_length = (off_t) len;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\tcase sizeof(\"Text-delta\"):\n-\t\t\tif (!constcmp(t, \"Text-delta\")) {\n-\t\t\t\tnode_ctx.text_delta = !strcmp(val, \"true\");\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\tif (constcmp(t, \"Prop-delta\"))\n-\t\t\t\tcontinue;\n-\t\t\tnode_ctx.prop_delta = !strcmp(val, \"true\");\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Content-length\"):\n-\t\t\tif (constcmp(t, \"Content-length\"))\n-\t\t\t\tcontinue;\n-\t\t\tlen = atoi(val);\n-\t\t\tt = buffer_read_line(&input);\n-\t\t\tif (!t)\n-\t\t\t\tdie_short_read();\n-\t\t\tif (*t)\n-\t\t\t\tdie(\"invalid dump: expected blank line after content length header\");\n-\t\t\tif (active_ctx == REV_CTX) {\n-\t\t\t\tread_props();\n-\t\t\t} else if (active_ctx == NODE_CTX) {\n-\t\t\t\thandle_node();\n-\t\t\t\tactive_ctx = INTERNODE_CTX;\n-\t\t\t} else {\n-\t\t\t\tfprintf(stderr, \"Unexpected content length header: %\"PRIu32\"\\n\", len);\n-\t\t\t\tif (buffer_skip_bytes(&input, len) != len)\n-\t\t\t\t\tdie_short_read();\n-\t\t\t}\n-\t\t}\n-\t}\n-\tif (buffer_ferror(&input))\n-\t\tdie_short_read();\n-\tif (active_ctx == NODE_CTX)\n-\t\thandle_node();\n-\tif (active_ctx == REV_CTX)\n-\t\tbegin_revision(local_ref);\n-\tif (active_ctx != DUMP_CTX)\n-\t\tend_revision(notes_ref);\n-}\n-\n-static void init(int report_fd)\n-{\n-\tfast_export_init(report_fd);\n-\tstrbuf_init(&dump_ctx.uuid, 4096);\n-\tstrbuf_init(&dump_ctx.url, 4096);\n-\tstrbuf_init(&rev_ctx.log, 4096);\n-\tstrbuf_init(&rev_ctx.author, 4096);\n-\tstrbuf_init(&rev_ctx.note, 4096);\n-\tstrbuf_init(&node_ctx.src, 4096);\n-\tstrbuf_init(&node_ctx.dst, 4096);\n-\treset_dump_ctx(NULL);\n-\treset_rev_ctx(0);\n-\treset_node_ctx(NULL);\n-\treturn;\n-}\n-\n-int svndump_init(const char *filename)\n-{\n-\tif (buffer_init(&input, filename))\n-\t\treturn error_errno(\"cannot open %s\", filename ? filename : \"NULL\");\n-\tinit(REPORT_FILENO);\n-\treturn 0;\n-}\n-\n-int svndump_init_fd(int in_fd, int back_fd)\n-{\n-\tif(buffer_fdinit(&input, xdup(in_fd)))\n-\t\treturn error_errno(\"cannot open fd %d\", in_fd);\n-\tinit(xdup(back_fd));\n-\treturn 0;\n-}\n-\n-void svndump_deinit(void)\n-{\n-\tfast_export_deinit();\n-\treset_dump_ctx(NULL);\n-\treset_rev_ctx(0);\n-\treset_node_ctx(NULL);\n-\tstrbuf_release(&rev_ctx.log);\n-\tstrbuf_release(&rev_ctx.author);\n-\tstrbuf_release(&rev_ctx.note);\n-\tstrbuf_release(&node_ctx.src);\n-\tstrbuf_release(&node_ctx.dst);\n-\tif (buffer_deinit(&input))\n-\t\tfprintf(stderr, \"Input error\\n\");\n-\tif (ferror(stdout))\n-\t\tfprintf(stderr, \"Output error\\n\");\n-}\n-\n-void svndump_reset(void)\n-{\n-\tstrbuf_release(&dump_ctx.uuid);\n-\tstrbuf_release(&dump_ctx.url);\n-\tstrbuf_release(&rev_ctx.log);\n-\tstrbuf_release(&rev_ctx.author);\n-}\ndiff --git a/vcs-svn/svndump.h b/vcs-svn/svndump.h\ndeleted file mode 100644\nindex b8eb12954e..0000000000\n--- a/vcs-svn/svndump.h\n+++ /dev/null\n@@ -1,10 +0,0 @@\n-#ifndef SVNDUMP_H_\n-#define SVNDUMP_H_\n-\n-int svndump_init(const char *filename);\n-int svndump_init_fd(int in_fd, int back_fd);\n-void svndump_read(const char *url, const char *local_ref, const char *notes_ref);\n-void svndump_deinit(void);\n-void svndump_reset(void);\n-\n-#endif\n-- \n2.18.0.1205.g3878b1e64a\n"},{"id":"355934","messageId":"20180817193347.GL24629@zaya.teonanacatl.net","threadId":"49154","inReplyTo":"20180817190310.GA5360@sigill.intra.peff.net","subject":"Re: [RFC/PATCH] drop vcs-svn experiment","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2018-08-17T19:33:47Z","receivedAt":"2018-08-17T19:42:53Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Hi Jeff,\n\nJeff King wrote:\n>  .gitignore                     |   1 -\n>  Makefile                       |  22 --\n>  contrib/svn-fe/.gitignore      |   4 -\n>  contrib/svn-fe/Makefile        | 105 -------\n>  contrib/svn-fe/svn-fe.c        |  18 --\n>  contrib/svn-fe/svn-fe.txt      |  71 -----\n>  contrib/svn-fe/svnrdump_sim.py |  68 -----\n>  remote-testsvn.c               | 337 --------------------\n>  t/helper/test-line-buffer.c    |  81 -----\n>  t/helper/test-svn-fe.c         |  52 ----\n>  t/t9020-remote-svn.sh          |  89 ------\n\nDoesn't t/t9010-svn-fe.sh also need to be removed?  It uses\nthe test-svn-fe helper which is removed.\n\nThe Fedora git-svn package has included git-remote-testsvn\nfor years now but no one has ever filed any bug reports\nabout it.  I looked at whether it should be packaged last\nyear.  I came to the conclusion that while it could be used\noutside of the test suite it was doubtful it actually was.\n\n-- \nTodd\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nNo one ever went broke underestimating the taste of the American\npublic.\n    -- H. L. Mencken\n\n"},{"id":"355962","messageId":"20180818052605.GA241538@aiede.svl.corp.google.com","threadId":"49154","inReplyTo":"20180817190310.GA5360@sigill.intra.peff.net","subject":"Re: [RFC/PATCH] drop vcs-svn experiment","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2018-08-18T05:26:05Z","receivedAt":"2018-08-18T05:26:11Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nJeff King wrote:\n\n> The code in vcs-svn was started in 2010 as an attempt to\n> build a remote-helper for interacting with svn repositories\n> (as opposed to git-svn). However, we never got as far as\n> shipping a mature remote helper, and the last substantive\n> commit was e99d012a6bc in 2012.\n\nI do use svn-fe occasionally, and have done so in the past few years.\nThat said, it's probably not worth keeping this in tree just for me.\n\n> We do have a git-remote-testsvn, and it is even installed as\n> part of \"make install\".\n\nAt a minimum, we should stop doing that.\n\n[...]\n> We also ship contrib/svn-fe, which builds on the vcs-svn\n> work. However, it does not seem to build out of the box for\n> me, as the link step misses some required libraries for\n> using libgit.a.\n\nWhat libraries do you mean?  It builds and runs fine for me with\n\n $ git diff\n diff --git i/contrib/svn-fe/Makefile w/contrib/svn-fe/Makefile\n index e8651aaf4b5..bd709f8d83b 100644\n --- i/contrib/svn-fe/Makefile\n +++ w/contrib/svn-fe/Makefile\n @@ -4,7 +4,7 @@ CC = cc\n  RM = rm -f\n  MV = mv\n \n -CFLAGS = -g -O2 -Wall\n +CFLAGS = -g -O2 -Wall -pthread\n  LDFLAGS =\n  EXTLIBS = -lz\n\nwhich appears to be platform related, not due to some internal change\nin Git.\n\n[...]\n> Of course, I could be completely wrong about people using this. Maybe\n> svn-fe builds are just completely broken on my system, and maybe people\n> really do use testsvn::. But if so, they certainly aren't talking about\n> it on the mailing list. :)\n\nMy take:\n\n - svn-fe works fine and has been useful to me, though its Makefile\n   could likely be simplified and made more user-friendly\n\n - I've benefited from the test coverage of having this in-tree\n\n - testsvn:: is a demo and at a minimum we ought not to install it\n   with \"make install\"\n\n - keeping this in-tree for the benefit of just one user is excessive,\n   so removing it is probably the right thing\n\n - it would be nice if the commit removing this code from Git includes\n   a note to help people find its new home\n\nWould you mind holding off until I'm able to arrange that last bit?\n\nThanks,\nJonathan\n"},{"id":"355986","messageId":"20180818150312.GA7488@sigill.intra.peff.net","threadId":"49154","inReplyTo":"20180818052605.GA241538@aiede.svl.corp.google.com","subject":"Re: [RFC/PATCH] drop vcs-svn experiment","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-08-18T15:03:12Z","receivedAt":"2018-08-18T15:03:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 17, 2018 at 10:26:05PM -0700, Jonathan Nieder wrote:\n\n> > We also ship contrib/svn-fe, which builds on the vcs-svn\n> > work. However, it does not seem to build out of the box for\n> > me, as the link step misses some required libraries for\n> > using libgit.a.\n> \n> What libraries do you mean?  It builds and runs fine for me with\n> \n>  $ git diff\n>  diff --git i/contrib/svn-fe/Makefile w/contrib/svn-fe/Makefile\n>  index e8651aaf4b5..bd709f8d83b 100644\n>  --- i/contrib/svn-fe/Makefile\n>  +++ w/contrib/svn-fe/Makefile\n>  @@ -4,7 +4,7 @@ CC = cc\n>   RM = rm -f\n>   MV = mv\n>  \n>  -CFLAGS = -g -O2 -Wall\n>  +CFLAGS = -g -O2 -Wall -pthread\n>   LDFLAGS =\n>   EXTLIBS = -lz\n> \n> which appears to be platform related, not due to some internal change\n> in Git.\n\nYes, it works for me with that, too[1]. So clearly there's some system\ndependence. But I suspect it's broken for every system with pthreads,\nwhich is most of them. And older versions _do_ compile out of the box,\neven on my modern system. For completeness, here's what I dug up:\n\n - it builds fine up through v1.8.2\n\n - after eff80a9fd9 (Allow custom \"comment char\", 2013-01-16), it breaks\n   with a ton of undefined references during the link stage, including\n   SHA1_* and some xdl_* functions. I still have no idea why, as that\n   commit is fairly mundane, but I guess it just somehow tickles\n   something in the linker or the way we build libgit.a.\n\n - after da011cb0e7 (contrib/svn-fe: fix Makefile, 2014-08-28), the\n   error becomes:\n\n     /usr/bin/ld: ../../libgit.a(sha1_file.o): undefined reference to symbol 'SHA1_Update@@OPENSSL_1_1_0'\n     /usr/bin/ld: //usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: error adding symbols: DSO missing from command line\n\n   Presumably this did work for the author at the time. It's seems quite\n   plausible that older versions of openssl did not exhibit this\n   problem, and that it's system-specific. Or that it was possible to\n   build with BLK_SHA1.\n\n - after e6b07da278 (Makefile: make DC_SHA1 the default, 2017-03-17),\n   the openssl error goes away (naturally), but is replaced with:\n\n     /usr/bin/ld: ../../libgit.a(run-command.o): undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5'\n     /usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line\n\n   If I go back to 2014-era and start building with NO_OPENSSL, then\n   even da011cb0e7 fails with:\n\n     /usr/bin/ld: ../../libgit.a(run-command.o): undefined reference to symbol 'pthread_setspecific@@GLIBC_2.2.5'\n\n   So again, assuming it worked back then for the author of that commit,\n   that's something that has changed on the system, and we can't figure\n   out through bisecting git when that became common.\n\nSo that does mean it's possible that it works for some people on some\nsystems today (though it was also probably broken for everybody for a\nyear and a half in 2013 with nobody noticing).\n\n[1] That patch actually doesn't quite work out of the box, because we\n    also include config.mak, and mine overrides CFLAGS. It also doesn't\n    seem to work with USE_LIBPCRE. But those are only evidence that the\n    Makefile is not very mature, not that people aren't using it for\n    out-of-the-box config.\n\n> > Of course, I could be completely wrong about people using this. Maybe\n> > svn-fe builds are just completely broken on my system, and maybe people\n> > really do use testsvn::. But if so, they certainly aren't talking about\n> > it on the mailing list. :)\n> \n> My take:\n> \n>  - svn-fe works fine and has been useful to me, though its Makefile\n>    could likely be simplified and made more user-friendly\n> \n>  - I've benefited from the test coverage of having this in-tree\n> \n>  - testsvn:: is a demo and at a minimum we ought not to install it\n>    with \"make install\"\n> \n>  - keeping this in-tree for the benefit of just one user is excessive,\n>    so removing it is probably the right thing\n\nThanks, all of that sounds sensible to me.\n\n>  - it would be nice if the commit removing this code from Git includes\n>    a note to help people find its new home\n> \n> Would you mind holding off until I'm able to arrange that last bit?\n\nNot at all. This patch was mostly meant to start the discussion. Mission\naccomplished. ;)\n\n-Peff\n"},{"id":"359602","messageId":"20181004041018.GA1526@sigill.intra.peff.net","threadId":"49154","inReplyTo":"20180818052605.GA241538@aiede.svl.corp.google.com","subject":"Re: [RFC/PATCH] drop vcs-svn experiment","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-10-04T04:10:18Z","receivedAt":"2018-10-04T04:10:21Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 17, 2018 at 10:26:05PM -0700, Jonathan Nieder wrote:\n\n> > Of course, I could be completely wrong about people using this. Maybe\n> > svn-fe builds are just completely broken on my system, and maybe people\n> > really do use testsvn::. But if so, they certainly aren't talking about\n> > it on the mailing list. :)\n> \n> My take:\n> \n>  - svn-fe works fine and has been useful to me, though its Makefile\n>    could likely be simplified and made more user-friendly\n> \n>  - I've benefited from the test coverage of having this in-tree\n> \n>  - testsvn:: is a demo and at a minimum we ought not to install it\n>    with \"make install\"\n> \n>  - keeping this in-tree for the benefit of just one user is excessive,\n>    so removing it is probably the right thing\n> \n>  - it would be nice if the commit removing this code from Git includes\n>    a note to help people find its new home\n> \n> Would you mind holding off until I'm able to arrange that last bit?\n\nAny further thoughts / movement on this? Not urgent, but I saw you\nmention it in another thread, and it's on my \"to be decided\" pile.\n\n-Peff\n"},{"id":"359603","messageId":"20181004041624.GB165126@aiede.svl.corp.google.com","threadId":"49154","inReplyTo":"20181004041018.GA1526@sigill.intra.peff.net","subject":"Re: [RFC/PATCH] drop vcs-svn experiment","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2018-10-04T04:16:24Z","receivedAt":"2018-10-04T04:16:31Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jeff King wrote:\n> On Fri, Aug 17, 2018 at 10:26:05PM -0700, Jonathan Nieder wrote:\n\n>>  - testsvn:: is a demo and at a minimum we ought not to install it\n>>    with \"make install\"\n>>\n>>  - keeping this in-tree for the benefit of just one user is excessive,\n>>    so removing it is probably the right thing\n>>\n>>  - it would be nice if the commit removing this code from Git includes\n>>    a note to help people find its new home\n>>\n>> Would you mind holding off until I'm able to arrange that last bit?\n>\n> Any further thoughts / movement on this? Not urgent, but I saw you\n> mention it in another thread, and it's on my \"to be decided\" pile.\n\nI'd like to move this to contrib so it's all in one place.  Then I\nshould be able to put it in a separate repo and drop it from Git.\n\nIf someone has a spare moment to help, I'd be happy to review patches\nthat move vcs-svn/* and git-remote-testsvn to contrib/svn-fe\n(including the tests, contrib/subtree-style; in a separate repo the\ntests would then work fine using sharness).\n\nThanks,\nJonathan\n"}]}