Merge lp:~maxb/ubuntu/lucid/subversion/merge into lp:ubuntu/lucid/subversion

Proposed by Max Bowsher
Status: Merged
Merged at revision: not available
Proposed branch: lp:~maxb/ubuntu/lucid/subversion/merge
Merge into: lp:ubuntu/lucid/subversion
Diff against target: 119180 lines
To merge this branch: bzr merge lp:~maxb/ubuntu/lucid/subversion/merge
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+15522@code.launchpad.net
To post a comment you must log in.
41. By Max Bowsher

Per request of Scott Kitterman, revert changing XS-Python-Version to all,
restoring the line from Debian.

42. By Max Bowsher

Add LP bug numbers to the changelog for bugs closed by merge.

43. By Max Bowsher

Amend the XS-Python-Version line to ">= 2.4" rather than explicit versions.
(Explicit versions which are not available via python-all cause FTBFS.)

44. By Scott Kitterman

Changelog tweaks by my sponsor prior to uploading.

Revision history for this message
Max Bowsher (maxb) wrote :

This has been uploaded to the archive.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHANGES'
2--- CHANGES 2009-08-24 19:09:22 +0000
3+++ CHANGES 2009-12-12 13:21:15 +0000
4@@ -1,9 +1,40 @@
5+Version 1.6.6
6+(16 Oct 2009, from /branches/1.6.x)
7+http://svn.collab.net/repos/svn/tags/1.6.6
8+
9+ User-visible changes:
10+ * fix crash during 'svn update' (r39673)
11+ * respect Apache's ServerSignature directive (r40008, -21, -31)
12+ * don't add a file with mixed line endings, and then abort (issue #2713)
13+ * support Neon 0.29.
14+ * fix a crash in 'svn rm --force' (r37953)
15+ * handle tree conflicts involving replacements (issue #3486)
16+ * allow non-threadsafe sqlite if APR has no threads (r39301)
17+ * print newline before plaintext SSL cert / password prompts (r38982, r39302)
18+ * improve merge performance with implicit subtree mergeinfo (issue #3443)
19+ * fix "libsvn_ra_svn/marshal.c assertion failed (opt || cstr)" (issue #3485)
20+ * make file externals work for binary files (issue #3368)
21+ * perform MIME type matching case-insensitively (issue #3479)
22+ * do not treat non-existent revisions as HEAD in 'svn export' (issue #3400)
23+ * revert r36720's default MIME type change back to "text/plain" (issue #3508)
24+ * improve "tree conflict already exists" error message (r38872)
25+ * fix failure to commit replacement of a directory (issue #3281)
26+ * fix mod_dav_svn parent dir links to preserve peg revisions (issue #3425)
27+
28+ Developer-visible changes:
29+ * fix 2 failing tests in ruby bindings (r38886)
30+ * do not require GNU grep for build (issue #3453)
31+ * use '$SED' instead of 'sed' in build scripts (issue #3458)
32+ * add svn.client.{log5,merge_peg3} to python bindings (r39635, -6, -7)
33+ * include the time of a test run in tests.log (r39887)
34+
35+
36 Version 1.6.5
37 (21 Aug 2009, from /branches/1.6.x)
38 http://svn.collab.net/repos/svn/tags/1.6.5
39
40 User-visible changes:
41- * fix mod_dav_svn directory view links to preserve peg revisions (r38201)
42+ * fix mod_dav_svn directory view links to preserve peg revisions (r38021)
43 * do not error on Windows when ALLUSERPROFILE dir nonexistent (r38053, -5, -7)
44 * properly escape lock comments over ra_neon (r38101, -2)
45 * allow syncing copies of '/' over ra_neon and ra_serf (issue #3438)
46
47=== modified file 'README.Debian-tarball'
48--- README.Debian-tarball 2009-08-24 19:09:22 +0000
49+++ README.Debian-tarball 2009-12-12 13:21:14 +0000
50@@ -1,4 +1,4 @@
51-This tarball is the same as official subversion-1.6.5.tar.gz,
52+This tarball is the same as official subversion-1.6.6.tar.gz,
53 except that several unlicensed or unclearly-licensed files were
54 removed:
55
56@@ -7,13 +7,9 @@
57 contrib/client-side/diffwrap.bat
58 contrib/client-side/svn-log.pl
59 contrib/client-side/svn_all_diffs.pl
60- contrib/client-side/svn_load_dirs
61 contrib/client-side/vim
62 contrib/hook-scripts/detect-merge-conflicts.sh
63 contrib/server-side/backup-recipe.sh
64 contrib/server-side/load_repo_with_mergesensitive_copy.sh
65
66-and 'configure.ac' at the top level was edited to remove references to
67-svn_load_dirs.pl.
68-
69-Peter Samuelson, 20 Aug 2009
70+Peter Samuelson, 17 Oct 2009
71
72=== modified file 'build-outputs.mk'
73--- build-outputs.mk 2009-08-24 19:09:22 +0000
74+++ build-outputs.mk 2009-12-12 13:21:15 +0000
75@@ -1598,7 +1598,7 @@
76
77 subversion/libsvn_client/log.lo: subversion/libsvn_client/log.c subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_compat.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h
78
79-subversion/libsvn_client/merge.lo: subversion/libsvn_client/merge.c subversion/include/private/svn_mergeinfo_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/libsvn_client/mergeinfo.h subversion/svn_private_config.h
80+subversion/libsvn_client/merge.lo: subversion/libsvn_client/merge.c subversion/include/private/svn_mergeinfo_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/libsvn_client/mergeinfo.h subversion/svn_private_config.h
81
82 subversion/libsvn_client/mergeinfo.lo: subversion/libsvn_client/mergeinfo.c subversion/include/private/svn_mergeinfo_private.h subversion/include/private/svn_ra_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/libsvn_client/mergeinfo.h subversion/svn_private_config.h
83
84
85=== added file 'build/ac-macros/apr_memcache.m4'
86--- build/ac-macros/apr_memcache.m4 1970-01-01 00:00:00 +0000
87+++ build/ac-macros/apr_memcache.m4 2009-12-12 13:21:15 +0000
88@@ -0,0 +1,84 @@
89+dnl
90+dnl SVN_LIB_APR_MEMCACHE
91+dnl
92+dnl Check configure options and assign variables related to
93+dnl the apr_memcache client library.
94+dnl Sets svn_lib_apr_memcache to "yes" if memcache code is accessible
95+dnl either from the standalone apr_memcache library or from apr-util.
96+dnl
97+
98+AC_DEFUN(SVN_LIB_APR_MEMCACHE,
99+[
100+ apr_memcache_found=no
101+
102+ AC_ARG_WITH(apr_memcache,AC_HELP_STRING([--with-apr_memcache=PREFIX],
103+ [Standalone apr_memcache client library]),
104+ [
105+ if test "$withval" = "yes" ; then
106+ AC_MSG_ERROR([--with-apr_memcache requires an argument.])
107+ else
108+ AC_MSG_NOTICE([looking for separate apr_memcache package])
109+ apr_memcache_prefix=$withval
110+ save_cppflags="$CPPFLAGS"
111+ CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES -I$apr_memcache_prefix/include/apr_memcache-0"
112+ AC_CHECK_HEADER(apr_memcache.h,[
113+ save_ldflags="$LDFLAGS"
114+ LDFLAGS="$LDFLAGS -L$apr_memcache_prefix/lib"
115+ AC_CHECK_LIB(apr_memcache, apr_memcache_create,
116+ [apr_memcache_found="standalone"])
117+ LDFLAGS="$save_ldflags"])
118+ CPPFLAGS="$save_cppflags"
119+ fi
120+ ], [
121+ if test -d "$srcdir/apr_memcache"; then
122+ apr_memcache_found=reconfig
123+ else
124+dnl Try just looking in apr-util (>= 1.3 has it already).
125+ AC_MSG_NOTICE([looking for apr_memcache as part of apr-util])
126+ save_cppflags="$CPPFLAGS"
127+ CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES"
128+ AC_CHECK_HEADER(apr_memcache.h,[
129+ save_ldflags="$LDFLAGS"
130+ LDFLAGS="$LDFLAGS $SVN_APRUTIL_EXPORT_LIBS"
131+ AC_CHECK_LIB(aprutil-1, apr_memcache_create,
132+ [apr_memcache_found="aprutil"])
133+ LDFLAGS="$save_ldflags"])
134+ CPPFLAGS="$save_cppflags"
135+
136+ fi
137+ ])
138+
139+
140+ if test $apr_memcache_found = "reconfig"; then
141+ SVN_EXTERNAL_PROJECT([apr_memcache], [--with-apr=$apr_config --with-apr-util=$apu_config])
142+ apr_memcache_prefix=$prefix
143+ SVN_APR_MEMCACHE_PREFIX="$apr_memcache_prefix"
144+ SVN_APR_MEMCACHE_INCLUDES="-I$srcdir/memcache"
145+ SVN_APR_MEMCACHE_LIBS="$abs_builddir/memcache/libapr_memcache.la"
146+ SVN_APR_MEMCACHE_EXPORT_LIBS="-L$apr_memcache_prefix/lib -lapr_memcache"
147+ fi
148+
149+ if test $apr_memcache_found = "standalone"; then
150+ SVN_APR_MEMCACHE_PREFIX="$apr_memcache_prefix"
151+ SVN_APR_MEMCACHE_INCLUDES="-I$apr_memcache_prefix/include/apr_memcache-0"
152+ SVN_APR_MEMCACHE_LIBS="$apr_memcache_prefix/lib/libapr_memcache.la"
153+ SVN_APR_MEMCACHE_EXPORT_LIBS="-L$apr_memcache_prefix/lib -lapr_memcache"
154+ svn_lib_apr_memcache=yes
155+ elif test $apr_memcache_found = "aprutil"; then
156+dnl We are already linking apr-util everywhere, so no special treatement needed.
157+ SVN_APR_MEMCACHE_PREFIX=""
158+ SVN_APR_MEMCACHE_INCLUDES=""
159+ SVN_APR_MEMCACHE_LIBS=""
160+ SVN_APR_MEMCACHE_EXPORT_LIBS=""
161+ svn_lib_apr_memcache=yes
162+ elif test $apr_memcache_found = "reconfig"; then
163+ svn_lib_apr_memcache=yes
164+ else
165+ svn_lib_apr_memcache=no
166+ fi
167+
168+ AC_SUBST(SVN_APR_MEMCACHE_PREFIX)
169+ AC_SUBST(SVN_APR_MEMCACHE_INCLUDES)
170+ AC_SUBST(SVN_APR_MEMCACHE_LIBS)
171+ AC_SUBST(SVN_APR_MEMCACHE_EXPORT_LIBS)
172+])
173
174=== removed file 'build/ac-macros/apr_memcache.m4'
175--- build/ac-macros/apr_memcache.m4 2009-04-09 17:30:40 +0000
176+++ build/ac-macros/apr_memcache.m4 1970-01-01 00:00:00 +0000
177@@ -1,84 +0,0 @@
178-dnl
179-dnl SVN_LIB_APR_MEMCACHE
180-dnl
181-dnl Check configure options and assign variables related to
182-dnl the apr_memcache client library.
183-dnl Sets svn_lib_apr_memcache to "yes" if memcache code is accessible
184-dnl either from the standalone apr_memcache library or from apr-util.
185-dnl
186-
187-AC_DEFUN(SVN_LIB_APR_MEMCACHE,
188-[
189- apr_memcache_found=no
190-
191- AC_ARG_WITH(apr_memcache,AC_HELP_STRING([--with-apr_memcache=PREFIX],
192- [Standalone apr_memcache client library]),
193- [
194- if test "$withval" = "yes" ; then
195- AC_MSG_ERROR([--with-apr_memcache requires an argument.])
196- else
197- AC_MSG_NOTICE([looking for separate apr_memcache package])
198- apr_memcache_prefix=$withval
199- save_cppflags="$CPPFLAGS"
200- CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES -I$apr_memcache_prefix/include/apr_memcache-0"
201- AC_CHECK_HEADER(apr_memcache.h,[
202- save_ldflags="$LDFLAGS"
203- LDFLAGS="$LDFLAGS -L$apr_memcache_prefix/lib"
204- AC_CHECK_LIB(apr_memcache, apr_memcache_create,
205- [apr_memcache_found="standalone"])
206- LDFLAGS="$save_ldflags"])
207- CPPFLAGS="$save_cppflags"
208- fi
209- ], [
210- if test -d "$srcdir/apr_memcache"; then
211- apr_memcache_found=reconfig
212- else
213-dnl Try just looking in apr-util (>= 1.3 has it already).
214- AC_MSG_NOTICE([looking for apr_memcache as part of apr-util])
215- save_cppflags="$CPPFLAGS"
216- CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES"
217- AC_CHECK_HEADER(apr_memcache.h,[
218- save_ldflags="$LDFLAGS"
219- LDFLAGS="$LDFLAGS $SVN_APRUTIL_EXPORT_LIBS"
220- AC_CHECK_LIB(aprutil-1, apr_memcache_create,
221- [apr_memcache_found="aprutil"])
222- LDFLAGS="$save_ldflags"])
223- CPPFLAGS="$save_cppflags"
224-
225- fi
226- ])
227-
228-
229- if test $apr_memcache_found = "reconfig"; then
230- SVN_EXTERNAL_PROJECT([apr_memcache], [--with-apr=$apr_config --with-apr-util=$apu_config])
231- apr_memcache_prefix=$prefix
232- SVN_APR_MEMCACHE_PREFIX="$apr_memcache_prefix"
233- SVN_APR_MEMCACHE_INCLUDES="-I$srcdir/memcache"
234- SVN_APR_MEMCACHE_LIBS="$abs_builddir/memcache/libapr_memcache.la"
235- SVN_APR_MEMCACHE_EXPORT_LIBS="-L$apr_memcache_prefix/lib -lapr_memcache"
236- fi
237-
238- if test $apr_memcache_found = "standalone"; then
239- SVN_APR_MEMCACHE_PREFIX="$apr_memcache_prefix"
240- SVN_APR_MEMCACHE_INCLUDES="-I$apr_memcache_prefix/include/apr_memcache-0"
241- SVN_APR_MEMCACHE_LIBS="$apr_memcache_prefix/lib/libapr_memcache.la"
242- SVN_APR_MEMCACHE_EXPORT_LIBS="-L$apr_memcache_prefix/lib -lapr_memcache"
243- svn_lib_apr_memcache=yes
244- elif test $apr_memcache_found = "aprutil"; then
245-dnl We are already linking apr-util everywhere, so no special treatement needed.
246- SVN_APR_MEMCACHE_PREFIX=""
247- SVN_APR_MEMCACHE_INCLUDES=""
248- SVN_APR_MEMCACHE_LIBS=""
249- SVN_APR_MEMCACHE_EXPORT_LIBS=""
250- svn_lib_apr_memcache=yes
251- elif test $apr_memcache_found = "reconfig"; then
252- svn_lib_apr_memcache=yes
253- else
254- svn_lib_apr_memcache=no
255- fi
256-
257- AC_SUBST(SVN_APR_MEMCACHE_PREFIX)
258- AC_SUBST(SVN_APR_MEMCACHE_INCLUDES)
259- AC_SUBST(SVN_APR_MEMCACHE_LIBS)
260- AC_SUBST(SVN_APR_MEMCACHE_EXPORT_LIBS)
261-])
262
263=== modified file 'build/ac-macros/berkeley-db.m4'
264--- build/ac-macros/berkeley-db.m4 2009-08-24 19:09:22 +0000
265+++ build/ac-macros/berkeley-db.m4 2009-12-12 13:21:15 +0000
266@@ -63,17 +63,17 @@
267 fi
268 else
269 if echo "$withval" | $EGREP ":.*:.*:" > /dev/null; then
270- svn_berkeley_db_header=["`echo "$withval" | sed -e "s/\([^:]*\):.*/\1/"`"]
271+ svn_berkeley_db_header=["`echo "$withval" | $SED -e "s/\([^:]*\):.*/\1/"`"]
272 SVN_DB_INCLUDES=""
273- for i in [`echo "$withval" | sed -e "s/.*:\([^:]*\):[^:]*:.*/\1/"`]; do
274+ for i in [`echo "$withval" | $SED -e "s/.*:\([^:]*\):[^:]*:.*/\1/"`]; do
275 SVN_DB_INCLUDES="$SVN_DB_INCLUDES -I$i"
276 done
277 SVN_DB_INCLUDES="${SVN_DB_INCLUDES## }"
278- for l in [`echo "$withval" | sed -e "s/.*:[^:]*:\([^:]*\):.*/\1/"`]; do
279+ for l in [`echo "$withval" | $SED -e "s/.*:[^:]*:\([^:]*\):.*/\1/"`]; do
280 LDFLAGS="$LDFLAGS -L$l"
281 done
282 SVN_DB_LIBS=""
283- for l in [`echo "$withval" | sed -e "s/.*:\([^:]*\)/\1/"`]; do
284+ for l in [`echo "$withval" | $SED -e "s/.*:\([^:]*\)/\1/"`]; do
285 SVN_DB_LIBS="$SVN_DB_LIBS -l$l"
286 done
287 SVN_DB_LIBS="${SVN_DB_LIBS## }"
288@@ -161,7 +161,7 @@
289 # Or that it resides in a non-standard location which we would have
290 # to compensate with using something like -R`$apu_config --prefix`/lib.
291 #
292- SVN_DB_LIBS=["${SVN_DB_LIBS-`$apu_config --libs | sed -e 's/.*\(-ldb[^[:space:]]*\).*/\1/' | $EGREP -- '-ldb[^[:space:]]*'`}"]
293+ SVN_DB_LIBS=["${SVN_DB_LIBS-`$apu_config --libs | $SED -e 's/.*\(-ldb[^[:space:]]*\).*/\1/' | $EGREP -- '-ldb[^[:space:]]*'`}"]
294
295 CPPFLAGS="$SVN_DB_INCLUDES $SVN_APRUTIL_INCLUDES $CPPFLAGS"
296 LIBS="`$apu_config --ldflags` $SVN_DB_LIBS $LIBS"
297
298=== added file 'build/ac-macros/ctypesgen.m4'
299--- build/ac-macros/ctypesgen.m4 1970-01-01 00:00:00 +0000
300+++ build/ac-macros/ctypesgen.m4 2009-12-12 13:21:15 +0000
301@@ -0,0 +1,60 @@
302+dnl
303+dnl ctypesgen.m4: Locates ctypesgen for building/installing ctypes-python.
304+dnl
305+
306+AC_DEFUN(SVN_CHECK_CTYPESGEN,
307+[
308+ AC_ARG_WITH(ctypesgen,
309+ AS_HELP_STRING([--with-ctypesgen=PATH],
310+ [Specify the path to ctypesgen. This can either
311+ be the full path to a ctypesgen installation,
312+ the full path to a ctypesgen source tree or the
313+ full path to ctypesgen.py.]),
314+ [
315+ case "$withval" in
316+ "no")
317+ SVN_FIND_CTYPESGEN(no)
318+ ;;
319+ "yes")
320+ SVN_FIND_CTYPESGEN(check)
321+ ;;
322+ *)
323+ SVN_FIND_CTYPESGEN($withval)
324+ ;;
325+ esac
326+ ],
327+ [
328+ SVN_FIND_CTYPESGEN(check)
329+ ])
330+])
331+
332+AC_DEFUN(SVN_FIND_CTYPESGEN,
333+[
334+ where=$1
335+
336+ CTYPESGEN=none
337+
338+ if test $where = check; then
339+ AC_PATH_PROG(CTYPESGEN, "ctypesgen.py", none)
340+ elif test $where != no; then
341+ AC_MSG_CHECKING([for ctypesgen.py])
342+
343+ if test -f "$where"; then
344+ CTYPESGEN="$where"
345+ elif test -f "$where/bin/ctypesgen.py"; then
346+ CTYPESGEN="$where/bin/ctypesgen.py"
347+ else
348+ CTYPESGEN="$where/ctypesgen.py"
349+ fi
350+
351+ if test ! -f "$CTYPESGEN" || test ! -x "$CTYPESGEN"; then
352+ AC_MSG_ERROR([Could not find ctypesgen at $where/ctypesgen.py or at
353+ $where/bin/ctypesgen.py])
354+ else
355+ AC_MSG_RESULT([$CTYPESGEN])
356+ fi
357+ fi
358+
359+ dnl We use CTYPESGEN in the Makefile
360+ AC_SUBST(CTYPESGEN)
361+])
362
363=== removed file 'build/ac-macros/ctypesgen.m4'
364--- build/ac-macros/ctypesgen.m4 2009-04-09 17:30:40 +0000
365+++ build/ac-macros/ctypesgen.m4 1970-01-01 00:00:00 +0000
366@@ -1,60 +0,0 @@
367-dnl
368-dnl ctypesgen.m4: Locates ctypesgen for building/installing ctypes-python.
369-dnl
370-
371-AC_DEFUN(SVN_CHECK_CTYPESGEN,
372-[
373- AC_ARG_WITH(ctypesgen,
374- AS_HELP_STRING([--with-ctypesgen=PATH],
375- [Specify the path to ctypesgen. This can either
376- be the full path to a ctypesgen installation,
377- the full path to a ctypesgen source tree or the
378- full path to ctypesgen.py.]),
379- [
380- case "$withval" in
381- "no")
382- SVN_FIND_CTYPESGEN(no)
383- ;;
384- "yes")
385- SVN_FIND_CTYPESGEN(check)
386- ;;
387- *)
388- SVN_FIND_CTYPESGEN($withval)
389- ;;
390- esac
391- ],
392- [
393- SVN_FIND_CTYPESGEN(check)
394- ])
395-])
396-
397-AC_DEFUN(SVN_FIND_CTYPESGEN,
398-[
399- where=$1
400-
401- CTYPESGEN=none
402-
403- if test $where = check; then
404- AC_PATH_PROG(CTYPESGEN, "ctypesgen.py", none)
405- elif test $where != no; then
406- AC_MSG_CHECKING([for ctypesgen.py])
407-
408- if test -f "$where"; then
409- CTYPESGEN="$where"
410- elif test -f "$where/bin/ctypesgen.py"; then
411- CTYPESGEN="$where/bin/ctypesgen.py"
412- else
413- CTYPESGEN="$where/ctypesgen.py"
414- fi
415-
416- if test ! -f "$CTYPESGEN" || test ! -x "$CTYPESGEN"; then
417- AC_MSG_ERROR([Could not find ctypesgen at $where/ctypesgen.py or at
418- $where/bin/ctypesgen.py])
419- else
420- AC_MSG_RESULT([$CTYPESGEN])
421- fi
422- fi
423-
424- dnl We use CTYPESGEN in the Makefile
425- AC_SUBST(CTYPESGEN)
426-])
427
428=== added file 'build/ac-macros/kwallet.m4'
429--- build/ac-macros/kwallet.m4 1970-01-01 00:00:00 +0000
430+++ build/ac-macros/kwallet.m4 2009-12-12 13:21:15 +0000
431@@ -0,0 +1,99 @@
432+dnl
433+dnl SVN_LIB_KWALLET
434+dnl
435+dnl Check configure options and assign variables related to KWallet support
436+dnl
437+
438+AC_DEFUN(SVN_LIB_KWALLET,
439+[
440+ AC_ARG_WITH(kwallet,
441+ [AS_HELP_STRING([[--with-kwallet[=PATH]]],
442+ [Enable use of KWallet (KDE 4) for auth credentials])],
443+ [svn_lib_kwallet="$withval"],
444+ [svn_lib_kwallet=no])
445+
446+ AC_MSG_CHECKING([whether to look for KWallet])
447+ if test "$svn_lib_kwallet" != "no"; then
448+ AC_MSG_RESULT([yes])
449+ if test "$enable_shared" = "yes"; then
450+ if test "$APR_HAS_DSO" = "yes"; then
451+ if test "$USE_NLS" = "yes"; then
452+ if test -n "$PKG_CONFIG"; then
453+ if test "$HAVE_DBUS" = "yes"; then
454+ AC_MSG_CHECKING([for QtCore, QtDBus, QtGui])
455+ if $PKG_CONFIG --exists QtCore QtDBus QtGui; then
456+ AC_MSG_RESULT([yes])
457+ if test "$svn_lib_kwallet" != "yes"; then
458+ AC_MSG_CHECKING([for kde4-config])
459+ kde4_config="$svn_lib_kwallet/bin/kde4-config"
460+ if test -f "$kde4_config" && test -x "$kde4_config"; then
461+ HAVE_KDE4_CONFIG="yes"
462+ AC_MSG_RESULT([yes])
463+ else
464+ AC_MSG_RESULT([no])
465+ fi
466+ else
467+ AC_CHECK_PROG(HAVE_KDE4_CONFIG, kde4-config, yes)
468+ kde4_config="kde4-config"
469+ fi
470+ if test "$HAVE_KDE4_CONFIG" = "yes"; then
471+ AC_MSG_CHECKING([for KWallet])
472+ old_CXXFLAGS="$CXXFLAGS"
473+ old_LDFLAGS="$LDFLAGS"
474+ old_LIBS="$LIBS"
475+ for d in [`$PKG_CONFIG --cflags QtCore QtDBus QtGui`]; do
476+ if test -n ["`echo "$d" | $GREP -- '^-D[^[:space:]]*'`"]; then
477+ CPPFLAGS="$CPPFLAGS $d"
478+ fi
479+ done
480+ qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`"
481+ kde_dir="`$kde4_config --prefix`"
482+ SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs -I$kde_dir/include"
483+ qt_libs_other_options="`$PKG_CONFIG --libs-only-other QtCore QtDBus QtGui`"
484+ SVN_KWALLET_LIBS="$DBUS_LIBS -lQtCore -lQtDBus -lQtGui -lkdecore -lkdeui $qt_libs_other_options"
485+ CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES"
486+ LIBS="$LIBS $SVN_KWALLET_LIBS"
487+ qt_lib_dirs="`$PKG_CONFIG --libs-only-L QtCore QtDBus QtGui`"
488+ LDFLAGS="$old_LDFLAGS $qt_lib_dirs -L$kde_dir/lib`$kde4_config --libsuffix`"
489+ AC_LANG(C++)
490+ AC_LINK_IFELSE([
491+#include <kwallet.h>
492+int main()
493+{KWallet::Wallet::walletList();}], svn_lib_kwallet="yes", svn_lib_kwallet="no")
494+ AC_LANG(C)
495+ if test "$svn_lib_kwallet" = "yes"; then
496+ AC_MSG_RESULT([yes])
497+ CXXFLAGS="$old_CXXFLAGS"
498+ LIBS="$old_LIBS"
499+ else
500+ AC_MSG_RESULT([no])
501+ AC_MSG_ERROR([cannot find KWallet])
502+ fi
503+ else
504+ AC_MSG_ERROR([cannot find kde4-config])
505+ fi
506+ else
507+ AC_MSG_RESULT([no])
508+ AC_MSG_ERROR([cannot find QtCore, QtDBus, QtGui])
509+ fi
510+ else
511+ AC_MSG_ERROR([cannot find D-Bus])
512+ fi
513+ else
514+ AC_MSG_ERROR([cannot find pkg-config])
515+ fi
516+ else
517+ AC_MSG_ERROR([missing support for internationalization])
518+ fi
519+ else
520+ AC_MSG_ERROR([APR does not have support for DSOs])
521+ fi
522+ else
523+ AC_MSG_ERROR([--with-kwallet conflicts with --disable-shared])
524+ fi
525+ else
526+ AC_MSG_RESULT([no])
527+ fi
528+ AC_SUBST(SVN_KWALLET_INCLUDES)
529+ AC_SUBST(SVN_KWALLET_LIBS)
530+])
531
532=== removed file 'build/ac-macros/kwallet.m4'
533--- build/ac-macros/kwallet.m4 2009-04-09 17:30:40 +0000
534+++ build/ac-macros/kwallet.m4 1970-01-01 00:00:00 +0000
535@@ -1,97 +0,0 @@
536-dnl
537-dnl SVN_LIB_KWALLET
538-dnl
539-dnl Check configure options and assign variables related to KWallet support
540-dnl
541-
542-AC_DEFUN(SVN_LIB_KWALLET,
543-[
544- AC_ARG_WITH(kwallet,
545- [AS_HELP_STRING([[--with-kwallet[=PATH]]],
546- [Enable use of KWallet (KDE 4) for auth credentials])],
547- [svn_lib_kwallet="$withval"],
548- [svn_lib_kwallet=no])
549-
550- AC_MSG_CHECKING([whether to look for KWallet])
551- if test "$svn_lib_kwallet" != "no"; then
552- AC_MSG_RESULT([yes])
553- if test "$enable_shared" = "yes"; then
554- if test "$APR_HAS_DSO" = "yes"; then
555- if test "$USE_NLS" = "yes"; then
556- if test -n "$PKG_CONFIG"; then
557- if test "$HAVE_DBUS" = "yes"; then
558- AC_MSG_CHECKING([for QtCore, QtDBus, QtGui])
559- if $PKG_CONFIG --exists QtCore QtDBus QtGui; then
560- AC_MSG_RESULT([yes])
561- if test "$svn_lib_kwallet" != "yes"; then
562- AC_MSG_CHECKING([for kde4-config])
563- kde4_config="$svn_lib_kwallet/bin/kde4-config"
564- if test -f "$kde4_config" && test -x "$kde4_config"; then
565- HAVE_KDE4_CONFIG="yes"
566- AC_MSG_RESULT([yes])
567- else
568- AC_MSG_RESULT([no])
569- fi
570- else
571- AC_CHECK_PROG(HAVE_KDE4_CONFIG, kde4-config, yes)
572- kde4_config="kde4-config"
573- fi
574- if test "$HAVE_KDE4_CONFIG" = "yes"; then
575- AC_MSG_CHECKING([for KWallet])
576- old_CXXFLAGS="$CXXFLAGS"
577- old_LDFLAGS="$LDFLAGS"
578- old_LIBS="$LIBS"
579- for d in [`$PKG_CONFIG --cflags QtCore QtDBus QtGui | $GREP -o -- -D[^[:space:]]*`]; do
580- CPPFLAGS="$CPPFLAGS $d"
581- done
582- qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`"
583- kde_dir="`$kde4_config --prefix`"
584- SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs -I$kde_dir/include"
585- qt_libs_other_options="`$PKG_CONFIG --libs-only-other QtCore QtDBus QtGui`"
586- SVN_KWALLET_LIBS="$DBUS_LIBS -lQtCore -lQtDBus -lQtGui -lkdecore -lkdeui $qt_libs_other_options"
587- CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES"
588- LIBS="$LIBS $SVN_KWALLET_LIBS"
589- qt_lib_dirs="`$PKG_CONFIG --libs-only-L QtCore QtDBus QtGui`"
590- LDFLAGS="$old_LDFLAGS $qt_lib_dirs -L$kde_dir/lib`$kde4_config --libsuffix`"
591- AC_LANG(C++)
592- AC_LINK_IFELSE([
593-#include <kwallet.h>
594-int main()
595-{KWallet::Wallet::walletList();}], svn_lib_kwallet="yes", svn_lib_kwallet="no")
596- AC_LANG(C)
597- if test "$svn_lib_kwallet" = "yes"; then
598- AC_MSG_RESULT([yes])
599- CXXFLAGS="$old_CXXFLAGS"
600- LIBS="$old_LIBS"
601- else
602- AC_MSG_RESULT([no])
603- AC_MSG_ERROR([cannot find KWallet])
604- fi
605- else
606- AC_MSG_ERROR([cannot find kde4-config])
607- fi
608- else
609- AC_MSG_RESULT([no])
610- AC_MSG_ERROR([cannot find QtCore, QtDBus, QtGui])
611- fi
612- else
613- AC_MSG_ERROR([cannot find D-Bus])
614- fi
615- else
616- AC_MSG_ERROR([cannot find pkg-config])
617- fi
618- else
619- AC_MSG_ERROR([missing support for internationalization])
620- fi
621- else
622- AC_MSG_ERROR([APR does not have support for DSOs])
623- fi
624- else
625- AC_MSG_ERROR([--with-kwallet conflicts with --disable-shared])
626- fi
627- else
628- AC_MSG_RESULT([no])
629- fi
630- AC_SUBST(SVN_KWALLET_INCLUDES)
631- AC_SUBST(SVN_KWALLET_LIBS)
632-])
633
634=== modified file 'build/ac-macros/neon.m4'
635--- build/ac-macros/neon.m4 2009-06-09 23:53:06 +0000
636+++ build/ac-macros/neon.m4 2009-12-12 13:21:15 +0000
637@@ -141,7 +141,7 @@
638 if test "$NEON_PKG_CONFIG" = "yes" ; then
639 NEON_VERSION=`$PKG_CONFIG neon --modversion`
640 else
641- NEON_VERSION=`$neon_config --version | sed -e 's/^neon //'`
642+ NEON_VERSION=`$neon_config --version | $SED -e 's/^neon //'`
643 fi
644 AC_MSG_RESULT([$NEON_VERSION])
645
646@@ -165,8 +165,8 @@
647 test "$svn_allowed_neon" = "any"; then
648 svn_allowed_neon_on_system="yes"
649 if test "$NEON_PKG_CONFIG" = "yes"; then
650- SVN_NEON_INCLUDES=[`$PKG_CONFIG neon --cflags | sed -e 's/-D[^ ]*//g'`]
651- CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | sed -e 's/-I[^ ]*//g'`"]
652+ SVN_NEON_INCLUDES=[`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`]
653+ CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/-I[^ ]*//g'`"]
654 old_CFLAGS="$CFLAGS"
655 old_LIBS="$LIBS"
656 NEON_LIBS=`$PKG_CONFIG neon --libs`
657@@ -186,8 +186,8 @@
658 CFLAGS="$old_CFLAGS"
659 LIBS="$old_LIBS"
660 else
661- SVN_NEON_INCLUDES=[`$neon_config --cflags | sed -e 's/-D[^ ]*//g'`]
662- CFLAGS=["$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"]
663+ SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/-D[^ ]*//g'`]
664+ CFLAGS=["$CFLAGS `$neon_config --cflags | $SED -e 's/-I[^ ]*//g'`"]
665 NEON_LIBS=`$neon_config --libs`
666 fi
667 svn_lib_neon="yes"
668
669=== added file 'build/ac-macros/sqlite.m4'
670--- build/ac-macros/sqlite.m4 1970-01-01 00:00:00 +0000
671+++ build/ac-macros/sqlite.m4 2009-12-12 13:21:15 +0000
672@@ -0,0 +1,228 @@
673+dnl SVN_LIB_SQLITE(minimum_ver, recommended_ver, url)
674+dnl
675+dnl Search for a suitable version of sqlite. minimum_ver is a
676+dnl version string which is the lowest suitable version we can use.
677+dnl recommended_ver is the recommended version of sqlite, which is
678+dnl not necessarily the latest version released. url is the URL of
679+dnl the recommended version of sqlite.
680+dnl
681+dnl If a --with-sqlite=PREFIX option is passed, look for a suitable sqlite
682+dnl either installed under the directory PREFIX or as an amalgamation file
683+dnl at the path PREFIX. In this case ignore any sqlite-amalgamation/ subdir
684+dnl within the source tree.
685+dnl
686+dnl If no --with-sqlite option is passed, look first for
687+dnl sqlite-amalgamation/sqlite3.c which should be the amalgamated version of
688+dnl the source distribution. If the amalgamation exists and is the wrong
689+dnl version, exit with a failure. If no sqlite-amalgamation/ subdir is
690+dnl present, search for a sqlite installed on the system.
691+dnl
692+dnl If the search for sqlite fails, set svn_lib_sqlite to no, otherwise set
693+dnl it to yes.
694+
695+AC_DEFUN(SVN_LIB_SQLITE,
696+[
697+ SQLITE_MINIMUM_VER="$1"
698+ SQLITE_RECOMMENDED_VER="$2"
699+ SQLITE_URL="$3"
700+ SQLITE_PKGNAME="sqlite3"
701+
702+ SVN_SQLITE_MIN_VERNUM_PARSE
703+
704+ AC_MSG_NOTICE([checking sqlite library])
705+
706+ AC_ARG_WITH(sqlite,
707+ AS_HELP_STRING([--with-sqlite=PREFIX],
708+ [Use installed SQLite library or amalgamation file.]),
709+ [
710+ if test "$withval" = "yes" ; then
711+ AC_MSG_ERROR([--with-sqlite requires an argument.])
712+ else
713+ sqlite_dir="$withval"
714+ fi
715+
716+ if test -d $sqlite_dir; then
717+ dnl pointed at an sqlite installation
718+ SVN_SQLITE_DIR_CONFIG($sqlite_dir)
719+ else
720+ dnl pointed at the amalgamation file
721+ SVN_SQLITE_FILE_CONFIG($sqlite_dir)
722+ fi
723+
724+ if test -z "$svn_lib_sqlite"; then
725+ AC_MSG_WARN([no suitable sqlite found in $sqlite_dir])
726+ SVN_DOWNLOAD_SQLITE
727+ fi
728+ ],
729+ [
730+ dnl see if the sqlite amalgamation exists in the source tree
731+ SVN_SQLITE_FILE_CONFIG($abs_srcdir/sqlite-amalgamation/sqlite3.c)
732+
733+ if test -z "$svn_lib_sqlite"; then
734+ dnl check the "standard" location of /usr
735+ SVN_SQLITE_DIR_CONFIG()
736+ fi
737+
738+ if test -z "$svn_lib_sqlite"; then
739+ dnl no --with-sqlite switch, and no sqlite subdir, look in PATH
740+ SVN_SQLITE_PKG_CONFIG
741+ fi
742+
743+ if test -z "$svn_lib_sqlite"; then
744+ SVN_DOWNLOAD_SQLITE
745+ fi
746+ ])
747+
748+ AC_SUBST(SVN_SQLITE_INCLUDES)
749+ AC_SUBST(SVN_SQLITE_LIBS)
750+])
751+
752+dnl SVN_SQLITE_PKG_CONFIG
753+dnl
754+dnl Look for sqlite in PATH using pkg-config.
755+AC_DEFUN(SVN_SQLITE_PKG_CONFIG,
756+[
757+ if test -n "$PKG_CONFIG"; then
758+ AC_MSG_CHECKING([sqlite library version (via pkg-config)])
759+ sqlite_version=`$PKG_CONFIG $SQLITE_PKGNAME --modversion --silence-errors`
760+
761+ if test -n "$sqlite_version"; then
762+ SVN_SQLITE_VERNUM_PARSE
763+
764+ if test "$sqlite_ver_num" -ge "$sqlite_min_ver_num"; then
765+ AC_MSG_RESULT([$sqlite_version])
766+ svn_lib_sqlite="yes"
767+ SVN_SQLITE_INCLUDES="`$PKG_CONFIG $SQLITE_PKGNAME --cflags`"
768+ SVN_SQLITE_LIBS="`$PKG_CONFIG $SQLITE_PKGNAME --libs`"
769+ else
770+ AC_MSG_RESULT([none or unsupported $sqlite_version])
771+ fi
772+ fi
773+ fi
774+
775+ if test -z "$svn_lib_sqlite"; then
776+ AC_MSG_RESULT(no)
777+ fi
778+])
779+
780+dnl SVN_SQLITE_DIR_CONFIG(sqlite_dir)
781+dnl
782+dnl Check to see if we've got an appropriate sqlite library at sqlite_dir.
783+dnl If we don't, fail.
784+AC_DEFUN(SVN_SQLITE_DIR_CONFIG,
785+[
786+ if test -z "$1"; then
787+ sqlite_dir=""
788+ sqlite_include="sqlite3.h"
789+ else
790+ sqlite_dir="$1"
791+ sqlite_include="$1/include/sqlite3.h"
792+ fi
793+
794+ save_CPPFLAGS="$CPPFLAGS"
795+ save_LDFLAGS="$LDFLAGS"
796+
797+ if test ! -z "$1"; then
798+ CPPFLAGS="$CPPFLAGS -I$sqlite_dir/include"
799+ LDFLAGS="$LDFLAGS -L$sqlite_dir/lib"
800+ fi
801+
802+ AC_CHECK_HEADER(sqlite3.h,
803+ [
804+ AC_MSG_CHECKING([sqlite library version (via header)])
805+ AC_EGREP_CPP(SQLITE_VERSION_OKAY,[
806+#include "$sqlite_include"
807+#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num
808+SQLITE_VERSION_OKAY
809+#endif],
810+ [AC_MSG_RESULT([okay])
811+ AC_CHECK_LIB(sqlite3, sqlite3_close, [
812+ svn_lib_sqlite="yes"
813+ if test -z "$sqlite_dir" -o ! -d "$sqlite_dir"; then
814+ SVN_SQLITE_LIBS="-lsqlite3"
815+ else
816+ SVN_SQLITE_INCLUDES="-I$sqlite_dir/include"
817+ SVN_SQLITE_LIBS="-L$sqlite_dir/lib -lsqlite3"
818+ fi
819+ ])], [AC_MSG_RESULT([unsupported SQLite version])])
820+ ])
821+
822+ CPPFLAGS="$save_CPPFLAGS"
823+ LDFLAGS="$save_LDFLAGS"
824+])
825+
826+dnl SVN_SQLITE_FILE_CONFIG(sqlite_file)
827+dnl
828+dnl Check to see if we've got an appropriate sqlite amalgamation file
829+dnl at sqlite_file. If not, fail.
830+AC_DEFUN(SVN_SQLITE_FILE_CONFIG,
831+[
832+ sqlite_amalg="$1"
833+ if test ! -e $sqlite_amalg; then
834+ echo "amalgamation not found at $sqlite_amalg"
835+ else
836+ AC_MSG_CHECKING([sqlite amalgamation file version])
837+ AC_EGREP_CPP(SQLITE_VERSION_OKAY,[
838+#include "$sqlite_amalg"
839+#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num
840+SQLITE_VERSION_OKAY
841+#endif],
842+ [AC_MSG_RESULT([amalgamation found and is okay])
843+ AC_DEFINE(SVN_SQLITE_INLINE, 1,
844+ [Defined if svn should use the amalgamated version of sqlite])
845+ SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`"
846+ svn_lib_sqlite="yes"],
847+ [AC_MSG_RESULT([unsupported amalgamation SQLite version])])
848+ fi
849+])
850+
851+dnl SVN_SQLITE_VERNUM_PARSE()
852+dnl
853+dnl Parse a x.y[.z] version string sqlite_version into a number sqlite_ver_num.
854+AC_DEFUN(SVN_SQLITE_VERNUM_PARSE,
855+[
856+ sqlite_major=`expr $sqlite_version : '\([[0-9]]*\)'`
857+ sqlite_minor=`expr $sqlite_version : '[[0-9]]*\.\([[0-9]]*\)'`
858+ sqlite_micro=`expr $sqlite_version : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
859+ if test -z "$sqlite_micro"; then
860+ sqlite_micro=0
861+ fi
862+ sqlite_ver_num=`expr $sqlite_major \* 1000000 \
863+ \+ $sqlite_minor \* 1000 \
864+ \+ $sqlite_micro`
865+])
866+
867+dnl SVN_SQLITE_MIN_VERNUM_PARSE()
868+dnl
869+dnl Parse a x.y.z version string SQLITE_MINIMUM_VER into a number
870+dnl sqlite_min_ver_num.
871+AC_DEFUN(SVN_SQLITE_MIN_VERNUM_PARSE,
872+[
873+ sqlite_min_major=`expr $SQLITE_MINIMUM_VER : '\([[0-9]]*\)'`
874+ sqlite_min_minor=`expr $SQLITE_MINIMUM_VER : '[[0-9]]*\.\([[0-9]]*\)'`
875+ sqlite_min_micro=`expr $SQLITE_MINIMUM_VER : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
876+ sqlite_min_ver_num=`expr $sqlite_min_major \* 1000000 \
877+ \+ $sqlite_min_minor \* 1000 \
878+ \+ $sqlite_min_micro`
879+])
880+
881+dnl SVN_DOWNLOAD_SQLITE()
882+dnl no sqlite found, print out a message telling the user what to do
883+AC_DEFUN(SVN_DOWNLOAD_SQLITE,
884+[
885+ echo ""
886+ echo "An appropriate version of sqlite could not be found. We recommmend"
887+ echo "${SQLITE_RECOMMENDED_VER}, but require at least ${SQLITE_MINIMUM_VER}."
888+ echo "Please either install a newer sqlite on this system"
889+ echo ""
890+ echo "or"
891+ echo ""
892+ echo "get the sqlite ${SQLITE_RECOMMENDED_VER} amalgamation from:"
893+ echo " ${SQLITE_URL}"
894+ echo "unpack the archive using tar/gunzip and copy sqlite3.c from the"
895+ echo "resulting directory to:"
896+ echo "$abs_srcdir/sqlite-amalgamation/sqlite3.c"
897+ echo "This file also ships as part of the subversion-deps distribution."
898+ echo ""
899+ AC_MSG_ERROR([Subversion requires SQLite])
900+])
901
902=== removed file 'build/ac-macros/sqlite.m4'
903--- build/ac-macros/sqlite.m4 2009-04-09 17:30:40 +0000
904+++ build/ac-macros/sqlite.m4 1970-01-01 00:00:00 +0000
905@@ -1,228 +0,0 @@
906-dnl SVN_LIB_SQLITE(minimum_ver, recommended_ver, url)
907-dnl
908-dnl Search for a suitable version of sqlite. minimum_ver is a
909-dnl version string which is the lowest suitable version we can use.
910-dnl recommended_ver is the recommended version of sqlite, which is
911-dnl not necessarily the latest version released. url is the URL of
912-dnl the recommended version of sqlite.
913-dnl
914-dnl If a --with-sqlite=PREFIX option is passed, look for a suitable sqlite
915-dnl either installed under the directory PREFIX or as an amalgamation file
916-dnl at the path PREFIX. In this case ignore any sqlite-amalgamation/ subdir
917-dnl within the source tree.
918-dnl
919-dnl If no --with-sqlite option is passed, look first for
920-dnl sqlite-amalgamation/sqlite3.c which should be the amalgamated version of
921-dnl the source distribution. If the amalgamation exists and is the wrong
922-dnl version, exit with a failure. If no sqlite-amalgamation/ subdir is
923-dnl present, search for a sqlite installed on the system.
924-dnl
925-dnl If the search for sqlite fails, set svn_lib_sqlite to no, otherwise set
926-dnl it to yes.
927-
928-AC_DEFUN(SVN_LIB_SQLITE,
929-[
930- SQLITE_MINIMUM_VER="$1"
931- SQLITE_RECOMMENDED_VER="$2"
932- SQLITE_URL="$3"
933- SQLITE_PKGNAME="sqlite3"
934-
935- SVN_SQLITE_MIN_VERNUM_PARSE
936-
937- AC_MSG_NOTICE([checking sqlite library])
938-
939- AC_ARG_WITH(sqlite,
940- AS_HELP_STRING([--with-sqlite=PREFIX],
941- [Use installed SQLite library or amalgamation file.]),
942- [
943- if test "$withval" = "yes" ; then
944- AC_MSG_ERROR([--with-sqlite requires an argument.])
945- else
946- sqlite_dir="$withval"
947- fi
948-
949- if test -d $sqlite_dir; then
950- dnl pointed at an sqlite installation
951- SVN_SQLITE_DIR_CONFIG($sqlite_dir)
952- else
953- dnl pointed at the amalgamation file
954- SVN_SQLITE_FILE_CONFIG($sqlite_dir)
955- fi
956-
957- if test -z "$svn_lib_sqlite"; then
958- AC_MSG_WARN([no suitable sqlite found in $sqlite_dir])
959- SVN_DOWNLOAD_SQLITE
960- fi
961- ],
962- [
963- dnl see if the sqlite amalgamation exists in the source tree
964- SVN_SQLITE_FILE_CONFIG($abs_srcdir/sqlite-amalgamation/sqlite3.c)
965-
966- if test -z "$svn_lib_sqlite"; then
967- dnl check the "standard" location of /usr
968- SVN_SQLITE_DIR_CONFIG()
969- fi
970-
971- if test -z "$svn_lib_sqlite"; then
972- dnl no --with-sqlite switch, and no sqlite subdir, look in PATH
973- SVN_SQLITE_PKG_CONFIG
974- fi
975-
976- if test -z "$svn_lib_sqlite"; then
977- SVN_DOWNLOAD_SQLITE
978- fi
979- ])
980-
981- AC_SUBST(SVN_SQLITE_INCLUDES)
982- AC_SUBST(SVN_SQLITE_LIBS)
983-])
984-
985-dnl SVN_SQLITE_PKG_CONFIG
986-dnl
987-dnl Look for sqlite in PATH using pkg-config.
988-AC_DEFUN(SVN_SQLITE_PKG_CONFIG,
989-[
990- if test -n "$PKG_CONFIG"; then
991- AC_MSG_CHECKING([sqlite library version (via pkg-config)])
992- sqlite_version=`$PKG_CONFIG $SQLITE_PKGNAME --modversion --silence-errors`
993-
994- if test -n "$sqlite_version"; then
995- SVN_SQLITE_VERNUM_PARSE
996-
997- if test "$sqlite_ver_num" -ge "$sqlite_min_ver_num"; then
998- AC_MSG_RESULT([$sqlite_version])
999- svn_lib_sqlite="yes"
1000- SVN_SQLITE_INCLUDES="`$PKG_CONFIG $SQLITE_PKGNAME --cflags`"
1001- SVN_SQLITE_LIBS="`$PKG_CONFIG $SQLITE_PKGNAME --libs`"
1002- else
1003- AC_MSG_RESULT([none or unsupported $sqlite_version])
1004- fi
1005- fi
1006- fi
1007-
1008- if test -z "$svn_lib_sqlite"; then
1009- AC_MSG_RESULT(no)
1010- fi
1011-])
1012-
1013-dnl SVN_SQLITE_DIR_CONFIG(sqlite_dir)
1014-dnl
1015-dnl Check to see if we've got an appropriate sqlite library at sqlite_dir.
1016-dnl If we don't, fail.
1017-AC_DEFUN(SVN_SQLITE_DIR_CONFIG,
1018-[
1019- if test -z "$1"; then
1020- sqlite_dir=""
1021- sqlite_include="sqlite3.h"
1022- else
1023- sqlite_dir="$1"
1024- sqlite_include="$1/include/sqlite3.h"
1025- fi
1026-
1027- save_CPPFLAGS="$CPPFLAGS"
1028- save_LDFLAGS="$LDFLAGS"
1029-
1030- if test ! -z "$1"; then
1031- CPPFLAGS="$CPPFLAGS -I$sqlite_dir/include"
1032- LDFLAGS="$LDFLAGS -L$sqlite_dir/lib"
1033- fi
1034-
1035- AC_CHECK_HEADER(sqlite3.h,
1036- [
1037- AC_MSG_CHECKING([sqlite library version (via header)])
1038- AC_EGREP_CPP(SQLITE_VERSION_OKAY,[
1039-#include "$sqlite_include"
1040-#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num
1041-SQLITE_VERSION_OKAY
1042-#endif],
1043- [AC_MSG_RESULT([okay])
1044- AC_CHECK_LIB(sqlite3, sqlite3_close, [
1045- svn_lib_sqlite="yes"
1046- if test -z "$sqlite_dir" -o ! -d "$sqlite_dir"; then
1047- SVN_SQLITE_LIBS="-lsqlite3"
1048- else
1049- SVN_SQLITE_INCLUDES="-I$sqlite_dir/include"
1050- SVN_SQLITE_LIBS="-L$sqlite_dir/lib -lsqlite3"
1051- fi
1052- ])], [AC_MSG_RESULT([unsupported SQLite version])])
1053- ])
1054-
1055- CPPFLAGS="$save_CPPFLAGS"
1056- LDFLAGS="$save_LDFLAGS"
1057-])
1058-
1059-dnl SVN_SQLITE_FILE_CONFIG(sqlite_file)
1060-dnl
1061-dnl Check to see if we've got an appropriate sqlite amalgamation file
1062-dnl at sqlite_file. If not, fail.
1063-AC_DEFUN(SVN_SQLITE_FILE_CONFIG,
1064-[
1065- sqlite_amalg="$1"
1066- if test ! -e $sqlite_amalg; then
1067- echo "amalgamation not found at $sqlite_amalg"
1068- else
1069- AC_MSG_CHECKING([sqlite amalgamation file version])
1070- AC_EGREP_CPP(SQLITE_VERSION_OKAY,[
1071-#include "$sqlite_amalg"
1072-#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num
1073-SQLITE_VERSION_OKAY
1074-#endif],
1075- [AC_MSG_RESULT([amalgamation found and is okay])
1076- AC_DEFINE(SVN_SQLITE_INLINE, 1,
1077- [Defined if svn should use the amalgamated version of sqlite])
1078- SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`"
1079- svn_lib_sqlite="yes"],
1080- [AC_MSG_RESULT([unsupported amalgamation SQLite version])])
1081- fi
1082-])
1083-
1084-dnl SVN_SQLITE_VERNUM_PARSE()
1085-dnl
1086-dnl Parse a x.y[.z] version string sqlite_version into a number sqlite_ver_num.
1087-AC_DEFUN(SVN_SQLITE_VERNUM_PARSE,
1088-[
1089- sqlite_major=`expr $sqlite_version : '\([[0-9]]*\)'`
1090- sqlite_minor=`expr $sqlite_version : '[[0-9]]*\.\([[0-9]]*\)'`
1091- sqlite_micro=`expr $sqlite_version : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
1092- if test -z "$sqlite_micro"; then
1093- sqlite_micro=0
1094- fi
1095- sqlite_ver_num=`expr $sqlite_major \* 1000000 \
1096- \+ $sqlite_minor \* 1000 \
1097- \+ $sqlite_micro`
1098-])
1099-
1100-dnl SVN_SQLITE_MIN_VERNUM_PARSE()
1101-dnl
1102-dnl Parse a x.y.z version string SQLITE_MINIMUM_VER into a number
1103-dnl sqlite_min_ver_num.
1104-AC_DEFUN(SVN_SQLITE_MIN_VERNUM_PARSE,
1105-[
1106- sqlite_min_major=`expr $SQLITE_MINIMUM_VER : '\([[0-9]]*\)'`
1107- sqlite_min_minor=`expr $SQLITE_MINIMUM_VER : '[[0-9]]*\.\([[0-9]]*\)'`
1108- sqlite_min_micro=`expr $SQLITE_MINIMUM_VER : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
1109- sqlite_min_ver_num=`expr $sqlite_min_major \* 1000000 \
1110- \+ $sqlite_min_minor \* 1000 \
1111- \+ $sqlite_min_micro`
1112-])
1113-
1114-dnl SVN_DOWNLOAD_SQLITE()
1115-dnl no sqlite found, print out a message telling the user what to do
1116-AC_DEFUN(SVN_DOWNLOAD_SQLITE,
1117-[
1118- echo ""
1119- echo "An appropriate version of sqlite could not be found. We recommmend"
1120- echo "${SQLITE_RECOMMENDED_VER}, but require at least ${SQLITE_MINIMUM_VER}."
1121- echo "Please either install a newer sqlite on this system"
1122- echo ""
1123- echo "or"
1124- echo ""
1125- echo "get the sqlite ${SQLITE_RECOMMENDED_VER} amalgamation from:"
1126- echo " ${SQLITE_URL}"
1127- echo "unpack the archive using tar/gunzip and copy sqlite3.c from the"
1128- echo "resulting directory to:"
1129- echo "$abs_srcdir/sqlite-amalgamation/sqlite3.c"
1130- echo "This file also ships as part of the subversion-deps distribution."
1131- echo ""
1132- AC_MSG_ERROR([Subversion requires SQLite])
1133-])
1134
1135=== modified file 'build/ac-macros/svn-macros.m4'
1136--- build/ac-macros/svn-macros.m4 2009-06-06 22:57:04 +0000
1137+++ build/ac-macros/svn-macros.m4 2009-12-12 13:21:15 +0000
1138@@ -60,7 +60,7 @@
1139 cd $1
1140
1141 # A "../" for each directory in /$config_subdirs.
1142- ac_dots=[`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`]
1143+ ac_dots=[`echo $apr_config_subdirs| $SED -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`]
1144
1145 # Make the cache file name correct relative to the subdirectory.
1146 case "$cache_file" in
1147
1148=== modified file 'build/ac-macros/swig.m4'
1149--- build/ac-macros/swig.m4 2009-06-09 23:53:06 +0000
1150+++ build/ac-macros/swig.m4 2009-12-12 13:21:15 +0000
1151@@ -53,7 +53,7 @@
1152 if test "$SWIG" != "none"; then
1153 AC_MSG_CHECKING([swig version])
1154 SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \
1155- sed -ne 's/^.*Version \(.*\)$/\1/p'`"
1156+ $SED -ne 's/^.*Version \(.*\)$/\1/p'`"
1157 # We want the version as an integer so we can test against
1158 # which version we're using. SWIG doesn't provide this
1159 # to us so we have to come up with it on our own.
1160@@ -62,7 +62,7 @@
1161 # and the patch level is zero padded to three places.
1162 # e.g. 1.3.24 becomes 103024
1163 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \
1164- sed -e 's/[[^0-9\.]].*$//' \
1165+ $SED -e 's/[[^0-9\.]].*$//' \
1166 -e 's/\.\([[0-9]]\)$/.0\1/' \
1167 -e 's/\.\([[0-9]][[0-9]]\)$/.0\1/' \
1168 -e 's/\.\([[0-9]]\)\./0\1/; s/\.//g;'`"
1169@@ -190,7 +190,7 @@
1170
1171 AC_CACHE_CHECK([how to compile Ruby extensions], [svn_cv_ruby_compile],[
1172 # Ruby doesn't like '-ansi', so strip that out of CFLAGS
1173- svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | sed -e "s/ -ansi//g"`"
1174+ svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | $SED -e "s/ -ansi//g"`"
1175 ])
1176 SWIG_RB_COMPILE="$svn_cv_ruby_compile"
1177
1178@@ -210,7 +210,7 @@
1179 AC_MSG_CHECKING([for rb_errinfo])
1180 old_CFLAGS="$CFLAGS"
1181 old_LIBS="$LIBS"
1182- CFLAGS="`echo $CFLAGS | sed -e "s/ -ansi//g"` $svn_cv_ruby_includes"
1183+ CFLAGS="`echo $CFLAGS | $SED -e "s/ -ansi//g"` $svn_cv_ruby_includes"
1184 LIBS="$SWIG_RB_LIBS"
1185 AC_LINK_IFELSE([
1186 #include <ruby.h>
1187@@ -239,7 +239,7 @@
1188 AC_MSG_CHECKING([where to install Ruby scripts])
1189 AC_CACHE_VAL([svn_cv_ruby_sitedir_libsuffix],[
1190 svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
1191- sed -e "s,^$rbconfig_sitedir,,"`"
1192+ $SED -e "s,^$rbconfig_sitedir,,"`"
1193 ])
1194 SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}"
1195 AC_MSG_RESULT([$SWIG_RB_SITE_LIB_DIR])
1196@@ -247,7 +247,7 @@
1197 AC_MSG_CHECKING([where to install Ruby extensions])
1198 AC_CACHE_VAL([svn_cv_ruby_sitedir_archsuffix],[
1199 svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
1200- sed -e "s,^$rbconfig_sitedir,,"`"
1201+ $SED -e "s,^$rbconfig_sitedir,,"`"
1202 ])
1203 SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}"
1204 AC_MSG_RESULT([$SWIG_RB_SITE_ARCH_DIR])
1205
1206=== modified file 'build/run_tests.py'
1207--- build/run_tests.py 2009-06-09 23:53:06 +0000
1208+++ build/run_tests.py 2009-12-12 13:21:15 +0000
1209@@ -16,6 +16,7 @@
1210 '''
1211
1212 import os, sys
1213+import time
1214
1215 import getopt
1216 try:
1217@@ -135,6 +136,7 @@
1218 self.log.write('START: %s\n' % progbase)
1219 self.log.flush()
1220
1221+ start_time = time.time()
1222 if progbase[-3:] == '.py':
1223 progname = sys.executable
1224 cmdline = [quote(progname),
1225@@ -197,7 +199,14 @@
1226 print('FAILURE')
1227 else:
1228 print('success')
1229- self.log.write('END: %s\n\n' % progbase)
1230+ elapsed_time = time.strftime('%H:%M:%S',
1231+ time.gmtime(time.time() - start_time))
1232+ if self.log:
1233+ self.log.write('END: %s\n' % progbase)
1234+ self.log.write('ELAPSED: %s %s\n\n' % (progbase, elapsed_time))
1235+ else:
1236+ print('END: %s\n' % progbase)
1237+ print('ELAPSED: %s %s\n' % (progbase, elapsed_time))
1238 return failed
1239
1240 def _run_prog(self, progname, arglist):
1241
1242=== added file 'build/transform_sql.py'
1243--- build/transform_sql.py 1970-01-01 00:00:00 +0000
1244+++ build/transform_sql.py 2009-12-12 13:21:15 +0000
1245@@ -0,0 +1,62 @@
1246+#!/usr/bin/env python
1247+#
1248+# transform_sql.py -- create a header file with the appropriate SQL variables
1249+# from an SQL file
1250+#
1251+
1252+
1253+import os
1254+import re
1255+import sys
1256+
1257+
1258+def usage_and_exit(msg):
1259+ if msg:
1260+ sys.stderr.write('%s\n\n' % msg)
1261+ sys.stderr.write(
1262+ 'USAGE: %s SQLITE_FILE [OUTPUT_FILE]\n'
1263+ ' stdout will be used if OUTPUT_FILE is not provided.\n'
1264+ % os.path.basename(sys.argv[0]))
1265+ sys.stderr.flush()
1266+ sys.exit(1)
1267+
1268+
1269+def main(input, output, filename):
1270+ input = input.read()
1271+
1272+ var_name = re.sub('[-.]', '_', filename)
1273+
1274+ output.write(
1275+ '/* This file is automatically generated from %s.\n'
1276+ ' * Do not edit this file -- edit the source and rerun gen-make.py */\n'
1277+ '\n'
1278+ % (filename,))
1279+
1280+ output.write('#define %s \\\n' % var_name.upper())
1281+
1282+ regex = re.compile(r'/\*.*?\*/', re.MULTILINE|re.DOTALL)
1283+ input = regex.sub('', input)
1284+
1285+ for line in input.split('\n'):
1286+ line = line.replace('"', '\\"')
1287+
1288+ if line.strip():
1289+ # got something besides whitespace. write it out.
1290+ output.write(' "' + line + '"\\\n')
1291+
1292+ output.write(' ""\n')
1293+
1294+
1295+if __name__ == '__main__':
1296+ if len(sys.argv) < 2 or len(sys.argv) > 3:
1297+ usage_and_exit('Incorrect number of arguments')
1298+
1299+ # Note: we could use stdin, but then we'd have no var_name
1300+ input_file = open(sys.argv[1], 'r')
1301+
1302+ if len(sys.argv) > 2:
1303+ output_file = open(sys.argv[2], 'w')
1304+ else:
1305+ output_file = sys.stdout
1306+
1307+ main(input_file, output_file, os.path.basename(sys.argv[1]))
1308
1309=== removed file 'build/transform_sql.py'
1310--- build/transform_sql.py 2009-04-09 17:30:40 +0000
1311+++ build/transform_sql.py 1970-01-01 00:00:00 +0000
1312@@ -1,62 +0,0 @@
1313-#!/usr/bin/env python
1314-#
1315-# transform_sql.py -- create a header file with the appropriate SQL variables
1316-# from an SQL file
1317-#
1318-
1319-
1320-import os
1321-import re
1322-import sys
1323-
1324-
1325-def usage_and_exit(msg):
1326- if msg:
1327- sys.stderr.write('%s\n\n' % msg)
1328- sys.stderr.write(
1329- 'USAGE: %s SQLITE_FILE [OUTPUT_FILE]\n'
1330- ' stdout will be used if OUTPUT_FILE is not provided.\n'
1331- % os.path.basename(sys.argv[0]))
1332- sys.stderr.flush()
1333- sys.exit(1)
1334-
1335-
1336-def main(input, output, filename):
1337- input = input.read()
1338-
1339- var_name = re.sub('[-.]', '_', filename)
1340-
1341- output.write(
1342- '/* This file is automatically generated from %s.\n'
1343- ' * Do not edit this file -- edit the source and rerun gen-make.py */\n'
1344- '\n'
1345- % (filename,))
1346-
1347- output.write('#define %s \\\n' % var_name.upper())
1348-
1349- regex = re.compile(r'/\*.*?\*/', re.MULTILINE|re.DOTALL)
1350- input = regex.sub('', input)
1351-
1352- for line in input.split('\n'):
1353- line = line.replace('"', '\\"')
1354-
1355- if line.strip():
1356- # got something besides whitespace. write it out.
1357- output.write(' "' + line + '"\\\n')
1358-
1359- output.write(' ""\n')
1360-
1361-
1362-if __name__ == '__main__':
1363- if len(sys.argv) < 2 or len(sys.argv) > 3:
1364- usage_and_exit('Incorrect number of arguments')
1365-
1366- # Note: we could use stdin, but then we'd have no var_name
1367- input_file = open(sys.argv[1], 'r')
1368-
1369- if len(sys.argv) > 2:
1370- output_file = open(sys.argv[2], 'w')
1371- else:
1372- output_file = sys.stdout
1373-
1374- main(input_file, output_file, os.path.basename(sys.argv[1]))
1375
1376=== added file 'build/transform_sql.sh'
1377--- build/transform_sql.sh 1970-01-01 00:00:00 +0000
1378+++ build/transform_sql.sh 2009-12-12 13:21:15 +0000
1379@@ -0,0 +1,42 @@
1380+#!/bin/sh
1381+
1382+varname=`basename $1 | tr "[a-z]" "[A-Z]" | tr "-" "_" | tr "." "_"`
1383+
1384+echo "/* This file is automatically generated from"
1385+echo " * $1"
1386+echo " * Do not edit it directly, but edit the source file and rerun 'make'"
1387+echo " */"
1388+echo
1389+echo "#define $varname \\"
1390+
1391+comment=false
1392+
1393+IFS="
1394+"
1395+while read line; do
1396+ line=`echo "$line" | sed -e 's/\/\*.*\*\///g' | sed -e 's/[ ]*$//g'`
1397+
1398+ if [ -z "$line" ]; then
1399+ continue
1400+ fi
1401+
1402+ if [ "$comment" = "false" ] && echo "$line" | fgrep '/*' >/dev/null; then
1403+ comment=true
1404+ fi
1405+
1406+ if [ "$comment" = "true" ] && echo "$line" | fgrep '*/' >/dev/null; then
1407+ comment=false
1408+ continue
1409+ fi
1410+
1411+ if [ "$comment" = "true" ]; then
1412+ continue
1413+ fi
1414+
1415+ line="`echo "$line" | sed -e 's/"/\\"/g'`" #' hi, emacs syntax coloring!
1416+ if [ -n "$line" ]; then
1417+ echo " \"$line \"\\"
1418+ fi
1419+done
1420+
1421+echo ' ""'
1422
1423=== removed file 'build/transform_sql.sh'
1424--- build/transform_sql.sh 2009-04-09 17:30:40 +0000
1425+++ build/transform_sql.sh 1970-01-01 00:00:00 +0000
1426@@ -1,42 +0,0 @@
1427-#!/bin/sh
1428-
1429-varname=`basename $1 | tr "[a-z]" "[A-Z]" | tr "-" "_" | tr "." "_"`
1430-
1431-echo "/* This file is automatically generated from"
1432-echo " * $1"
1433-echo " * Do not edit it directly, but edit the source file and rerun 'make'"
1434-echo " */"
1435-echo
1436-echo "#define $varname \\"
1437-
1438-comment=false
1439-
1440-IFS="
1441-"
1442-while read line; do
1443- line=`echo "$line" | sed -e 's/\/\*.*\*\///g' | sed -e 's/[ ]*$//g'`
1444-
1445- if [ -z "$line" ]; then
1446- continue
1447- fi
1448-
1449- if [ "$comment" = "false" ] && echo "$line" | fgrep '/*' >/dev/null; then
1450- comment=true
1451- fi
1452-
1453- if [ "$comment" = "true" ] && echo "$line" | fgrep '*/' >/dev/null; then
1454- comment=false
1455- continue
1456- fi
1457-
1458- if [ "$comment" = "true" ]; then
1459- continue
1460- fi
1461-
1462- line="`echo "$line" | sed -e 's/"/\\"/g'`" #' hi, emacs syntax coloring!
1463- if [ -n "$line" ]; then
1464- echo " \"$line \"\\"
1465- fi
1466-done
1467-
1468-echo ' ""'
1469
1470=== modified file 'configure'
1471--- configure 2009-08-24 19:09:22 +0000
1472+++ configure 2009-12-12 13:21:15 +0000
1473@@ -1,6 +1,6 @@
1474 #! /bin/sh
1475 # Guess values for system-dependent variables and create Makefiles.
1476-# Generated by GNU Autoconf 2.63 for subversion 1.6.5.
1477+# Generated by GNU Autoconf 2.63 for subversion 1.6.6.
1478 #
1479 # Report bugs to <http://subversion.tigris.org/>.
1480 #
1481@@ -750,8 +750,8 @@
1482 # Identity of this package.
1483 PACKAGE_NAME='subversion'
1484 PACKAGE_TARNAME='subversion'
1485-PACKAGE_VERSION='1.6.5'
1486-PACKAGE_STRING='subversion 1.6.5'
1487+PACKAGE_VERSION='1.6.6'
1488+PACKAGE_STRING='subversion 1.6.6'
1489 PACKAGE_BUGREPORT='http://subversion.tigris.org/'
1490
1491 ac_unique_file="subversion/include/svn_types.h"
1492@@ -874,7 +874,6 @@
1493 RANLIB
1494 AR
1495 ECHO
1496-SED
1497 SVN_BINDIR
1498 SVN_SQLITE_LIBS
1499 SVN_SQLITE_INCLUDES
1500@@ -923,6 +922,7 @@
1501 build_vendor
1502 build_cpu
1503 build
1504+SED
1505 CPP
1506 ac_ct_CXX
1507 CXXFLAGS
1508@@ -1588,7 +1588,7 @@
1509 # Omit some internal or obsolete options to make the list less imposing.
1510 # This message is too long to be a string in the A/UX 3.1 sh.
1511 cat <<_ACEOF
1512-\`configure' configures subversion 1.6.5 to adapt to many kinds of systems.
1513+\`configure' configures subversion 1.6.6 to adapt to many kinds of systems.
1514
1515 Usage: $0 [OPTION]... [VAR=VALUE]...
1516
1517@@ -1654,7 +1654,7 @@
1518
1519 if test -n "$ac_init_help"; then
1520 case $ac_init_help in
1521- short | recursive ) echo "Configuration of subversion 1.6.5:";;
1522+ short | recursive ) echo "Configuration of subversion 1.6.6:";;
1523 esac
1524 cat <<\_ACEOF
1525
1526@@ -1840,7 +1840,7 @@
1527 test -n "$ac_init_help" && exit $ac_status
1528 if $ac_init_version; then
1529 cat <<\_ACEOF
1530-subversion configure 1.6.5
1531+subversion configure 1.6.6
1532 generated by GNU Autoconf 2.63
1533
1534 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1535@@ -1854,7 +1854,7 @@
1536 This file contains any messages produced by compilers while
1537 running configure, to aid debugging if configure makes a mistake.
1538
1539-It was created by subversion $as_me 1.6.5, which was
1540+It was created by subversion $as_me 1.6.6, which was
1541 generated by GNU Autoconf 2.63. Invocation command line was
1542
1543 $ $0 $@
1544@@ -2256,8 +2256,8 @@
1545
1546
1547
1548-{ $as_echo "$as_me:$LINENO: Configuring Subversion 1.6.5" >&5
1549-$as_echo "$as_me: Configuring Subversion 1.6.5" >&6;}
1550+{ $as_echo "$as_me:$LINENO: Configuring Subversion 1.6.6" >&5
1551+$as_echo "$as_me: Configuring Subversion 1.6.6" >&6;}
1552
1553 abs_srcdir="`cd $srcdir && pwd`"
1554
1555@@ -3843,6 +3843,80 @@
1556 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1557
1558
1559+# Look for a good sed
1560+# AC_PROG_SED was introduced in Autoconf 2.59b
1561+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
1562+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
1563+if test "${ac_cv_path_SED+set}" = set; then
1564+ $as_echo_n "(cached) " >&6
1565+else
1566+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
1567+ for ac_i in 1 2 3 4 5 6 7; do
1568+ ac_script="$ac_script$as_nl$ac_script"
1569+ done
1570+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
1571+ $as_unset ac_script || ac_script=
1572+ if test -z "$SED"; then
1573+ ac_path_SED_found=false
1574+ # Loop through the user's path and test for each of PROGNAME-LIST
1575+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1576+for as_dir in $PATH
1577+do
1578+ IFS=$as_save_IFS
1579+ test -z "$as_dir" && as_dir=.
1580+ for ac_prog in sed gsed; do
1581+ for ac_exec_ext in '' $ac_executable_extensions; do
1582+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
1583+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
1584+# Check for GNU ac_path_SED and select it if it is found.
1585+ # Check for GNU $ac_path_SED
1586+case `"$ac_path_SED" --version 2>&1` in
1587+*GNU*)
1588+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
1589+*)
1590+ ac_count=0
1591+ $as_echo_n 0123456789 >"conftest.in"
1592+ while :
1593+ do
1594+ cat "conftest.in" "conftest.in" >"conftest.tmp"
1595+ mv "conftest.tmp" "conftest.in"
1596+ cp "conftest.in" "conftest.nl"
1597+ $as_echo '' >> "conftest.nl"
1598+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
1599+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
1600+ ac_count=`expr $ac_count + 1`
1601+ if test $ac_count -gt ${ac_path_SED_max-0}; then
1602+ # Best one so far, save it but keep looking for a better one
1603+ ac_cv_path_SED="$ac_path_SED"
1604+ ac_path_SED_max=$ac_count
1605+ fi
1606+ # 10*(2^10) chars as input seems more than enough
1607+ test $ac_count -gt 10 && break
1608+ done
1609+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
1610+esac
1611+
1612+ $ac_path_SED_found && break 3
1613+ done
1614+ done
1615+done
1616+IFS=$as_save_IFS
1617+ if test -z "$ac_cv_path_SED"; then
1618+ { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
1619+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
1620+ { (exit 1); exit 1; }; }
1621+ fi
1622+else
1623+ ac_cv_path_SED=$SED
1624+fi
1625+
1626+fi
1627+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
1628+$as_echo "$ac_cv_path_SED" >&6; }
1629+ SED="$ac_cv_path_SED"
1630+ rm -f conftest.sed
1631+
1632+
1633 # Grab target_cpu, so we can use it in the Solaris pkginfo file
1634 # Make sure we can run config.sub.
1635 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1636@@ -4480,7 +4554,7 @@
1637 cd apr
1638
1639 # A "../" for each directory in /$config_subdirs.
1640- ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1641+ ac_dots=`echo $apr_config_subdirs| $SED -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1642
1643 # Make the cache file name correct relative to the subdirectory.
1644 case "$cache_file" in
1645@@ -4847,7 +4921,7 @@
1646 cd apr-util
1647
1648 # A "../" for each directory in /$config_subdirs.
1649- ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1650+ ac_dots=`echo $apr_config_subdirs| $SED -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1651
1652 # Make the cache file name correct relative to the subdirectory.
1653 case "$cache_file" in
1654@@ -5018,8 +5092,8 @@
1655
1656 # Either a space-separated list of allowable Neon versions, or "any" to
1657 # mean allow anything.
1658-NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28"
1659-NEON_RECOMMENDED_VER=0.28.4
1660+NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28 0\.29"
1661+NEON_RECOMMENDED_VER="0.29.0"
1662 NEON_URL="http://www.webdav.org/neon/neon-${NEON_RECOMMENDED_VER}.tar.gz"
1663 # Check whether --enable-neon-version-check was given.
1664 if test "${enable_neon_version_check+set}" = set; then
1665@@ -5063,7 +5137,7 @@
1666 if test "$NEON_PKG_CONFIG" = "yes" ; then
1667 NEON_VERSION=`$PKG_CONFIG neon --modversion`
1668 else
1669- NEON_VERSION=`$neon_config --version | sed -e 's/^neon //'`
1670+ NEON_VERSION=`$neon_config --version | $SED -e 's/^neon //'`
1671 fi
1672 { $as_echo "$as_me:$LINENO: result: $NEON_VERSION" >&5
1673 $as_echo "$NEON_VERSION" >&6; }
1674@@ -5097,8 +5171,8 @@
1675 test "$svn_allowed_neon" = "any"; then
1676 svn_allowed_neon_on_system="yes"
1677 if test "$NEON_PKG_CONFIG" = "yes"; then
1678- SVN_NEON_INCLUDES=`$PKG_CONFIG neon --cflags | sed -e 's/-D[^ ]*//g'`
1679- CFLAGS="$CFLAGS `$PKG_CONFIG neon --cflags | sed -e 's/-I[^ ]*//g'`"
1680+ SVN_NEON_INCLUDES=`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`
1681+ CFLAGS="$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/-I[^ ]*//g'`"
1682 old_CFLAGS="$CFLAGS"
1683 old_LIBS="$LIBS"
1684 NEON_LIBS=`$PKG_CONFIG neon --libs`
1685@@ -5188,8 +5262,8 @@
1686 CFLAGS="$old_CFLAGS"
1687 LIBS="$old_LIBS"
1688 else
1689- SVN_NEON_INCLUDES=`$neon_config --cflags | sed -e 's/-D[^ ]*//g'`
1690- CFLAGS="$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"
1691+ SVN_NEON_INCLUDES=`$neon_config --cflags | $SED -e 's/-D[^ ]*//g'`
1692+ CFLAGS="$CFLAGS `$neon_config --cflags | $SED -e 's/-I[^ ]*//g'`"
1693 NEON_LIBS=`$neon_config --libs`
1694 fi
1695 svn_lib_neon="yes"
1696@@ -5413,7 +5487,7 @@
1697 cd neon
1698
1699 # A "../" for each directory in /$config_subdirs.
1700- ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1701+ ac_dots=`echo $apr_config_subdirs| $SED -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1702
1703 # Make the cache file name correct relative to the subdirectory.
1704 case "$cache_file" in
1705@@ -5544,7 +5618,7 @@
1706 if test "$NEON_PKG_CONFIG" = "yes" ; then
1707 NEON_VERSION=`$PKG_CONFIG neon --modversion`
1708 else
1709- NEON_VERSION=`$neon_config --version | sed -e 's/^neon //'`
1710+ NEON_VERSION=`$neon_config --version | $SED -e 's/^neon //'`
1711 fi
1712 { $as_echo "$as_me:$LINENO: result: $NEON_VERSION" >&5
1713 $as_echo "$NEON_VERSION" >&6; }
1714@@ -5578,8 +5652,8 @@
1715 test "$svn_allowed_neon" = "any"; then
1716 svn_allowed_neon_on_system="yes"
1717 if test "$NEON_PKG_CONFIG" = "yes"; then
1718- SVN_NEON_INCLUDES=`$PKG_CONFIG neon --cflags | sed -e 's/-D[^ ]*//g'`
1719- CFLAGS="$CFLAGS `$PKG_CONFIG neon --cflags | sed -e 's/-I[^ ]*//g'`"
1720+ SVN_NEON_INCLUDES=`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`
1721+ CFLAGS="$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/-I[^ ]*//g'`"
1722 old_CFLAGS="$CFLAGS"
1723 old_LIBS="$LIBS"
1724 NEON_LIBS=`$PKG_CONFIG neon --libs`
1725@@ -5669,8 +5743,8 @@
1726 CFLAGS="$old_CFLAGS"
1727 LIBS="$old_LIBS"
1728 else
1729- SVN_NEON_INCLUDES=`$neon_config --cflags | sed -e 's/-D[^ ]*//g'`
1730- CFLAGS="$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"
1731+ SVN_NEON_INCLUDES=`$neon_config --cflags | $SED -e 's/-D[^ ]*//g'`
1732+ CFLAGS="$CFLAGS `$neon_config --cflags | $SED -e 's/-I[^ ]*//g'`"
1733 NEON_LIBS=`$neon_config --libs`
1734 fi
1735 svn_lib_neon="yes"
1736@@ -6358,7 +6432,7 @@
1737 cd serf
1738
1739 # A "../" for each directory in /$config_subdirs.
1740- ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1741+ ac_dots=`echo $apr_config_subdirs| $SED -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1742
1743 # Make the cache file name correct relative to the subdirectory.
1744 case "$cache_file" in
1745@@ -6982,7 +7056,7 @@
1746 cd apr_memcache
1747
1748 # A "../" for each directory in /$config_subdirs.
1749- ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1750+ ac_dots=`echo $apr_config_subdirs| $SED -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
1751
1752 # Make the cache file name correct relative to the subdirectory.
1753 case "$cache_file" in
1754@@ -8603,7 +8677,7 @@
1755 ;;
1756 *-*-irix6*)
1757 # Find out which ABI we are using.
1758- echo '#line 8606 "configure"' > conftest.$ac_ext
1759+ echo '#line 8680 "configure"' > conftest.$ac_ext
1760 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1761 (eval $ac_compile) 2>&5
1762 ac_status=$?
1763@@ -10724,11 +10798,11 @@
1764 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1765 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1766 -e 's:$: $lt_compiler_flag:'`
1767- (eval echo "\"\$as_me:10727: $lt_compile\"" >&5)
1768+ (eval echo "\"\$as_me:10801: $lt_compile\"" >&5)
1769 (eval "$lt_compile" 2>conftest.err)
1770 ac_status=$?
1771 cat conftest.err >&5
1772- echo "$as_me:10731: \$? = $ac_status" >&5
1773+ echo "$as_me:10805: \$? = $ac_status" >&5
1774 if (exit $ac_status) && test -s "$ac_outfile"; then
1775 # The compiler can only warn and ignore the option if not recognized
1776 # So say no if there are warnings other than the usual output.
1777@@ -11014,11 +11088,11 @@
1778 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1779 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1780 -e 's:$: $lt_compiler_flag:'`
1781- (eval echo "\"\$as_me:11017: $lt_compile\"" >&5)
1782+ (eval echo "\"\$as_me:11091: $lt_compile\"" >&5)
1783 (eval "$lt_compile" 2>conftest.err)
1784 ac_status=$?
1785 cat conftest.err >&5
1786- echo "$as_me:11021: \$? = $ac_status" >&5
1787+ echo "$as_me:11095: \$? = $ac_status" >&5
1788 if (exit $ac_status) && test -s "$ac_outfile"; then
1789 # The compiler can only warn and ignore the option if not recognized
1790 # So say no if there are warnings other than the usual output.
1791@@ -11118,11 +11192,11 @@
1792 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1793 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1794 -e 's:$: $lt_compiler_flag:'`
1795- (eval echo "\"\$as_me:11121: $lt_compile\"" >&5)
1796+ (eval echo "\"\$as_me:11195: $lt_compile\"" >&5)
1797 (eval "$lt_compile" 2>out/conftest.err)
1798 ac_status=$?
1799 cat out/conftest.err >&5
1800- echo "$as_me:11125: \$? = $ac_status" >&5
1801+ echo "$as_me:11199: \$? = $ac_status" >&5
1802 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1803 then
1804 # The compiler can only warn and ignore the option if not recognized
1805@@ -13518,7 +13592,7 @@
1806 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1807 lt_status=$lt_dlunknown
1808 cat > conftest.$ac_ext <<EOF
1809-#line 13521 "configure"
1810+#line 13595 "configure"
1811 #include "confdefs.h"
1812
1813 #if HAVE_DLFCN_H
1814@@ -13618,7 +13692,7 @@
1815 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1816 lt_status=$lt_dlunknown
1817 cat > conftest.$ac_ext <<EOF
1818-#line 13621 "configure"
1819+#line 13695 "configure"
1820 #include "confdefs.h"
1821
1822 #if HAVE_DLFCN_H
1823@@ -16031,11 +16105,11 @@
1824 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1825 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1826 -e 's:$: $lt_compiler_flag:'`
1827- (eval echo "\"\$as_me:16034: $lt_compile\"" >&5)
1828+ (eval echo "\"\$as_me:16108: $lt_compile\"" >&5)
1829 (eval "$lt_compile" 2>conftest.err)
1830 ac_status=$?
1831 cat conftest.err >&5
1832- echo "$as_me:16038: \$? = $ac_status" >&5
1833+ echo "$as_me:16112: \$? = $ac_status" >&5
1834 if (exit $ac_status) && test -s "$ac_outfile"; then
1835 # The compiler can only warn and ignore the option if not recognized
1836 # So say no if there are warnings other than the usual output.
1837@@ -16135,11 +16209,11 @@
1838 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1839 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1840 -e 's:$: $lt_compiler_flag:'`
1841- (eval echo "\"\$as_me:16138: $lt_compile\"" >&5)
1842+ (eval echo "\"\$as_me:16212: $lt_compile\"" >&5)
1843 (eval "$lt_compile" 2>out/conftest.err)
1844 ac_status=$?
1845 cat out/conftest.err >&5
1846- echo "$as_me:16142: \$? = $ac_status" >&5
1847+ echo "$as_me:16216: \$? = $ac_status" >&5
1848 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1849 then
1850 # The compiler can only warn and ignore the option if not recognized
1851@@ -17718,11 +17792,11 @@
1852 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1853 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1854 -e 's:$: $lt_compiler_flag:'`
1855- (eval echo "\"\$as_me:17721: $lt_compile\"" >&5)
1856+ (eval echo "\"\$as_me:17795: $lt_compile\"" >&5)
1857 (eval "$lt_compile" 2>conftest.err)
1858 ac_status=$?
1859 cat conftest.err >&5
1860- echo "$as_me:17725: \$? = $ac_status" >&5
1861+ echo "$as_me:17799: \$? = $ac_status" >&5
1862 if (exit $ac_status) && test -s "$ac_outfile"; then
1863 # The compiler can only warn and ignore the option if not recognized
1864 # So say no if there are warnings other than the usual output.
1865@@ -17822,11 +17896,11 @@
1866 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1867 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1868 -e 's:$: $lt_compiler_flag:'`
1869- (eval echo "\"\$as_me:17825: $lt_compile\"" >&5)
1870+ (eval echo "\"\$as_me:17899: $lt_compile\"" >&5)
1871 (eval "$lt_compile" 2>out/conftest.err)
1872 ac_status=$?
1873 cat out/conftest.err >&5
1874- echo "$as_me:17829: \$? = $ac_status" >&5
1875+ echo "$as_me:17903: \$? = $ac_status" >&5
1876 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1877 then
1878 # The compiler can only warn and ignore the option if not recognized
1879@@ -20041,11 +20115,11 @@
1880 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1881 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1882 -e 's:$: $lt_compiler_flag:'`
1883- (eval echo "\"\$as_me:20044: $lt_compile\"" >&5)
1884+ (eval echo "\"\$as_me:20118: $lt_compile\"" >&5)
1885 (eval "$lt_compile" 2>conftest.err)
1886 ac_status=$?
1887 cat conftest.err >&5
1888- echo "$as_me:20048: \$? = $ac_status" >&5
1889+ echo "$as_me:20122: \$? = $ac_status" >&5
1890 if (exit $ac_status) && test -s "$ac_outfile"; then
1891 # The compiler can only warn and ignore the option if not recognized
1892 # So say no if there are warnings other than the usual output.
1893@@ -20331,11 +20405,11 @@
1894 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1895 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1896 -e 's:$: $lt_compiler_flag:'`
1897- (eval echo "\"\$as_me:20334: $lt_compile\"" >&5)
1898+ (eval echo "\"\$as_me:20408: $lt_compile\"" >&5)
1899 (eval "$lt_compile" 2>conftest.err)
1900 ac_status=$?
1901 cat conftest.err >&5
1902- echo "$as_me:20338: \$? = $ac_status" >&5
1903+ echo "$as_me:20412: \$? = $ac_status" >&5
1904 if (exit $ac_status) && test -s "$ac_outfile"; then
1905 # The compiler can only warn and ignore the option if not recognized
1906 # So say no if there are warnings other than the usual output.
1907@@ -20435,11 +20509,11 @@
1908 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1909 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1910 -e 's:$: $lt_compiler_flag:'`
1911- (eval echo "\"\$as_me:20438: $lt_compile\"" >&5)
1912+ (eval echo "\"\$as_me:20512: $lt_compile\"" >&5)
1913 (eval "$lt_compile" 2>out/conftest.err)
1914 ac_status=$?
1915 cat out/conftest.err >&5
1916- echo "$as_me:20442: \$? = $ac_status" >&5
1917+ echo "$as_me:20516: \$? = $ac_status" >&5
1918 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1919 then
1920 # The compiler can only warn and ignore the option if not recognized
1921@@ -23365,17 +23439,17 @@
1922 fi
1923 else
1924 if echo "$withval" | $EGREP ":.*:.*:" > /dev/null; then
1925- svn_berkeley_db_header="`echo "$withval" | sed -e "s/\([^:]*\):.*/\1/"`"
1926+ svn_berkeley_db_header="`echo "$withval" | $SED -e "s/\([^:]*\):.*/\1/"`"
1927 SVN_DB_INCLUDES=""
1928- for i in `echo "$withval" | sed -e "s/.*:\([^:]*\):[^:]*:.*/\1/"`; do
1929+ for i in `echo "$withval" | $SED -e "s/.*:\([^:]*\):[^:]*:.*/\1/"`; do
1930 SVN_DB_INCLUDES="$SVN_DB_INCLUDES -I$i"
1931 done
1932 SVN_DB_INCLUDES="${SVN_DB_INCLUDES## }"
1933- for l in `echo "$withval" | sed -e "s/.*:[^:]*:\([^:]*\):.*/\1/"`; do
1934+ for l in `echo "$withval" | $SED -e "s/.*:[^:]*:\([^:]*\):.*/\1/"`; do
1935 LDFLAGS="$LDFLAGS -L$l"
1936 done
1937 SVN_DB_LIBS=""
1938- for l in `echo "$withval" | sed -e "s/.*:\([^:]*\)/\1/"`; do
1939+ for l in `echo "$withval" | $SED -e "s/.*:\([^:]*\)/\1/"`; do
1940 SVN_DB_LIBS="$SVN_DB_LIBS -l$l"
1941 done
1942 SVN_DB_LIBS="${SVN_DB_LIBS## }"
1943@@ -23431,7 +23505,7 @@
1944 # Or that it resides in a non-standard location which we would have
1945 # to compensate with using something like -R`$apu_config --prefix`/lib.
1946 #
1947- SVN_DB_LIBS="${SVN_DB_LIBS-`$apu_config --libs | sed -e 's/.*\(-ldb[^[:space:]]*\).*/\1/' | $EGREP -- '-ldb[^[:space:]]*'`}"
1948+ SVN_DB_LIBS="${SVN_DB_LIBS-`$apu_config --libs | $SED -e 's/.*\(-ldb[^[:space:]]*\).*/\1/' | $EGREP -- '-ldb[^[:space:]]*'`}"
1949
1950 CPPFLAGS="$SVN_DB_INCLUDES $SVN_APRUTIL_INCLUDES $CPPFLAGS"
1951 LIBS="`$apu_config --ldflags` $SVN_DB_LIBS $LIBS"
1952@@ -25391,8 +25465,10 @@
1953 old_CXXFLAGS="$CXXFLAGS"
1954 old_LDFLAGS="$LDFLAGS"
1955 old_LIBS="$LIBS"
1956- for d in `$PKG_CONFIG --cflags QtCore QtDBus QtGui | $GREP -o -- -D[^[:space:]]*`; do
1957- CPPFLAGS="$CPPFLAGS $d"
1958+ for d in `$PKG_CONFIG --cflags QtCore QtDBus QtGui`; do
1959+ if test -n "`echo "$d" | $GREP -- '^-D[^[:space:]]*'`"; then
1960+ CPPFLAGS="$CPPFLAGS $d"
1961+ fi
1962 done
1963 qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`"
1964 kde_dir="`$kde4_config --prefix`"
1965@@ -25527,7 +25603,7 @@
1966
1967 if test "$svn_lib_berkeley_db" = "yes"; then
1968 BUILD_RULES="$BUILD_RULES bdb-lib bdb-test"
1969- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`"
1970+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`"
1971 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib"
1972 BDB_TEST_DEPS="\$(BDB_TEST_DEPS)"
1973 BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)"
1974@@ -25535,25 +25611,25 @@
1975
1976 if test "$svn_lib_neon" = "yes"; then
1977 BUILD_RULES="$BUILD_RULES neon-lib"
1978- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-neon-lib/'`"
1979+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-neon-lib/'`"
1980 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-neon-lib"
1981 fi
1982
1983 if test "$svn_lib_serf" = "yes"; then
1984 BUILD_RULES="$BUILD_RULES serf-lib"
1985- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`"
1986+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`"
1987 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib"
1988 fi
1989
1990 if test "$svn_lib_kwallet" = "yes"; then
1991 BUILD_RULES="$BUILD_RULES kwallet-lib"
1992- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-lib/install-lib install-kwallet-lib/'`"
1993+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-kwallet-lib/'`"
1994 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib"
1995 fi
1996
1997 if test "$with_gnome_keyring" = "yes"; then
1998 BUILD_RULES="$BUILD_RULES gnome-keyring-lib"
1999- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-lib/install-lib install-gnome-keyring-lib/'`"
2000+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`"
2001 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"
2002 fi
2003
2004@@ -26579,13 +26655,13 @@
2005
2006
2007 if test "$enable_debugging" = "yes" ; then
2008- CFLAGS="`echo $CFLAGS' ' | sed -e 's/-O[^ ]* //g'`"
2009- CXXFLAGS="`echo $CXXFLAGS' ' | sed -e 's/-O[^ ]* //g'`"
2010+ CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"
2011+ CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"
2012 CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG"
2013 CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG"
2014 elif test "$enable_debugging" = "no" ; then
2015- CFLAGS="`echo $CFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"
2016- CXXFLAGS="`echo $CXXFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"
2017+ CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`"
2018+ CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`"
2019 CFLAGS="$CFLAGS -DNDEBUG"
2020 CXXFLAGS="$CXXFLAGS -DNDEBUG"
2021 # elif test "$enable_debugging" = "maybe" ; then
2022@@ -27884,7 +27960,7 @@
2023 { $as_echo "$as_me:$LINENO: checking swig version" >&5
2024 $as_echo_n "checking swig version... " >&6; }
2025 SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \
2026- sed -ne 's/^.*Version \(.*\)$/\1/p'`"
2027+ $SED -ne 's/^.*Version \(.*\)$/\1/p'`"
2028 # We want the version as an integer so we can test against
2029 # which version we're using. SWIG doesn't provide this
2030 # to us so we have to come up with it on our own.
2031@@ -27893,7 +27969,7 @@
2032 # and the patch level is zero padded to three places.
2033 # e.g. 1.3.24 becomes 103024
2034 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \
2035- sed -e 's/[^0-9\.].*$//' \
2036+ $SED -e 's/[^0-9\.].*$//' \
2037 -e 's/\.\([0-9]\)$/.0\1/' \
2038 -e 's/\.\([0-9][0-9]\)$/.0\1/' \
2039 -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`"
2040@@ -28113,7 +28189,7 @@
2041 else
2042
2043 # Ruby doesn't like '-ansi', so strip that out of CFLAGS
2044- svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | sed -e "s/ -ansi//g"`"
2045+ svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | $SED -e "s/ -ansi//g"`"
2046
2047 fi
2048 { $as_echo "$as_me:$LINENO: result: $svn_cv_ruby_compile" >&5
2049@@ -28153,7 +28229,7 @@
2050 $as_echo_n "checking for rb_errinfo... " >&6; }
2051 old_CFLAGS="$CFLAGS"
2052 old_LIBS="$LIBS"
2053- CFLAGS="`echo $CFLAGS | sed -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2054+ CFLAGS="`echo $CFLAGS | $SED -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2055 LIBS="$SWIG_RB_LIBS"
2056 cat >conftest.$ac_ext <<_ACEOF
2057
2058@@ -28232,7 +28308,7 @@
2059 else
2060
2061 svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
2062- sed -e "s,^$rbconfig_sitedir,,"`"
2063+ $SED -e "s,^$rbconfig_sitedir,,"`"
2064
2065 fi
2066
2067@@ -28247,7 +28323,7 @@
2068 else
2069
2070 svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
2071- sed -e "s,^$rbconfig_sitedir,,"`"
2072+ $SED -e "s,^$rbconfig_sitedir,,"`"
2073
2074 fi
2075
2076@@ -28397,7 +28473,7 @@
2077 { $as_echo "$as_me:$LINENO: checking swig version" >&5
2078 $as_echo_n "checking swig version... " >&6; }
2079 SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \
2080- sed -ne 's/^.*Version \(.*\)$/\1/p'`"
2081+ $SED -ne 's/^.*Version \(.*\)$/\1/p'`"
2082 # We want the version as an integer so we can test against
2083 # which version we're using. SWIG doesn't provide this
2084 # to us so we have to come up with it on our own.
2085@@ -28406,7 +28482,7 @@
2086 # and the patch level is zero padded to three places.
2087 # e.g. 1.3.24 becomes 103024
2088 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \
2089- sed -e 's/[^0-9\.].*$//' \
2090+ $SED -e 's/[^0-9\.].*$//' \
2091 -e 's/\.\([0-9]\)$/.0\1/' \
2092 -e 's/\.\([0-9][0-9]\)$/.0\1/' \
2093 -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`"
2094@@ -28626,7 +28702,7 @@
2095 else
2096
2097 # Ruby doesn't like '-ansi', so strip that out of CFLAGS
2098- svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | sed -e "s/ -ansi//g"`"
2099+ svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | $SED -e "s/ -ansi//g"`"
2100
2101 fi
2102 { $as_echo "$as_me:$LINENO: result: $svn_cv_ruby_compile" >&5
2103@@ -28666,7 +28742,7 @@
2104 $as_echo_n "checking for rb_errinfo... " >&6; }
2105 old_CFLAGS="$CFLAGS"
2106 old_LIBS="$LIBS"
2107- CFLAGS="`echo $CFLAGS | sed -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2108+ CFLAGS="`echo $CFLAGS | $SED -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2109 LIBS="$SWIG_RB_LIBS"
2110 cat >conftest.$ac_ext <<_ACEOF
2111
2112@@ -28745,7 +28821,7 @@
2113 else
2114
2115 svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
2116- sed -e "s,^$rbconfig_sitedir,,"`"
2117+ $SED -e "s,^$rbconfig_sitedir,,"`"
2118
2119 fi
2120
2121@@ -28760,7 +28836,7 @@
2122 else
2123
2124 svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
2125- sed -e "s,^$rbconfig_sitedir,,"`"
2126+ $SED -e "s,^$rbconfig_sitedir,,"`"
2127
2128 fi
2129
2130@@ -28910,7 +28986,7 @@
2131 { $as_echo "$as_me:$LINENO: checking swig version" >&5
2132 $as_echo_n "checking swig version... " >&6; }
2133 SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \
2134- sed -ne 's/^.*Version \(.*\)$/\1/p'`"
2135+ $SED -ne 's/^.*Version \(.*\)$/\1/p'`"
2136 # We want the version as an integer so we can test against
2137 # which version we're using. SWIG doesn't provide this
2138 # to us so we have to come up with it on our own.
2139@@ -28919,7 +28995,7 @@
2140 # and the patch level is zero padded to three places.
2141 # e.g. 1.3.24 becomes 103024
2142 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \
2143- sed -e 's/[^0-9\.].*$//' \
2144+ $SED -e 's/[^0-9\.].*$//' \
2145 -e 's/\.\([0-9]\)$/.0\1/' \
2146 -e 's/\.\([0-9][0-9]\)$/.0\1/' \
2147 -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`"
2148@@ -29139,7 +29215,7 @@
2149 else
2150
2151 # Ruby doesn't like '-ansi', so strip that out of CFLAGS
2152- svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | sed -e "s/ -ansi//g"`"
2153+ svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | $SED -e "s/ -ansi//g"`"
2154
2155 fi
2156 { $as_echo "$as_me:$LINENO: result: $svn_cv_ruby_compile" >&5
2157@@ -29179,7 +29255,7 @@
2158 $as_echo_n "checking for rb_errinfo... " >&6; }
2159 old_CFLAGS="$CFLAGS"
2160 old_LIBS="$LIBS"
2161- CFLAGS="`echo $CFLAGS | sed -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2162+ CFLAGS="`echo $CFLAGS | $SED -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2163 LIBS="$SWIG_RB_LIBS"
2164 cat >conftest.$ac_ext <<_ACEOF
2165
2166@@ -29258,7 +29334,7 @@
2167 else
2168
2169 svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
2170- sed -e "s,^$rbconfig_sitedir,,"`"
2171+ $SED -e "s,^$rbconfig_sitedir,,"`"
2172
2173 fi
2174
2175@@ -29273,7 +29349,7 @@
2176 else
2177
2178 svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
2179- sed -e "s,^$rbconfig_sitedir,,"`"
2180+ $SED -e "s,^$rbconfig_sitedir,,"`"
2181
2182 fi
2183
2184@@ -29426,7 +29502,7 @@
2185 { $as_echo "$as_me:$LINENO: checking swig version" >&5
2186 $as_echo_n "checking swig version... " >&6; }
2187 SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \
2188- sed -ne 's/^.*Version \(.*\)$/\1/p'`"
2189+ $SED -ne 's/^.*Version \(.*\)$/\1/p'`"
2190 # We want the version as an integer so we can test against
2191 # which version we're using. SWIG doesn't provide this
2192 # to us so we have to come up with it on our own.
2193@@ -29435,7 +29511,7 @@
2194 # and the patch level is zero padded to three places.
2195 # e.g. 1.3.24 becomes 103024
2196 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \
2197- sed -e 's/[^0-9\.].*$//' \
2198+ $SED -e 's/[^0-9\.].*$//' \
2199 -e 's/\.\([0-9]\)$/.0\1/' \
2200 -e 's/\.\([0-9][0-9]\)$/.0\1/' \
2201 -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`"
2202@@ -29655,7 +29731,7 @@
2203 else
2204
2205 # Ruby doesn't like '-ansi', so strip that out of CFLAGS
2206- svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | sed -e "s/ -ansi//g"`"
2207+ svn_cv_ruby_compile="$rbconfig_CC `echo $CFLAGS | $SED -e "s/ -ansi//g"`"
2208
2209 fi
2210 { $as_echo "$as_me:$LINENO: result: $svn_cv_ruby_compile" >&5
2211@@ -29695,7 +29771,7 @@
2212 $as_echo_n "checking for rb_errinfo... " >&6; }
2213 old_CFLAGS="$CFLAGS"
2214 old_LIBS="$LIBS"
2215- CFLAGS="`echo $CFLAGS | sed -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2216+ CFLAGS="`echo $CFLAGS | $SED -e "s/ -ansi//g"` $svn_cv_ruby_includes"
2217 LIBS="$SWIG_RB_LIBS"
2218 cat >conftest.$ac_ext <<_ACEOF
2219
2220@@ -29774,7 +29850,7 @@
2221 else
2222
2223 svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
2224- sed -e "s,^$rbconfig_sitedir,,"`"
2225+ $SED -e "s,^$rbconfig_sitedir,,"`"
2226
2227 fi
2228
2229@@ -29789,7 +29865,7 @@
2230 else
2231
2232 svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
2233- sed -e "s,^$rbconfig_sitedir,,"`"
2234+ $SED -e "s,^$rbconfig_sitedir,,"`"
2235
2236 fi
2237
2238@@ -30372,6 +30448,8 @@
2239 ac_config_files="$ac_config_files tools/backup/hot-backup.py"
2240
2241
2242+ SVN_CONFIG_SCRIPT_FILES="$SVN_CONFIG_SCRIPT_FILES contrib/client-side/svn_load_dirs/svn_load_dirs.pl"
2243+ ac_config_files="$ac_config_files contrib/client-side/svn_load_dirs/svn_load_dirs.pl"
2244
2245
2246 SVN_CONFIG_SCRIPT_FILES="$SVN_CONFIG_SCRIPT_FILES contrib/client-side/svncopy/svncopy.pl"
2247@@ -30818,7 +30896,7 @@
2248 # report actual input values of CONFIG_FILES etc. instead of their
2249 # values after options handling.
2250 ac_log="
2251-This file was extended by subversion $as_me 1.6.5, which was
2252+This file was extended by subversion $as_me 1.6.6, which was
2253 generated by GNU Autoconf 2.63. Invocation command line was
2254
2255 CONFIG_FILES = $CONFIG_FILES
2256@@ -30881,7 +30959,7 @@
2257 _ACEOF
2258 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2259 ac_cs_version="\\
2260-subversion config.status 1.6.5
2261+subversion config.status 1.6.6
2262 configured by $0, generated by GNU Autoconf 2.63,
2263 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
2264
2265@@ -30992,7 +31070,8 @@
2266 #
2267 # INIT-COMMANDS
2268 #
2269-SVN_DB_HEADER="$SVN_DB_HEADER"
2270+SED="$SED"
2271+ SVN_DB_HEADER="$SVN_DB_HEADER"
2272
2273 _ACEOF
2274
2275@@ -31006,6 +31085,7 @@
2276 "svn_private_config.h") CONFIG_COMMANDS="$CONFIG_COMMANDS svn_private_config.h" ;;
2277 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
2278 "tools/backup/hot-backup.py") CONFIG_FILES="$CONFIG_FILES tools/backup/hot-backup.py" ;;
2279+ "contrib/client-side/svn_load_dirs/svn_load_dirs.pl") CONFIG_FILES="$CONFIG_FILES contrib/client-side/svn_load_dirs/svn_load_dirs.pl" ;;
2280 "contrib/client-side/svncopy/svncopy.pl") CONFIG_FILES="$CONFIG_FILES contrib/client-side/svncopy/svncopy.pl" ;;
2281 "contrib/client-side/svncopy/testsvncopy.pl") CONFIG_FILES="$CONFIG_FILES contrib/client-side/svncopy/testsvncopy.pl" ;;
2282 "contrib/hook-scripts/commit-email.pl") CONFIG_FILES="$CONFIG_FILES contrib/hook-scripts/commit-email.pl" ;;
2283@@ -31626,9 +31706,10 @@
2284
2285
2286 case $ac_file$ac_mode in
2287- "svn_private_config.h":C) sed -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" subversion/svn_private_config.h > subversion/svn_private_config.h.new
2288+ "svn_private_config.h":C) $SED -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" subversion/svn_private_config.h > subversion/svn_private_config.h.new
2289 mv -f subversion/svn_private_config.h.new subversion/svn_private_config.h ;;
2290 "tools/backup/hot-backup.py":F) chmod +x tools/backup/hot-backup.py ;;
2291+ "contrib/client-side/svn_load_dirs/svn_load_dirs.pl":F) chmod +x contrib/client-side/svn_load_dirs/svn_load_dirs.pl ;;
2292 "contrib/client-side/svncopy/svncopy.pl":F) chmod +x contrib/client-side/svncopy/svncopy.pl ;;
2293 "contrib/client-side/svncopy/testsvncopy.pl":F) chmod +x contrib/client-side/svncopy/testsvncopy.pl ;;
2294 "contrib/hook-scripts/commit-email.pl":F) chmod +x contrib/hook-scripts/commit-email.pl ;;
2295
2296=== modified file 'configure.ac'
2297--- configure.ac 2009-08-24 19:09:22 +0000
2298+++ configure.ac 2009-12-12 13:21:14 +0000
2299@@ -40,6 +40,10 @@
2300 # Look for a C pre-processor
2301 AC_PROG_CPP
2302
2303+# Look for a good sed
2304+# AC_PROG_SED was introduced in Autoconf 2.59b
2305+m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [SED="${SED:-sed}"])
2306+
2307 # Grab target_cpu, so we can use it in the Solaris pkginfo file
2308 AC_CANONICAL_TARGET
2309
2310@@ -79,8 +83,8 @@
2311
2312 # Either a space-separated list of allowable Neon versions, or "any" to
2313 # mean allow anything.
2314-NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28"
2315-NEON_RECOMMENDED_VER=0.28.4
2316+NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28 0\.29"
2317+NEON_RECOMMENDED_VER="0.29.0"
2318 NEON_URL="http://www.webdav.org/neon/neon-${NEON_RECOMMENDED_VER}.tar.gz"
2319 dnl You can skip the neon version check only if you know what you are doing
2320 AC_ARG_ENABLE(neon-version-check,
2321@@ -532,7 +536,7 @@
2322
2323 if test "$svn_lib_berkeley_db" = "yes"; then
2324 BUILD_RULES="$BUILD_RULES bdb-lib bdb-test"
2325- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`"
2326+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`"
2327 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib"
2328 BDB_TEST_DEPS="\$(BDB_TEST_DEPS)"
2329 BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)"
2330@@ -540,25 +544,25 @@
2331
2332 if test "$svn_lib_neon" = "yes"; then
2333 BUILD_RULES="$BUILD_RULES neon-lib"
2334- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-neon-lib/'`"
2335+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-neon-lib/'`"
2336 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-neon-lib"
2337 fi
2338
2339 if test "$svn_lib_serf" = "yes"; then
2340 BUILD_RULES="$BUILD_RULES serf-lib"
2341- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`"
2342+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`"
2343 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib"
2344 fi
2345
2346 if test "$svn_lib_kwallet" = "yes"; then
2347 BUILD_RULES="$BUILD_RULES kwallet-lib"
2348- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-lib/install-lib install-kwallet-lib/'`"
2349+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-kwallet-lib/'`"
2350 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib"
2351 fi
2352
2353 if test "$with_gnome_keyring" = "yes"; then
2354 BUILD_RULES="$BUILD_RULES gnome-keyring-lib"
2355- INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-lib/install-lib install-gnome-keyring-lib/'`"
2356+ INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`"
2357 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"
2358 fi
2359
2360@@ -683,15 +687,15 @@
2361 if test "$enable_debugging" = "yes" ; then
2362 dnl At the moment, we don't want optimization, because we're
2363 dnl debugging.
2364- CFLAGS=["`echo $CFLAGS' ' | sed -e 's/-O[^ ]* //g'`"]
2365- CXXFLAGS=["`echo $CXXFLAGS' ' | sed -e 's/-O[^ ]* //g'`"]
2366+ CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
2367+ CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
2368 dnl SVN_DEBUG enables specific features for developer builds
2369 dnl AP_DEBUG enables specific (Apache) features for developer builds
2370 CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG"
2371 CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG"
2372 elif test "$enable_debugging" = "no" ; then
2373- CFLAGS=["`echo $CFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"]
2374- CXXFLAGS=["`echo $CXXFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"]
2375+ CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`"]
2376+ CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`"]
2377 dnl Compile with NDEBUG to get rid of assertions
2378 CFLAGS="$CFLAGS -DNDEBUG"
2379 CXXFLAGS="$CXXFLAGS -DNDEBUG"
2380@@ -989,12 +993,14 @@
2381
2382 AC_CONFIG_HEADERS(subversion/svn_private_config.h)
2383 AC_CONFIG_COMMANDS([svn_private_config.h],
2384- [sed -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" subversion/svn_private_config.h > subversion/svn_private_config.h.new
2385+ [$SED -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" subversion/svn_private_config.h > subversion/svn_private_config.h.new
2386 mv -f subversion/svn_private_config.h.new subversion/svn_private_config.h],
2387- [SVN_DB_HEADER="$SVN_DB_HEADER"])
2388+ [SED="$SED"
2389+ SVN_DB_HEADER="$SVN_DB_HEADER"])
2390 AC_CONFIG_FILES([Makefile])
2391
2392 SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
2393+SVN_CONFIG_SCRIPT(contrib/client-side/svn_load_dirs/svn_load_dirs.pl)
2394 SVN_CONFIG_SCRIPT(contrib/client-side/svncopy/svncopy.pl)
2395 SVN_CONFIG_SCRIPT(contrib/client-side/svncopy/testsvncopy.pl)
2396 SVN_CONFIG_SCRIPT(contrib/hook-scripts/commit-email.pl)
2397
2398=== added directory 'contrib/client-side/svn_load_dirs'
2399=== added file 'contrib/client-side/svn_load_dirs/LICENSE_AFL3.txt'
2400--- contrib/client-side/svn_load_dirs/LICENSE_AFL3.txt 1970-01-01 00:00:00 +0000
2401+++ contrib/client-side/svn_load_dirs/LICENSE_AFL3.txt 2009-12-12 13:21:15 +0000
2402@@ -0,0 +1,190 @@
2403+http://www.opensource.org/licenses/academic.php
2404+
2405+Academic Free License ("AFL") v. 3.0
2406+
2407+This Academic Free License (the "License") applies to any original
2408+work of authorship (the "Original Work") whose owner (the "Licensor")
2409+has placed the following licensing notice adjacent to the copyright
2410+notice for the Original Work:
2411+
2412+ Licensed under the Academic Free License version 3.0
2413+
2414+ 1) Grant of Copyright License. Licensor grants You a worldwide,
2415+ royalty-free, non-exclusive, sublicensable license, for the
2416+ duration of the copyright, to do the following:
2417+ a) to reproduce the Original Work in copies, either alone or as
2418+ part of a collective work;
2419+ b) to translate, adapt, alter, transform, modify, or arrange the
2420+ Original Work, thereby creating derivative works ("Derivative
2421+ Works") based upon the Original Work;
2422+ c) to distribute or communicate copies of the Original Work and
2423+ Derivative Works to the public, under any license of your
2424+ choice that does not contradict the terms and conditions,
2425+ including Licensor's reserved rights and remedies, in this
2426+ Academic Free License;
2427+ d) to perform the Original Work publicly; and
2428+ e) to display the Original Work publicly.
2429+
2430+ 2) Grant of Patent License. Licensor grants You a worldwide,
2431+ royalty-free, non- exclusive, sublicensable license, under patent
2432+ claims owned or controlled by the Licensor that are embodied in
2433+ the Original Work as furnished by the Licensor, for the duration
2434+ of the patents, to make, use, sell, offer for sale, have made, and
2435+ import the Original Work and Derivative Works.
2436+
2437+ 3) Grant of Source Code License. The term "Source Code" means the
2438+ preferred form of the Original Work for making modifications to it
2439+ and all available documentation describing how to modify the
2440+ Original Work. Licensor agrees to provide a machine-readable copy
2441+ of the Source Code of the Original Work along with each copy of
2442+ the Original Work that Licensor distributes. Licensor reserves the
2443+ right to satisfy this obligation by placing a machine-readable
2444+ copy of the Source Code in an information repository reasonably
2445+ calculated to permit inexpensive and convenient access by You for
2446+ as long as Licensor continues to distribute the Original Work.
2447+
2448+ 4) Exclusions From License Grant. Neither the names of Licensor, nor
2449+ the names of any contributors to the Original Work, nor any of
2450+ their trademarks or service marks, may be used to endorse or
2451+ promote products derived from this Original Work without express
2452+ prior permission of the Licensor. Except as expressly stated
2453+ herein, nothing in this License grants any license to Licensor's
2454+ trademarks, copyrights, patents, trade secrets or any other
2455+ intellectual property. No patent license is granted to make, use,
2456+ sell, offer for sale, have made, or import embodiments of any
2457+ patent claims other than the licensed claims defined in Section
2458+ 2. No license is granted to the trademarks of Licensor even if
2459+ such marks are included in the Original Work. Nothing in this
2460+ License shall be interpreted to prohibit Licensor from licensing
2461+ under terms different from this License any Original Work that
2462+ Licensor otherwise would have a right to license.
2463+
2464+ 5) External Deployment. The term "External Deployment" means the use,
2465+ distribution, or communication of the Original Work or Derivative
2466+ Works in any way such that the Original Work or Derivative Works
2467+ may be used by anyone other than You, whether those works are
2468+ distributed or communicated to those persons or made available as
2469+ an application intended for use over a network. As an express
2470+ condition for the grants of license hereunder, You must treat any
2471+ External Deployment by You of the Original Work or a Derivative
2472+ Work as a distribution under section 1(c).
2473+
2474+ 6) Attribution Rights. You must retain, in the Source Code of any
2475+ Derivative Works that You create, all copyright, patent, or
2476+ trademark notices from the Source Code of the Original Work, as
2477+ well as any notices of licensing and any descriptive text
2478+ identified therein as an "Attribution Notice." You must cause the
2479+ Source Code for any Derivative Works that You create to carry a
2480+ prominent Attribution Notice reasonably calculated to inform
2481+ recipients that You have modified the Original Work.
2482+
2483+ 7) Warranty of Provenance and Disclaimer of Warranty. Licensor
2484+ warrants that the copyright in and to the Original Work and the
2485+ patent rights granted herein by Licensor are owned by the Licensor
2486+ or are sublicensed to You under the terms of this License with the
2487+ permission of the contributor(s) of those copyrights and patent
2488+ rights. Except as expressly stated in the immediately preceding
2489+ sentence, the Original Work is provided under this License on an
2490+ "AS IS" BASIS and WITHOUT WARRANTY, either express or implied,
2491+ including, without limitation, the warranties of non-infringement,
2492+ merchantability or fitness for a particular purpose. THE ENTIRE
2493+ RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This
2494+ DISCLAIMER OF WARRANTY constitutes an essential part of this
2495+ License. No license to the Original Work is granted by this
2496+ License except under this disclaimer.
2497+
2498+ 8) Limitation of Liability. Under no circumstances and under no legal
2499+ theory, whether in tort (including negligence), contract, or
2500+ otherwise, shall the Licensor be liable to anyone for any
2501+ indirect, special, incidental, or consequential damages of any
2502+ character arising as a result of this License or the use of the
2503+ Original Work including, without limitation, damages for loss of
2504+ goodwill, work stoppage, computer failure or malfunction, or any
2505+ and all other commercial damages or losses. This limitation of
2506+ liability shall not apply to the extent applicable law prohibits
2507+ such limitation.
2508+
2509+ 9) Acceptance and Termination. If, at any time, You expressly
2510+ assented to this License, that assent indicates your clear and
2511+ irrevocable acceptance of this License and all of its terms and
2512+ conditions. If You distribute or communicate copies of the
2513+ Original Work or a Derivative Work, You must make a reasonable
2514+ effort under the circumstances to obtain the express assent of
2515+ recipients to the terms of this License. This License conditions
2516+ your rights to undertake the activities listed in Section 1,
2517+ including your right to create Derivative Works based upon the
2518+ Original Work, and doing so without honoring these terms and
2519+ conditions is prohibited by copyright law and international
2520+ treaty. Nothing in this License is intended to affect copyright
2521+ exceptions and limitations (including "fair use" or "fair
2522+ dealing"). This License shall terminate immediately and You may no
2523+ longer exercise any of the rights granted to You by this License
2524+ upon your failure to honor the conditions in Section 1(c).
2525+
2526+10) Termination for Patent Action. This License shall terminate
2527+ automatically and You may no longer exercise any of the rights
2528+ granted to You by this License as of the date You commence an
2529+ action, including a cross-claim or counterclaim, against Licensor
2530+ or any licensee alleging that the Original Work infringes a
2531+ patent. This termination provision shall not apply for an action
2532+ alleging patent infringement by combinations of the Original Work
2533+ with other software or hardware.
2534+
2535+11) Jurisdiction, Venue and Governing Law. Any action or suit relating
2536+ to this License may be brought only in the courts of a
2537+ jurisdiction wherein the Licensor resides or in which Licensor
2538+ conducts its primary business, and under the laws of that
2539+ jurisdiction excluding its conflict-of-law provisions. The
2540+ application of the United Nations Convention on Contracts for the
2541+ International Sale of Goods is expressly excluded. Any use of the
2542+ Original Work outside the scope of this License or after its
2543+ termination shall be subject to the requirements and penalties of
2544+ copyright or patent law in the appropriate jurisdiction. This
2545+ section shall survive the termination of this License.
2546+
2547+12) Attorneys' Fees. In any action to enforce the terms of this
2548+ License or seeking damages relating thereto, the prevailing party
2549+ shall be entitled to recover its costs and expenses, including,
2550+ without limitation, reasonable attorneys' fees and costs incurred
2551+ in connection with such action, including any appeal of such
2552+ action. This section shall survive the termination of this
2553+ License.
2554+
2555+13) Miscellaneous. If any provision of this License is held to be
2556+ unenforceable, such provision shall be reformed only to the extent
2557+ necessary to make it enforceable.
2558+
2559+14) Definition of "You" in This License. "You" throughout this
2560+ License, whether in upper or lower case, means an individual or a
2561+ legal entity exercising rights under, and complying with all of
2562+ the terms of, this License. For legal entities, "You" includes any
2563+ entity that controls, is controlled by, or is under common control
2564+ with you. For purposes of this definition, "control" means (i) the
2565+ power, direct or indirect, to cause the direction or management of
2566+ such entity, whether by contract or otherwise, or (ii) ownership
2567+ of fifty percent (50%) or more of the outstanding shares, or (iii)
2568+ beneficial ownership of such entity.
2569+
2570+15) Right to Use. You may use the Original Work in all ways not
2571+ otherwise restricted or conditioned by this License or by law, and
2572+ Licensor promises not to interfere with or be responsible for such
2573+ uses by You.
2574+
2575+16) Modification of This License. This License is Copyright © 2005
2576+ Lawrence Rosen. Permission is granted to copy, distribute, or
2577+ communicate this License without modification. Nothing in this
2578+ License permits You to modify this License as applied to the
2579+ Original Work or to Derivative Works. However, You may modify the
2580+ text of this License and copy, distribute or communicate your
2581+ modified version (the "Modified License") and apply it to other
2582+ original works of authorship subject to the following conditions:
2583+ (i) You may not indicate in any way that your Modified License is
2584+ the "Academic Free License" or "AFL" and you may not use those
2585+ names in the name of your Modified License; (ii) You must replace
2586+ the notice specified in the first paragraph above with the notice
2587+ "Licensed under <insert your license name here>" or with a notice
2588+ of your own that is not confusingly similar to the notice in this
2589+ License; and (iii) You may not claim that your original works are
2590+ open source software unless your Modified License has been
2591+ approved by Open Source Initiative (OSI) and You comply with its
2592+ license review and certification process.
2593
2594=== added file 'contrib/client-side/svn_load_dirs/svn_load_dirs.README'
2595--- contrib/client-side/svn_load_dirs/svn_load_dirs.README 1970-01-01 00:00:00 +0000
2596+++ contrib/client-side/svn_load_dirs/svn_load_dirs.README 2009-12-12 13:21:14 +0000
2597@@ -0,0 +1,270 @@
2598+Introduction
2599+============
2600+
2601+This Perl script is designed to load a number of directories into
2602+Subversion. This is useful if you have a number of .zip's or
2603+tar.{Z,gz,bz2}'s for a particular package and want to load them into
2604+Subversion.
2605+
2606+Command Line Options
2607+====================
2608+
2609+Run the script with no command line arguments to see all the command
2610+line options it takes.
2611+
2612+When Not To Use This Script
2613+===========================
2614+
2615+This script assumes that these packages were not previously in a
2616+source control system, in particular CVS, because then you would use
2617+another script to migrate the repository over, and in CVS' case, you
2618+would use cvs2svn. This script will properly tag each release in the
2619+tags directory if you use the -t command line option.
2620+
2621+Automatically Setting Properties On New Files & Directories
2622+===========================================================
2623+
2624+The script also accepts a separate configuration file for applying
2625+properties to specific files and directories matching a regular
2626+expression that are *added* to the repository. This script will not
2627+modify properties of already existing files or directories in the
2628+repository. This configuration file is specified to svn_load_dirs.pl
2629+using the -p command line option. The format of the file is either
2630+two or four columns:
2631+
2632+regular_expression control property_name property_value
2633+
2634+ The `regular_expression' is a Perl style regular expression. It is
2635+ matched in a case-insensitive against filenames.
2636+
2637+ The `control' must either be set to `break' or `cont'. It is used
2638+ to tell svn_load_dirs.pl if the following lines in the
2639+ configuration file should be examined for a match or if all
2640+ matching should stop. If `control' is set to `break', then no more
2641+ lines from the configuration file will be matched. If `control' is
2642+ set to `cont', which is short for continue, then more comparisons
2643+ will be made. Multiple properties can be set for one file or
2644+ directory this way.
2645+
2646+ The last two, `property_name' and `property_value' are optional and
2647+ are applied to matching files and directories.
2648+
2649+If you have whitespace in any of the `regular_expression',
2650+`property_name' or `property_value' columns, you must surround the
2651+value with either a single or double quote. You can protect single or
2652+double quotes with a \ character. The \ character is removed by this
2653+script *only* for whitespace and quote characters, so you do not need
2654+to protect any other characters, beyond what you would normally
2655+protect for the regular expression.
2656+
2657+This sample configuration file was used to load on a Unix box a number
2658+of Zip files containing Windows files with CRLF end of lines.
2659+
2660+ \.doc$ break svn:mime-type application/msword
2661+ \.ds(p|w)$ break svn:eol-style CRLF
2662+ \.ilk$ break svn:eol-style CRLF
2663+ \.ncb$ break svn:eol-style CRLF
2664+ \.opt$ break svn:eol-style CRLF
2665+ \.exe$ break svn:mime-type application/octet-stream
2666+ dos2unix-eol\.sh$ break
2667+ .* break svn:eol-style native
2668+
2669+In this example, all the files should be converted to the native end
2670+of line style, which the last line of the configuration handles. The
2671+exception is dos2unix-eol.sh, which contains embedded CR's used to
2672+find and replace Windows CRLF end of line characters with Unix's LF
2673+characters. Since svn and svn_load_dirs.pl converts all CR, CRLF and
2674+LF's to the native end of line style when `svn:eol-style' is set to
2675+`native', this file should be left untouched. Hence, the `break' with
2676+no property settings.
2677+
2678+The Windows Visual C++ and Visual Studio files (*.dsp, *.dsw, etc.)
2679+should retain their CRLF line endings on any operating system and any
2680+*.doc files are always treated as binary files, hence the
2681+`svn:mime-type' setting of `application/msword'.
2682+
2683+Example Import
2684+==============
2685+
2686+An example import follows:
2687+
2688+Steps:
2689+
2690+1) Unpack your .tar.{Z,gz,bz2}'s or .zips into a directory that is not
2691+ in a Subversion repository.
2692+
2693+ Example:
2694+
2695+ I'll use an example from my Orca distribution:
2696+
2697+ % cd /tmp
2698+ % zcat orca-0.18.tar.gz | tar xf -
2699+ % zcat orca-0.27b2.tar.gz | tar xf -
2700+
2701+2) Decide on the directory structure you want to use to contain the
2702+ project you are loading.
2703+
2704+ There are three main directory structures you can use. If you have
2705+ a single project, then use the structure Subversion uses for
2706+ itself, that is
2707+
2708+ /branches
2709+ /tags
2710+ /trunk
2711+
2712+ and load the project into /trunk and the tags into the tags
2713+ directory.
2714+
2715+ If you have more than one project and you want to treat each
2716+ project separately, then use one of the following structures:
2717+
2718+ /branches
2719+ /tags
2720+ /tags/project1
2721+ /tags/project2
2722+ /tags/project3
2723+ /trunk
2724+ /trunk/project1
2725+ /trunk/project2
2726+ /trunk/project3
2727+
2728+ or
2729+
2730+ /project1/branches
2731+ /project1/tags
2732+ /project1/trunk
2733+ /project2/branches
2734+ /project2/tags
2735+ /project2/trunk
2736+
2737+ Example:
2738+
2739+ To load Orca using the second directory structure into the
2740+ subversion repository rooted at http://svn.orcaware.com:8000/repos
2741+
2742+ % cd /tmp
2743+ % svn co http://svn.orcaware.com:8000/repos
2744+ % cd repos
2745+ % mkdir tags tags/orca trunk trunk/orca
2746+ % svn add tags trunk
2747+ % svn commit -m 'Create initial directory tree structure for projects.'
2748+
2749+ This script will create any subdirectories required to import your
2750+ directories into the repository, so these steps may not be required.
2751+
2752+3) Decide on the URL to use to access the subversion repository with
2753+ this script and the relative directory paths to the directories to
2754+ import your project into and to place the tags into.
2755+
2756+ The usage of the script is
2757+
2758+ ./svn_load_dirs.pl [-t tag_dir] svn_url import_dir dir_v1 [dir_v2 [..]]
2759+
2760+ The import_dir and tag_dir command line options are directory paths
2761+ relative to svn_url and tell the script where to load your project
2762+ and optionally the tags. Both import_dir and tag_dir cannot
2763+ contain any ..'s and so svn_url must contain both import_dir and
2764+ tag_dir.
2765+
2766+ This script supports importing your directories into subdirectories
2767+ of the root of the subversion repository.
2768+
2769+ Example:
2770+
2771+ In the previous step, if you wanted to load a project named orca
2772+ into the second directory structure, say
2773+
2774+ /orca/branches
2775+ /orca/tags
2776+ /orca/trunk
2777+
2778+ and you didn't care about tags, then you could use as svn_url the
2779+ URL
2780+
2781+ http://svn.orcaware.com:8000/repos/orca
2782+
2783+ and use . as import_dir.
2784+
2785+ In this case, the script will only check out the orca subdirectory.
2786+ This is handy if the entire repository is very large and you don't
2787+ want this script to check the whole repository under /repos out to
2788+ load files into it.
2789+
2790+ The only caveat is that svn_url must exist already in the
2791+ repository. So in this case, you would have to already have
2792+ created the orca subdirectory in the repository.
2793+
2794+4) Decide on the tags you want on your directories. If you don't want
2795+ any tags, then ignore this step.
2796+
2797+ The script takes a -t command line argument that is a directory
2798+ path relative to the svn_url that you supply to this script from
2799+ step 3 above. Again, the URL from step 3 does not need to be the
2800+ URL of the root of the subversion repository, so you can work in
2801+ the subdirectory just fine.
2802+
2803+ Look at the directories that will be loaded into the repository and
2804+ come up with a Perl regular expression that matches only the
2805+ portion of the directory name that identifies each directory. You
2806+ may need to rename your directories so that they contain a version
2807+ number you can use to tag them properly.
2808+
2809+ The regular expression should be placed into the directory path
2810+ given to -t surrounded by @'s. Make sure to protect the regular
2811+ expression from the shell by using quotes.
2812+
2813+ You can have multiple sets of regular expressions in the directory
2814+ path.
2815+
2816+ There is no way to escape the @ characters.
2817+
2818+ Example:
2819+
2820+ For the Orca directories orca-0.18 and orca-0.27b2 I can use the
2821+ regular expression \d+\.\w+. I want the tags to be located in
2822+ the tags/orca/VERSION_NUMBER directory. So I would use:
2823+
2824+ -t 'tags/orca/@\d+\.\w+@'
2825+
2826+5) Back up your Subversion repository in case you are not happy with
2827+ the results of running the script or the script fails for some
2828+ reason.
2829+
2830+ Example:
2831+
2832+ % /opt/i386-linux/apache-2.0/bin/apachectl stop
2833+ % cd /export/svn
2834+ % tar cvf repos_backup.tar repos
2835+ % /opt/i386-linux/apache-2.0/bin/apachectl start
2836+
2837+6) Run this script. The first argument is the root of the Subversion
2838+ package directory where you want to install the directories. The
2839+ directories are loaded in order that they appear on the command
2840+ line.
2841+
2842+ Example:
2843+
2844+ svn_load_dirs.pl http://svn.orcaware.com:8000/repos \
2845+ trunk/orca -t 'tags/orca/@\d+\.\w+@' orca-0.18 orca-0.27b2
2846+
2847+ The output from this script are:
2848+
2849+ A Added file or directory.
2850+ U File's contents have been updated.
2851+ d File or directory is deleted because an enclosing directory is
2852+ deleted.
2853+ D File or directory is deleted.
2854+
2855+7) Check the results by either checking out a new tree and or browsing
2856+ the repository with a browser. If they are not what you want, back
2857+ out the changes.
2858+
2859+ Example:
2860+
2861+ These commands back out the changes:
2862+
2863+ % /opt/i386-linux/apache-2.0/bin/apachectl stop
2864+ % cd /export/svn
2865+ % rm -fr repos
2866+ % tar xvf repos_backup.tar
2867+ % /opt/i386-linux/apache-2.0/bin/apachectl start
2868
2869=== added file 'contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in'
2870--- contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in 1970-01-01 00:00:00 +0000
2871+++ contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in 2009-12-12 13:21:15 +0000
2872@@ -0,0 +1,2049 @@
2873+#!/usr/bin/perl -w
2874+
2875+# Copyright (c) 2002,2003,2004,2005,2006,2007,2009 Dolby. All rights reserved.
2876+#
2877+# Licensed under the Academic Free License version 3.0. See LICENSE_AFL3.txt
2878+# or http://www.opensource.org/licenses/academic.php for a copy of the license
2879+# text.
2880+
2881+# $HeadURL: http://svn.collab.net/repos/svn/branches/1.6.x/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in $
2882+# $LastChangedDate: 2009-10-12 12:57:16 +0000 (Mon, 12 Oct 2009) $
2883+# $LastChangedBy: hwright $
2884+# $LastChangedRevision: 39956 $
2885+
2886+$| = 1;
2887+
2888+use strict;
2889+use Carp;
2890+use Cwd;
2891+use Digest::MD5 2.20;
2892+use File::Copy 2.03;
2893+use File::Find;
2894+use File::Path 1.0404;
2895+use File::Temp 0.12 qw(tempdir tempfile);
2896+use Getopt::Long 2.25;
2897+use Text::Wrap;
2898+use URI 1.17;
2899+use English;
2900+
2901+$Text::Wrap::columns = 72;
2902+
2903+# Specify the location of the svn command.
2904+my $svn = '@SVN_BINDIR@/svn';
2905+
2906+# Process the command line options.
2907+
2908+# The base URL for the portion of the repository to work in. Note
2909+# that this does not have to be the root of the subversion repository,
2910+# it can point to a subdirectory in the repository.
2911+my $repos_base_url;
2912+
2913+# The relative path from the repository base URL to work in to the
2914+# directory to load the input directories into.
2915+my $repos_load_rel_path;
2916+
2917+# To specify where tags, which are simply copies of the imported
2918+# directory, should be placed relative to the repository base URL, use
2919+# the -t command line option. This value must contain regular
2920+# expressions that match portions of the input directory names to
2921+# create an unique tag for each input directory. The regular
2922+# expressions are surrounded by a specified character to distinguish
2923+# the regular expression from the normal directory path.
2924+my $opt_import_tag_location;
2925+
2926+# Do not ask for any user input. Just go ahead and do everything.
2927+my $opt_no_user_input;
2928+
2929+# Do not automatically set the svn:executable property based on the
2930+# file's exe bit.
2931+my $opt_no_auto_exe;
2932+
2933+# Username to use for commits.
2934+my $opt_svn_username;
2935+
2936+# Password to use for commits.
2937+my $opt_svn_password;
2938+
2939+# Verbosity level.
2940+my $opt_verbose;
2941+
2942+# Path to already checked-out working copy.
2943+my $opt_existing_wc_dir;
2944+
2945+# List of filename patterns to ignore (as in .subversion/config's
2946+# "global-ignores" option).
2947+my $opt_glob_ignores;
2948+
2949+# This is the character used to separate regular expressions occuring
2950+# in the tag directory path from the path itself.
2951+my $REGEX_SEP_CHAR = '@';
2952+
2953+# This specifies a configuration file that contains a list of regular
2954+# expressions to check against a file and the properties to set on
2955+# matching files.
2956+my $property_config_filename;
2957+
2958+GetOptions('no_user_input' => \$opt_no_user_input,
2959+ 'no_auto_exe' => \$opt_no_auto_exe,
2960+ 'property_cfg_filename=s' => \$property_config_filename,
2961+ 'svn_password=s' => \$opt_svn_password,
2962+ 'svn_username=s' => \$opt_svn_username,
2963+ 'tag_location=s' => \$opt_import_tag_location,
2964+ 'verbose+' => \$opt_verbose,
2965+ 'wc=s' => \$opt_existing_wc_dir,
2966+ 'glob_ignores=s' => \$opt_glob_ignores)
2967+ or &usage;
2968+&usage("$0: too few arguments") if @ARGV < 2;
2969+
2970+$repos_base_url = shift;
2971+$repos_load_rel_path = shift;
2972+
2973+# Check that the repository base URL and the import directories do not
2974+# contain any ..'s.
2975+if ($repos_base_url =~ /\.{2}/)
2976+ {
2977+ die "$0: repos base URL $repos_base_url cannot contain ..'s.\n";
2978+ }
2979+if ($repos_load_rel_path =~ /\.{2}/)
2980+ {
2981+ die "$0: repos import relative directory path $repos_load_rel_path ",
2982+ "cannot contain ..'s.\n";
2983+ }
2984+
2985+# If there are no directories listed on the command line, then the
2986+# directories are read from standard input. In this case, the
2987+# -no_user_input command line option must be specified.
2988+if (!@ARGV and !$opt_no_user_input)
2989+ {
2990+ &usage("$0: must use -no_user_input if no dirs listed on command line.");
2991+ }
2992+
2993+# The tag option cannot be used when directories are read from
2994+# standard input because tags may collide and no user input can be
2995+# taken to verify that the input is ok.
2996+if (!@ARGV and $opt_import_tag_location)
2997+ {
2998+ &usage("$0: cannot use -tag_location when dirs are read from stdin.");
2999+ }
3000+
3001+# If the tag directory is set, then the import directory cannot be '.'.
3002+if (defined $opt_import_tag_location and $repos_load_rel_path eq '.')
3003+ {
3004+ &usage("$0: cannot set import_dir to '.' and use -t command line option.");
3005+ }
3006+
3007+# Set the svn command line options that are used anytime svn connects
3008+# to the repository.
3009+my @svn_use_repos_cmd_opts;
3010+&set_svn_use_repos_cmd_opts($opt_svn_username, $opt_svn_password);
3011+
3012+# Check that the tag directories do not contain any ..'s. Also, the
3013+# import and tag directories cannot be absolute.
3014+if (defined $opt_import_tag_location and $opt_import_tag_location =~ /\.{2}/)
3015+ {
3016+ die "$0: repos tag relative directory path $opt_import_tag_location ",
3017+ "cannot contain ..'s.\n";
3018+ }
3019+if ($repos_load_rel_path =~ m|^/|)
3020+ {
3021+ die "$0: repos import relative directory path $repos_load_rel_path ",
3022+ "cannot start with /.\n";
3023+ }
3024+if (defined $opt_import_tag_location and $opt_import_tag_location =~ m|^/|)
3025+ {
3026+ die "$0: repos tagrelative directory path $opt_import_tag_location ",
3027+ "cannot start with /.\n";
3028+ }
3029+
3030+if (defined $opt_existing_wc_dir)
3031+ {
3032+ unless (-e $opt_existing_wc_dir)
3033+ {
3034+ die "$0: working copy '$opt_existing_wc_dir' does not exist.\n";
3035+ }
3036+
3037+ unless (-d _)
3038+ {
3039+ die "$0: working copy '$opt_existing_wc_dir' is not a directory.\n";
3040+ }
3041+
3042+ unless (-d "$opt_existing_wc_dir/.svn")
3043+ {
3044+ die "$0: working copy '$opt_existing_wc_dir' does not have .svn ",
3045+ "directory.\n";
3046+ }
3047+
3048+ $opt_existing_wc_dir = Cwd::abs_path($opt_existing_wc_dir)
3049+ }
3050+
3051+# If no glob_ignores specified, try to deduce from config file,
3052+# or use the default below.
3053+my $ignores_str =
3054+ '*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store';
3055+
3056+if ( defined $opt_glob_ignores)
3057+ {
3058+ $ignores_str = $opt_glob_ignores;
3059+ }
3060+elsif ( -f "$ENV{HOME}/.subversion/config" )
3061+ {
3062+ open my $conf, "$ENV{HOME}/.subversion/config";
3063+ while (<$conf>)
3064+ {
3065+ if ( /^global-ignores\s*=\s*(.*?)\s*$/ )
3066+ {
3067+ $ignores_str = $1;
3068+ last;
3069+ }
3070+ }
3071+ }
3072+
3073+my @glob_ignores = map
3074+ {
3075+ s/\./\\\./g; s/\*/\.\*/g; "^$_\$";
3076+ } split(/\s+/, $ignores_str);
3077+unshift @glob_ignores, '\.svn$';
3078+
3079+# Convert the string URL into a URI object.
3080+$repos_base_url =~ s|/*$||;
3081+my $repos_base_uri = URI->new($repos_base_url);
3082+
3083+# Check that $repos_load_rel_path is not a directory here implying
3084+# that a command line option was forgotten.
3085+if ($repos_load_rel_path ne '.' and -d $repos_load_rel_path)
3086+ {
3087+ die "$0: import_dir '$repos_load_rel_path' is a directory.\n";
3088+ }
3089+
3090+# The remaining command line arguments should be directories. Check
3091+# that they all exist and that there are no duplicates.
3092+if (@ARGV)
3093+ {
3094+ my %dirs;
3095+ foreach my $dir (@ARGV)
3096+ {
3097+ unless (-e $dir)
3098+ {
3099+ die "$0: directory '$dir' does not exist.\n";
3100+ }
3101+
3102+ unless (-d _)
3103+ {
3104+ die "$0: directory '$dir' is not a directory.\n";
3105+ }
3106+
3107+ if ($dirs{$dir})
3108+ {
3109+ die "$0: directory '$dir' is listed more than once on command ",
3110+ "line.\n";
3111+ }
3112+ $dirs{$dir} = 1;
3113+ }
3114+ }
3115+
3116+# Create the tag locations and print them for the user to review.
3117+# Check that there are no duplicate tags.
3118+my %load_tags;
3119+if (@ARGV and defined $opt_import_tag_location)
3120+ {
3121+ my %seen_tags;
3122+
3123+ foreach my $load_dir (@ARGV)
3124+ {
3125+ my $load_tag = &get_tag_dir($load_dir);
3126+
3127+ print "Directory $load_dir will be tagged as $load_tag\n";
3128+
3129+ if ($seen_tags{$load_tag})
3130+ {
3131+ die "$0: duplicate tag generated.\n";
3132+ }
3133+ $seen_tags{$load_tag} = 1;
3134+
3135+ $load_tags{$load_dir} = $load_tag;
3136+ }
3137+
3138+ exit 0 unless &get_answer("Please examine identified tags. Are they " .
3139+ "acceptable? (Y/n) ", 'ny', 1);
3140+ print "\n";
3141+ }
3142+
3143+# Load the property configuration filename, if one was specified, into
3144+# an array of hashes, where each hash contains a regular expression
3145+# and a property to apply to the file if the regular expression
3146+# matches.
3147+my @property_settings;
3148+if (defined $property_config_filename and length $property_config_filename)
3149+ {
3150+ open(CFG, $property_config_filename)
3151+ or die "$0: cannot open '$property_config_filename' for reading: $!\n";
3152+
3153+ my $ok = 1;
3154+
3155+ while (my $line = <CFG>)
3156+ {
3157+ next if $line =~ /^\s*$/;
3158+ next if $line =~ /^\s*#/;
3159+
3160+ # Split the input line into words taking into account that
3161+ # single or double quotes may define a single word with
3162+ # whitespace in it. The format for the file is
3163+ # regex control property_name property_value
3164+ my @line = &split_line($line);
3165+ next if @line == 0;
3166+
3167+ unless (@line == 2 or @line == 4)
3168+ {
3169+ warn "$0: line $. of '$property_config_filename' has to have 2 ",
3170+ "or 4 columns.\n";
3171+ $ok = 0;
3172+ next;
3173+ }
3174+ my ($regex, $control, $property_name, $property_value) = @line;
3175+
3176+ unless ($control eq 'break' or $control eq 'cont')
3177+ {
3178+ warn "$0: line $. of '$property_config_filename' has illegal ",
3179+ "value for column 3 '$control', must be 'break' or 'cont'.\n";
3180+ $ok = 0;
3181+ next;
3182+ }
3183+
3184+ # Compile the regular expression.
3185+ my $re;
3186+ eval { $re = qr/$regex/i };
3187+ if ($@)
3188+ {
3189+ warn "$0: line $. of '$property_config_filename' regex '$regex' ",
3190+ "does not compile:\n$@\n";
3191+ $ok = 0;
3192+ next;
3193+ }
3194+
3195+ push(@property_settings, {name => $property_name,
3196+ value => $property_value,
3197+ control => $control,
3198+ re => $re});
3199+ }
3200+ close(CFG)
3201+ or warn "$0: error in closing '$property_config_filename' for ",
3202+ "reading: $!\n";
3203+
3204+ exit 1 unless $ok;
3205+ }
3206+
3207+# Check that the svn base URL works by running svn log on it. Only
3208+# get the HEAD revision log message; there's no need to waste
3209+# bandwidth seeing all of the log messages.
3210+print "Checking that the base URL is a Subversion repository.\n";
3211+read_from_process($svn, 'log', '-r', 'HEAD',
3212+ @svn_use_repos_cmd_opts, $repos_base_uri);
3213+print "\n";
3214+
3215+my $orig_cwd = cwd;
3216+
3217+# The first step is to determine the root of the svn repository. Do
3218+# this with the svn log command. Take the svn_url hostname and port
3219+# as the initial url and append to it successive portions of the final
3220+# path until svn log succeeds.
3221+print "Finding the root URL of the Subversion repository.\n";
3222+my $repos_root_uri;
3223+my $repos_root_uri_path;
3224+my $repos_base_path_segment;
3225+{
3226+ my $r = $repos_base_uri->clone;
3227+ my @path_segments = grep { length($_) } $r->path_segments;
3228+ my @repos_base_path_segments = @path_segments;
3229+ unshift(@path_segments, '');
3230+ $r->path('');
3231+ my @r_path_segments;
3232+
3233+ while (@path_segments)
3234+ {
3235+ $repos_root_uri_path = shift @path_segments;
3236+ push(@r_path_segments, $repos_root_uri_path);
3237+ $r->path_segments(@r_path_segments);
3238+ if (safe_read_from_pipe($svn, 'log', '-r', 'HEAD',
3239+ @svn_use_repos_cmd_opts, $r) == 0)
3240+ {
3241+ $repos_root_uri = $r;
3242+ last;
3243+ }
3244+ shift @repos_base_path_segments;
3245+ }
3246+ $repos_base_path_segment = join('/', @repos_base_path_segments);
3247+}
3248+
3249+if ($repos_root_uri)
3250+ {
3251+ print "Determined that the svn root URL is $repos_root_uri.\n\n";
3252+ }
3253+else
3254+ {
3255+ die "$0: cannot determine root svn URL.\n";
3256+ }
3257+
3258+# Create a temporary directory for svn to work in.
3259+my $temp_dir = tempdir( "svn_load_dirs_XXXXXXXXXX", TMPDIR => 1 );
3260+
3261+# Put in a signal handler to clean up any temporary directories.
3262+sub catch_signal {
3263+ my $signal = shift;
3264+ warn "$0: caught signal $signal. Quitting now.\n";
3265+ exit 1;
3266+}
3267+
3268+$SIG{HUP} = \&catch_signal;
3269+$SIG{INT} = \&catch_signal;
3270+$SIG{TERM} = \&catch_signal;
3271+$SIG{PIPE} = \&catch_signal;
3272+
3273+# Create an object that when DESTROY'ed will delete the temporary
3274+# directory. The CLEANUP flag to tempdir should do this, but they
3275+# call rmtree with 1 as the last argument which takes extra security
3276+# measures that do not clean up the .svn directories.
3277+my $temp_dir_cleanup = Temp::Delete->new;
3278+
3279+# Determine the native end of line style for this system. Do this the
3280+# most portable way, by writing a file with a single \n in non-binary
3281+# mode and then reading the file in binary mode.
3282+my $native_eol = &determine_native_eol;
3283+
3284+# Check if all the directories exist to load the directories into the
3285+# repository. If not, ask if they should be created. For tags, do
3286+# not create the tag directory itself, that is done on the svn cp.
3287+{
3288+ print "Finding if any directories need to be created in repository.\n";
3289+
3290+ my @dirs_to_create;
3291+ my @urls_to_create;
3292+ my %seen_dir;
3293+ my @load_tags_without_last_segment;
3294+
3295+ # Assume that the last portion of the tag directory contains the
3296+ # version number and remove it from the directories to create,
3297+ # because the tag directory will be created by svn cp.
3298+ foreach my $load_tag (sort values %load_tags)
3299+ {
3300+ # Skip this tag if there is only one segment in its name.
3301+ my $index = rindex($load_tag, '/');
3302+ next if $index == -1;
3303+
3304+ # Trim off the last segment and record the result.
3305+ push(@load_tags_without_last_segment, substr($load_tag, 0, $index));
3306+ }
3307+
3308+ foreach my $dir ($repos_load_rel_path, @load_tags_without_last_segment)
3309+ {
3310+ next unless length $dir;
3311+ my $d = '';
3312+ foreach my $segment (split('/', $dir))
3313+ {
3314+ $d = length $d ? "$d/$segment" : $segment;
3315+ my $url = "$repos_base_url/$d";
3316+ unless ($seen_dir{$d})
3317+ {
3318+ $seen_dir{$d} = 1;
3319+ if (safe_read_from_pipe($svn, 'log', '-r', 'HEAD',
3320+ @svn_use_repos_cmd_opts, $url) != 0)
3321+ {
3322+ push(@dirs_to_create, $d);
3323+ push(@urls_to_create, $url);
3324+ }
3325+ }
3326+ }
3327+ }
3328+
3329+ if (@dirs_to_create)
3330+ {
3331+ print "The following directories do not exist and need to exist:\n";
3332+ foreach my $dir (@dirs_to_create)
3333+ {
3334+ print " $dir\n";
3335+ }
3336+ exit 0 unless &get_answer("You must add them now to load the " .
3337+ "directories. Continue (Y/n)? ", 'ny', 1);
3338+
3339+ my $message = "Create directories to load project into.\n\n";
3340+
3341+ foreach my $dir (@dirs_to_create)
3342+ {
3343+ if (length $repos_base_path_segment)
3344+ {
3345+ $message .= "* $repos_base_path_segment/$dir: New directory.\n";
3346+ }
3347+ else
3348+ {
3349+ $message .= "* $dir: New directory.\n";
3350+ }
3351+ }
3352+ $message = wrap('', ' ', $message);
3353+
3354+ read_from_process($svn, 'mkdir', @svn_use_repos_cmd_opts,
3355+ '-m', $message, @urls_to_create);
3356+ }
3357+ else
3358+ {
3359+ print "No directories need to be created to prepare repository.\n";
3360+ }
3361+}
3362+
3363+# Either checkout a new working copy from the repository or use an
3364+# existing working copy.
3365+if (defined $opt_existing_wc_dir)
3366+ {
3367+ # Update an already existing working copy.
3368+ print "Not checking out anything; using existing working directory at\n";
3369+ print "$opt_existing_wc_dir\n";
3370+
3371+ chdir($opt_existing_wc_dir)
3372+ or die "$0: cannot chdir '$opt_existing_wc_dir': $!\n";
3373+
3374+ read_from_process($svn, 'update', @svn_use_repos_cmd_opts);
3375+ }
3376+else
3377+ {
3378+ # Check out the svn repository starting at the svn URL into a
3379+ # fixed directory name.
3380+ my $checkout_dir_name = 'my_import_wc';
3381+
3382+ # Check out only the directory being imported to, otherwise the
3383+ # checkout of the entire base URL can be very huge, if it contains
3384+ # a large number of tags.
3385+ my $checkout_url;
3386+ if ($repos_load_rel_path eq '.')
3387+ {
3388+ $checkout_url = $repos_base_url;
3389+ }
3390+ else
3391+ {
3392+ $checkout_url = "$repos_base_url/$repos_load_rel_path";
3393+ }
3394+
3395+ print "Checking out $checkout_url into $temp_dir/$checkout_dir_name\n";
3396+
3397+ chdir($temp_dir)
3398+ or die "$0: cannot chdir '$temp_dir': $!\n";
3399+
3400+ read_from_process($svn, 'checkout',
3401+ @svn_use_repos_cmd_opts,
3402+ $checkout_url, $checkout_dir_name);
3403+
3404+ chdir($checkout_dir_name)
3405+ or die "$0: cannot chdir '$checkout_dir_name': $!\n";
3406+ }
3407+
3408+# At this point, the current working directory is the top level
3409+# directory of the working copy. Record the absolute path to this
3410+# location because the script will chdir back here later on.
3411+my $wc_import_dir_cwd = cwd;
3412+
3413+# Set up the names for the path to the import and tag directories.
3414+my $repos_load_abs_path;
3415+if ($repos_load_rel_path eq '.')
3416+ {
3417+ $repos_load_abs_path = length($repos_base_path_segment) ?
3418+ $repos_base_path_segment : "/";
3419+ }
3420+else
3421+ {
3422+ $repos_load_abs_path = length($repos_base_path_segment) ?
3423+ "$repos_base_path_segment/$repos_load_rel_path" :
3424+ $repos_load_rel_path;
3425+ }
3426+
3427+# Now go through each source directory and copy each file from the
3428+# source directory to the target directory. For new target files, add
3429+# them to svn. For files that no longer exist, delete them.
3430+my $print_rename_message = 1;
3431+my @load_dirs = @ARGV;
3432+while (defined (my $load_dir = &get_next_load_dir))
3433+ {
3434+ my $load_tag = $load_tags{$load_dir};
3435+
3436+ if (defined $load_tag)
3437+ {
3438+ print "\nLoading $load_dir and will save in tag $load_tag.\n";
3439+ }
3440+ else
3441+ {
3442+ print "\nLoading $load_dir.\n";
3443+ }
3444+
3445+ # The first hash is keyed by the old name in a rename and the
3446+ # second by the new name. The last variable contains a list of
3447+ # old and new filenames in a rename.
3448+ my %rename_from_files;
3449+ my %rename_to_files;
3450+ my @renamed_filenames;
3451+
3452+ unless ($opt_no_user_input)
3453+ {
3454+ my $repeat_loop;
3455+ do
3456+ {
3457+ $repeat_loop = 0;
3458+
3459+ my %add_files;
3460+ my %del_files;
3461+
3462+ # Get the list of files and directories in the repository
3463+ # working copy. This hash is called %del_files because
3464+ # each file or directory will be deleted from the hash
3465+ # using the list of files and directories in the source
3466+ # directory, leaving the files and directories that need
3467+ # to be deleted.
3468+ %del_files = &recursive_ls_and_hash($wc_import_dir_cwd);
3469+
3470+ # This anonymous subroutine finds all the files and
3471+ # directories in the directory to load. It notes the file
3472+ # type and for each file found, it deletes it from
3473+ # %del_files.
3474+ my $wanted = sub
3475+ {
3476+ s#^\./##;
3477+ return if $_ eq '.';
3478+
3479+ my $source_path = $_;
3480+ my $dest_path = "$wc_import_dir_cwd/$_";
3481+
3482+ my ($source_type) = &file_info($source_path);
3483+ my ($dest_type) = &file_info($dest_path);
3484+
3485+ # Fail if the destination type exists but is of a
3486+ # different type of file than the source type.
3487+ if ($dest_type ne '0' and $source_type ne $dest_type)
3488+ {
3489+ die "$0: does not handle changing source and destination ",
3490+ "type for '$source_path'.\n";
3491+ }
3492+
3493+ if ($source_type ne 'd' and
3494+ $source_type ne 'f' and
3495+ $source_type ne 'l')
3496+ {
3497+ warn "$0: skipping loading file '$source_path' of type ",
3498+ "'$source_type'.\n";
3499+ unless ($opt_no_user_input)
3500+ {
3501+ print STDERR "Press return to continue: ";
3502+ <STDIN>;
3503+ }
3504+ return;
3505+ }
3506+
3507+ unless (defined delete $del_files{$source_path})
3508+ {
3509+ $add_files{$source_path}{type} = $source_type;
3510+ }
3511+ };
3512+
3513+ # Now change into the directory containing the files to
3514+ # load. First change to the original directory where this
3515+ # script was run so that if the specified directory is a
3516+ # relative directory path, then the script can change into
3517+ # it.
3518+ chdir($orig_cwd)
3519+ or die "$0: cannot chdir '$orig_cwd': $!\n";
3520+ chdir($load_dir)
3521+ or die "$0: cannot chdir '$load_dir': $!\n";
3522+
3523+ find({no_chdir => 1,
3524+ preprocess => sub { sort { $b cmp $a }
3525+ grep { $_ !~ /^[._]svn$/ } @_ },
3526+ wanted => $wanted
3527+ }, '.');
3528+
3529+ # At this point %add_files contains the list of new files
3530+ # and directories to be created in the working copy tree
3531+ # and %del_files contains the files and directories that
3532+ # need to be deleted. Because there may be renames that
3533+ # have taken place, give the user the opportunity to
3534+ # rename any deleted files and directories to ones being
3535+ # added.
3536+ my @add_files = sort keys %add_files;
3537+ my @del_files = sort keys %del_files;
3538+
3539+ # Because the source code management system may keep the
3540+ # original renamed file or directory in the working copy
3541+ # until a commit, remove them from the list of deleted
3542+ # files or directories.
3543+ &filter_renamed_files(\@del_files, \%rename_from_files);
3544+
3545+ # Now change into the working copy directory in case any
3546+ # renames need to be performed.
3547+ chdir($wc_import_dir_cwd)
3548+ or die "$0: cannot chdir '$wc_import_dir_cwd': $!\n";
3549+
3550+ # Only do renames if there are both added and deleted
3551+ # files and directories.
3552+ if (@add_files and @del_files)
3553+ {
3554+ my $max = @add_files > @del_files ? @add_files : @del_files;
3555+
3556+ # Print the files that have been added and deleted.
3557+ # Find the deleted file with the longest name and use
3558+ # that for the width of the filename column. Add one
3559+ # to the filename width to let the directory /
3560+ # character be appended to a directory name.
3561+ my $line_number_width = 4;
3562+ my $filename_width = 0;
3563+ foreach my $f (@del_files)
3564+ {
3565+ my $l = length($f);
3566+ $filename_width = $l if $l > $filename_width;
3567+ }
3568+ ++$filename_width;
3569+ my $printf_format = "%${line_number_width}d";
3570+
3571+ if ($print_rename_message)
3572+ {
3573+ $print_rename_message = 0;
3574+ print "\n",
3575+ "The following table lists files and directories that\n",
3576+ "exist in either the Subversion repository or the\n",
3577+ "directory to be imported but not both. You now have\n",
3578+ "the opportunity to match them up as renames instead\n",
3579+ "of deletes and adds. This is a Good Thing as it'll\n",
3580+ "make the repository take less space.\n\n",
3581+ "The left column lists files and directories that\n",
3582+ "exist in the Subversion repository and do not exist\n",
3583+ "in the directory being imported. The right column\n",
3584+ "lists files and directories that exist in the\n",
3585+ "directory being imported. Match up a deleted item\n",
3586+ "from the left column with an added item from the\n",
3587+ "right column. Note the line numbers on the left\n",
3588+ "which you type into this script to have a rename\n",
3589+ "performed.\n";
3590+ }
3591+
3592+ # Sort the added and deleted files and directories by
3593+ # the lowercase versions of their basenames instead of
3594+ # their complete path, which makes finding files that
3595+ # were moved into different directories easier to
3596+ # match up.
3597+ @add_files = map { $_->[0] }
3598+ sort { $a->[1] cmp $b->[1] }
3599+ map { [$_->[0], lc($_->[1])] }
3600+ map { [$_, m#([^/]+)$#] }
3601+ @add_files;
3602+ @del_files = map { $_->[0] }
3603+ sort { $a->[1] cmp $b->[1] }
3604+ map { [$_->[0], lc($_->[1])] }
3605+ map { [$_, m#([^/]+)$#] }
3606+ @del_files;
3607+
3608+ RELIST:
3609+
3610+ for (my $i=0; $i<$max; ++$i)
3611+ {
3612+ my $add_filename = '';
3613+ my $del_filename = '';
3614+ if ($i < @add_files)
3615+ {
3616+ $add_filename = $add_files[$i];
3617+ if ($add_files{$add_filename}{type} eq 'd')
3618+ {
3619+ $add_filename .= '/';
3620+ }
3621+ }
3622+ if ($i < @del_files)
3623+ {
3624+ $del_filename = $del_files[$i];
3625+ if ($del_files{$del_filename}{type} eq 'd')
3626+ {
3627+ $del_filename .= '/';
3628+ }
3629+ }
3630+
3631+ if ($i % 22 == 0)
3632+ {
3633+ print
3634+ "\n",
3635+ " " x $line_number_width,
3636+ " ",
3637+ "Deleted", " " x ($filename_width-length("Deleted")),
3638+ " ",
3639+ "Added\n";
3640+ }
3641+
3642+ printf $printf_format, $i;
3643+ print " ", $del_filename,
3644+ "_" x ($filename_width - length($del_filename)),
3645+ " ", $add_filename, "\n";
3646+
3647+ if (($i+1) % 22 == 0)
3648+ {
3649+ unless (&get_answer("Continue printing (Y/n)? ",
3650+ 'ny', 1))
3651+ {
3652+ last;
3653+ }
3654+ }
3655+ }
3656+
3657+ # Get the feedback from the user.
3658+ my $line;
3659+ my $add_filename;
3660+ my $add_index;
3661+ my $del_filename;
3662+ my $del_index;
3663+ my $got_line = 0;
3664+ do {
3665+ print "Enter two indexes for each column to rename, ",
3666+ "(R)elist, or (F)inish: ";
3667+ $line = <STDIN>;
3668+ $line = '' unless defined $line;
3669+ if ($line =~ /^R$/i )
3670+ {
3671+ goto RELIST;
3672+ }
3673+
3674+ if ($line =~ /^F$/i)
3675+ {
3676+ $got_line = 1;
3677+ }
3678+ elsif ($line =~ /^(\d+)\s+(\d+)$/)
3679+ {
3680+ print "\n";
3681+
3682+ $del_index = $1;
3683+ $add_index = $2;
3684+ if ($del_index >= @del_files)
3685+ {
3686+ print "Delete index $del_index is larger than ",
3687+ "maximum index of ", scalar @del_files - 1,
3688+ ".\n";
3689+ $del_index = undef;
3690+ }
3691+ if ($add_index > @add_files)
3692+ {
3693+ print "Add index $add_index is larger than maximum ",
3694+ "index of ", scalar @add_files - 1, ".\n";
3695+ $add_index = undef;
3696+ }
3697+ $got_line = defined $del_index && defined $add_index;
3698+
3699+ # Check that the file or directory to be renamed
3700+ # has the same file type.
3701+ if ($got_line)
3702+ {
3703+ $add_filename = $add_files[$add_index];
3704+ $del_filename = $del_files[$del_index];
3705+ if ($add_files{$add_filename}{type} ne
3706+ $del_files{$del_filename}{type})
3707+ {
3708+ print "File types for $del_filename and ",
3709+ "$add_filename differ.\n";
3710+ $got_line = undef;
3711+ }
3712+ }
3713+ }
3714+ } until ($got_line);
3715+
3716+ if ($line !~ /^F$/i)
3717+ {
3718+ print "Renaming $del_filename to $add_filename.\n";
3719+
3720+ $repeat_loop = 1;
3721+
3722+ # Because subversion cannot rename the same file
3723+ # or directory twice, which includes doing a
3724+ # rename of a file in a directory that was
3725+ # previously renamed, a commit has to be
3726+ # performed. Check if the file or directory being
3727+ # renamed now would cause such a problem and
3728+ # commit if so.
3729+ my $do_commit_now = 0;
3730+ foreach my $rename_to_filename (keys %rename_to_files)
3731+ {
3732+ if (contained_in($del_filename,
3733+ $rename_to_filename,
3734+ $rename_to_files{$rename_to_filename}{type}))
3735+ {
3736+ $do_commit_now = 1;
3737+ last;
3738+ }
3739+ }
3740+
3741+ if ($do_commit_now)
3742+ {
3743+ print "Now committing previously run renames.\n";
3744+ &commit_renames($load_dir,
3745+ \@renamed_filenames,
3746+ \%rename_from_files,
3747+ \%rename_to_files);
3748+ }
3749+
3750+ push(@renamed_filenames, $del_filename, $add_filename);
3751+ {
3752+ my $d = $del_files{$del_filename};
3753+ $rename_from_files{$del_filename} = $d;
3754+ $rename_to_files{$add_filename} = $d;
3755+ }
3756+
3757+ # Check that any required directories to do the
3758+ # rename exist.
3759+ my @add_segments = split('/', $add_filename);
3760+ pop(@add_segments);
3761+ my $add_dir = '';
3762+ my @add_dirs;
3763+ foreach my $segment (@add_segments)
3764+ {
3765+ $add_dir = length($add_dir) ? "$add_dir/$segment" :
3766+ $segment;
3767+ unless (-d $add_dir)
3768+ {
3769+ push(@add_dirs, $add_dir);
3770+ }
3771+ }
3772+
3773+ if (@add_dirs)
3774+ {
3775+ read_from_process($svn, 'mkdir', @add_dirs);
3776+ }
3777+
3778+ read_from_process($svn, 'mv',
3779+ $del_filename, $add_filename);
3780+ }
3781+ }
3782+ } while ($repeat_loop);
3783+ }
3784+
3785+ # If there are any renames that have not been committed, then do
3786+ # that now.
3787+ if (@renamed_filenames)
3788+ {
3789+ &commit_renames($load_dir,
3790+ \@renamed_filenames,
3791+ \%rename_from_files,
3792+ \%rename_to_files);
3793+ }
3794+
3795+ # At this point all renames have been performed. Now get the
3796+ # final list of files and directories in the working copy
3797+ # directory. The %add_files hash will contain the list of files
3798+ # and directories to add to the working copy and %del_files starts
3799+ # with all the files already in the working copy and gets files
3800+ # removed that are in the imported directory, which results in a
3801+ # list of files that should be deleted. %upd_files holds the list
3802+ # of files that have been updated.
3803+ my %add_files;
3804+ my %del_files = &recursive_ls_and_hash($wc_import_dir_cwd);
3805+ my %upd_files;
3806+
3807+ # This anonymous subroutine copies files from the source directory
3808+ # to the working copy directory.
3809+ my $wanted = sub
3810+ {
3811+ s#^\./##;
3812+ return if $_ eq '.';
3813+
3814+ my $source_path = $_;
3815+ my $dest_path = "$wc_import_dir_cwd/$_";
3816+
3817+ my ($source_type, $source_is_exe) = &file_info($source_path);
3818+ my ($dest_type) = &file_info($dest_path);
3819+
3820+ return if ($source_type ne 'd' and
3821+ $source_type ne 'f' and
3822+ $source_type ne 'l');
3823+
3824+ # Fail if the destination type exists but is of a different
3825+ # type of file than the source type.
3826+ if ($dest_type ne '0' and $source_type ne $dest_type)
3827+ {
3828+ die "$0: does not handle changing source and destination type ",
3829+ "for '$source_path'.\n";
3830+ }
3831+
3832+ # Determine if the file is being added or is an update to an
3833+ # already existing file using the file's digest.
3834+ my $del_info = delete $del_files{$source_path};
3835+ if (defined $del_info)
3836+ {
3837+ if (defined (my $del_digest = $del_info->{digest}))
3838+ {
3839+ my $new_digest = &digest_hash_file($source_path);
3840+ if ($new_digest ne $del_digest)
3841+ {
3842+ print "U $source_path\n";
3843+ $upd_files{$source_path} = $del_info;
3844+ }
3845+ }
3846+ }
3847+ else
3848+ {
3849+ print "A $source_path\n";
3850+ $add_files{$source_path}{type} = $source_type;
3851+
3852+ # Create an array reference to hold the list of properties
3853+ # to apply to this object.
3854+ unless (defined $add_files{$source_path}{properties})
3855+ {
3856+ $add_files{$source_path}{properties} = [];
3857+ }
3858+
3859+ # Go through the list of properties for a match on this
3860+ # file or directory and if there is a match, then apply
3861+ # the property to it.
3862+ foreach my $property (@property_settings)
3863+ {
3864+ my $re = $property->{re};
3865+ if ($source_path =~ $re)
3866+ {
3867+ my $property_name = $property->{name};
3868+ my $property_value = $property->{value};
3869+
3870+ # The property value may not be set in the
3871+ # configuration file, since the user may just want
3872+ # to set the control flag.
3873+ if (defined $property_name and defined $property_value)
3874+ {
3875+ # Ignore properties that do not apply to
3876+ # directories.
3877+ if ($source_type eq 'd')
3878+ {
3879+ if ($property_name eq 'svn:eol-style' or
3880+ $property_name eq 'svn:executable' or
3881+ $property_name eq 'svn:keywords' or
3882+ $property_name eq 'svn:mime-type')
3883+ {
3884+ next;
3885+ }
3886+ }
3887+
3888+ # Ignore properties that do not apply to
3889+ # files.
3890+ if ($source_type eq 'f')
3891+ {
3892+ if ($property_name eq 'svn:externals' or
3893+ $property_name eq 'svn:ignore')
3894+ {
3895+ next;
3896+ }
3897+ }
3898+
3899+ print "Adding to '$source_path' property ",
3900+ "'$property_name' with value ",
3901+ "'$property_value'.\n";
3902+
3903+ push(@{$add_files{$source_path}{properties}},
3904+ $property);
3905+ }
3906+
3907+ last if $property->{control} eq 'break';
3908+ }
3909+ }
3910+ }
3911+
3912+ # Add svn:executable to files that have their executable bit
3913+ # set.
3914+ if ($source_is_exe and !$opt_no_auto_exe)
3915+ {
3916+ print "Adding to '$source_path' property 'svn:executable' with ",
3917+ "value '*'.\n";
3918+ my $property = {name => 'svn:executable', value => '*'};
3919+ push (@{$add_files{$source_path}{properties}},
3920+ $property);
3921+ }
3922+
3923+ # Now make sure the file or directory in the source directory
3924+ # exists in the repository.
3925+ if ($source_type eq 'd')
3926+ {
3927+ if ($dest_type eq '0')
3928+ {
3929+ mkdir($dest_path)
3930+ or die "$0: cannot mkdir '$dest_path': $!\n";
3931+ }
3932+ }
3933+ elsif
3934+ ($source_type eq 'l') {
3935+ my $link_target = readlink($source_path)
3936+ or die "$0: cannot readlink '$source_path': $!\n";
3937+ if ($dest_type eq 'l')
3938+ {
3939+ my $old_target = readlink($dest_path)
3940+ or die "$0: cannot readlink '$dest_path': $!\n";
3941+ return if ($old_target eq $link_target);
3942+ unlink($dest_path)
3943+ or die "$0: unlink '$dest_path' failed: $!\n";
3944+ }
3945+ symlink($link_target, $dest_path)
3946+ or die "$0: cannot symlink '$dest_path' to '$link_target': $!\n";
3947+ }
3948+ elsif
3949+ ($source_type eq 'f') {
3950+ # Only copy the file if the digests do not match.
3951+ if ($add_files{$source_path} or $upd_files{$source_path})
3952+ {
3953+ copy($source_path, $dest_path)
3954+ or die "$0: copy '$source_path' to '$dest_path': $!\n";
3955+ }
3956+ }
3957+ else
3958+ {
3959+ die "$0: does not handle copying files of type '$source_type'.\n";
3960+ }
3961+ };
3962+
3963+ # Now change into the directory containing the files to load.
3964+ # First change to the original directory where this script was run
3965+ # so that if the specified directory is a relative directory path,
3966+ # then the script can change into it.
3967+ chdir($orig_cwd)
3968+ or die "$0: cannot chdir '$orig_cwd': $!\n";
3969+ chdir($load_dir)
3970+ or die "$0: cannot chdir '$load_dir': $!\n";
3971+
3972+ find({no_chdir => 1,
3973+ preprocess => sub { sort { $b cmp $a }
3974+ grep { $_ !~ /^[._]svn$/ } @_ },
3975+ wanted => $wanted
3976+ }, '.');
3977+
3978+ # The files and directories that are in %del_files are the files
3979+ # and directories that need to be deleted. Because svn will
3980+ # return an error if a file or directory is deleted in a directory
3981+ # that subsequently is deleted, first find all directories and
3982+ # remove from the list any files and directories inside those
3983+ # directories from this list. Work through the list repeatedly
3984+ # working from short to long names so that directories containing
3985+ # other files and directories will be deleted first.
3986+ my $repeat_loop;
3987+ do
3988+ {
3989+ $repeat_loop = 0;
3990+ my @del_files = sort {length($a) <=> length($b) || $a cmp $b}
3991+ keys %del_files;
3992+ &filter_renamed_files(\@del_files, \%rename_from_files);
3993+ foreach my $file (@del_files)
3994+ {
3995+ if ($del_files{$file}{type} eq 'd')
3996+ {
3997+ my $dir = "$file/";
3998+ my $dir_length = length($dir);
3999+ foreach my $f (@del_files)
4000+ {
4001+ next if $file eq $f;
4002+ if (length($f) >= $dir_length and
4003+ substr($f, 0, $dir_length) eq $dir)
4004+ {
4005+ print "d $f\n";
4006+ delete $del_files{$f};
4007+ $repeat_loop = 1;
4008+ }
4009+ }
4010+
4011+ # If there were any deletions of files and/or
4012+ # directories inside a directory that will be deleted,
4013+ # then restart the entire loop again, because one or
4014+ # more keys have been deleted from %del_files.
4015+ # Equally important is not to stop this loop if no
4016+ # deletions have been done, otherwise later
4017+ # directories that may contain files and directories
4018+ # to be deleted will not be deleted.
4019+ last if $repeat_loop;
4020+ }
4021+ }
4022+ } while ($repeat_loop);
4023+
4024+ # What is left are files that are not in any directories to be
4025+ # deleted and directories to be deleted. To delete the files,
4026+ # deeper files and directories must be deleted first. Because we
4027+ # have a hash keyed by remaining files and directories to be
4028+ # deleted, instead of trying to figure out which directories and
4029+ # files are contained in other directories, just reverse sort by
4030+ # the path length and then alphabetically.
4031+ my @del_files = sort {length($b) <=> length($a) || $a cmp $b }
4032+ keys %del_files;
4033+ &filter_renamed_files(\@del_files, \%rename_from_files);
4034+ foreach my $file (@del_files)
4035+ {
4036+ print "D $file\n";
4037+ }
4038+
4039+ # Now change back to the trunk directory and run the svn commands.
4040+ chdir($wc_import_dir_cwd)
4041+ or die "$0: cannot chdir '$wc_import_dir_cwd': $!\n";
4042+
4043+ # If any of the added files have the svn:eol-style property set,
4044+ # then pass -b to diff, otherwise diff may fail because the end of
4045+ # lines have changed and the source file and file in the
4046+ # repository will not be identical.
4047+ my @diff_ignore_space_changes;
4048+
4049+ if (keys %add_files)
4050+ {
4051+ my @add_files = sort {length($a) <=> length($b) || $a cmp $b}
4052+ keys %add_files;
4053+ my $target_filename = &make_targets_file(@add_files);
4054+ read_from_process($svn, 'add', '-N', '--targets', $target_filename);
4055+ unlink($target_filename);
4056+
4057+ # Add properties on the added files.
4058+ foreach my $add_file (@add_files)
4059+ {
4060+ foreach my $property (@{$add_files{$add_file}{properties}})
4061+ {
4062+ my $property_name = $property->{name};
4063+ my $property_value = $property->{value};
4064+
4065+ if ($property_name eq 'svn:eol-style')
4066+ {
4067+ @diff_ignore_space_changes = ('-b');
4068+ }
4069+
4070+ # Write the value to a temporary file in case it's multi-line
4071+ my ($handle, $tmpfile) = tempfile(DIR => $temp_dir);
4072+ print $handle $property_value;
4073+ close($handle);
4074+
4075+ read_from_process($svn,
4076+ 'propset',
4077+ $property_name,
4078+ '--file',
4079+ $tmpfile,
4080+ $add_file);
4081+ }
4082+ }
4083+ }
4084+ if (@del_files)
4085+ {
4086+ my $target_filename = &make_targets_file(@del_files);
4087+ read_from_process($svn, 'rm', '--targets', $target_filename);
4088+ unlink($target_filename);
4089+ }
4090+
4091+ # Go through the list of updated files and check the svn:eol-style
4092+ # property. If it is set to native, then convert all CR, CRLF and
4093+ # LF's in the file to the native end of line characters. Also,
4094+ # modify diff's command line so that it will ignore the change in
4095+ # end of line style.
4096+ if (keys %upd_files)
4097+ {
4098+ my @upd_files = sort {length($a) <=> length($b) || $a cmp $b}
4099+ keys %upd_files;
4100+ foreach my $upd_file (@upd_files)
4101+ {
4102+ # Always append @BASE to a filename in case they contain a
4103+ # @ character, in which case the Subversion command line
4104+ # client will attempt to parse the characters after the @
4105+ # as a revision and most likely fail, or if the characters
4106+ # after the @ are a valid revision, then it'll possibly
4107+ # get the incorrect information. So always append @BASE
4108+ # and any preceding @'s will be treated normally and the
4109+ # correct information will be retrieved.
4110+ my @command = ($svn,
4111+ 'propget',
4112+ 'svn:eol-style',
4113+ "$upd_file\@BASE");
4114+ my @lines = read_from_process(@command);
4115+ next unless @lines;
4116+ if (@lines > 1)
4117+ {
4118+ warn "$0: '@command' returned more than one line of output: ",
4119+ "'@lines'.\n";
4120+ next;
4121+ }
4122+
4123+ my $eol_style = $lines[0];
4124+ if ($eol_style eq 'native')
4125+ {
4126+ @diff_ignore_space_changes = ('-b');
4127+ if (&convert_file_to_native_eol($upd_file))
4128+ {
4129+ print "Native eol-style conversion modified $upd_file.\n";
4130+ }
4131+ }
4132+ }
4133+ }
4134+
4135+ my $message = wrap('', '', "Load $load_dir into $repos_load_abs_path.\n");
4136+ read_from_process($svn, 'commit',
4137+ @svn_use_repos_cmd_opts,
4138+ '-m', $message);
4139+
4140+ # If an update is not run now after a commit, then some file and
4141+ # directory paths will have an older revisions associated with
4142+ # them and any future commits will fail because they are out of
4143+ # date.
4144+ read_from_process($svn, 'update', @svn_use_repos_cmd_opts);
4145+
4146+ # Now remove any files and directories to be deleted in the
4147+ # repository.
4148+ if (@del_files)
4149+ {
4150+ rmtree(\@del_files, 1, 0);
4151+ }
4152+
4153+ # Now make the tag by doing a copy in the svn repository itself.
4154+ if (defined $load_tag)
4155+ {
4156+ my $repos_tag_abs_path = length($repos_base_path_segment) ?
4157+ "$repos_base_path_segment/$load_tag" :
4158+ $load_tag;
4159+
4160+ my $from_url = $repos_load_rel_path eq '.' ?
4161+ $repos_load_rel_path :
4162+ "$repos_base_url/$repos_load_rel_path";
4163+ my $to_url = "$repos_base_url/$load_tag";
4164+
4165+ $message = wrap("",
4166+ "",
4167+ "Tag $repos_load_abs_path as " .
4168+ "$repos_tag_abs_path.\n");
4169+ read_from_process($svn, 'cp', @svn_use_repos_cmd_opts,
4170+ '-m', $message, $from_url, $to_url);
4171+
4172+ # Now check out the tag and run a recursive diff between the
4173+ # original source directory and the tag for a consistency
4174+ # check.
4175+ my $checkout_dir_name = "my_tag_wc_named_$load_tag";
4176+ print "Checking out $to_url into $temp_dir/$checkout_dir_name\n";
4177+
4178+ chdir($temp_dir)
4179+ or die "$0: cannot chdir '$temp_dir': $!\n";
4180+
4181+ read_from_process($svn, 'checkout',
4182+ @svn_use_repos_cmd_opts,
4183+ $to_url, $checkout_dir_name);
4184+
4185+ chdir($checkout_dir_name)
4186+ or die "$0: cannot chdir '$checkout_dir_name': $!\n";
4187+
4188+ chdir($orig_cwd)
4189+ or die "$0: cannot chdir '$orig_cwd': $!\n";
4190+ read_from_process('diff', '-u', @diff_ignore_space_changes,
4191+ '-x', '.svn',
4192+ '-r', $load_dir, "$temp_dir/$checkout_dir_name");
4193+ }
4194+ }
4195+
4196+exit 0;
4197+
4198+sub usage
4199+{
4200+ warn "@_\n" if @_;
4201+ die "usage: $0 [options] svn_url svn_import_dir [dir_v1 [dir_v2 [..]]]\n",
4202+ " svn_url is the file:// or http:// URL of the svn repository\n",
4203+ " svn_import_dir is the path relative to svn_url where to load dirs\n",
4204+ " dir_v1 .. list dirs to import otherwise read from stdin\n",
4205+ "options are\n",
4206+ " -no_user_input don't ask yes/no questions and assume yes answer\n",
4207+ " -no_auto_exe don't set svn:executable for executable files\n",
4208+ " -p filename table listing properties to apply to matching files\n",
4209+ " -svn_username username to perform commits as\n",
4210+ " -svn_password password to supply to svn commit\n",
4211+ " -t tag_dir create a tag copy in tag_dir, relative to svn_url\n",
4212+ " -v increase program verbosity, multiple -v's allowed\n",
4213+ " -wc path use the already checked-out working copy at path\n",
4214+ " instead of checkout out a fresh working copy\n",
4215+ " -glob_ignores List of filename patterns to ignore (as in svn's\n",
4216+ " global-ignores config option)\n";
4217+}
4218+
4219+# Get the next directory to load, either from the command line or from
4220+# standard input.
4221+my $get_next_load_dir_init = 0;
4222+my @get_next_load_dirs;
4223+sub get_next_load_dir
4224+{
4225+ if (@ARGV)
4226+ {
4227+ unless ($get_next_load_dir_init)
4228+ {
4229+ $get_next_load_dir_init = 1;
4230+ @get_next_load_dirs = @ARGV;
4231+ }
4232+ return shift @get_next_load_dirs;
4233+ }
4234+
4235+ if ($opt_verbose)
4236+ {
4237+ print "Waiting for next directory to import on standard input:\n";
4238+ }
4239+ my $line = <STDIN>;
4240+
4241+ print "\n" if $opt_verbose;
4242+
4243+ chomp $line;
4244+ if ($line =~ m|(\S+)\s+(\S+)|)
4245+ {
4246+ $line = $1;
4247+ set_svn_use_repos_cmd_opts($2, $opt_svn_password);
4248+ }
4249+ $line;
4250+}
4251+
4252+# This constant stores the commonly used string to indicate that a
4253+# subroutine has been passed an incorrect number of arguments.
4254+use vars qw($INCORRECT_NUMBER_OF_ARGS);
4255+$INCORRECT_NUMBER_OF_ARGS = "passed incorrect number of arguments.\n";
4256+
4257+# Creates a temporary file in the temporary directory and stores the
4258+# arguments in it for use by the svn --targets command line option.
4259+# If any part of the file creation failed, exit the program, as
4260+# there's no workaround. Use a unique number as a counter to the
4261+# files.
4262+my $make_targets_file_counter;
4263+sub make_targets_file
4264+{
4265+ unless (@_)
4266+ {
4267+ confess "$0: make_targets_file $INCORRECT_NUMBER_OF_ARGS";
4268+ }
4269+
4270+ $make_targets_file_counter = 1 unless defined $make_targets_file_counter;
4271+
4272+ my $filename = sprintf "%s/targets.%05d",
4273+ $temp_dir,
4274+ $make_targets_file_counter;
4275+ ++$make_targets_file_counter;
4276+
4277+ open(TARGETS, ">$filename")
4278+ or die "$0: cannot open '$filename' for writing: $!\n";
4279+
4280+ foreach my $file (@_)
4281+ {
4282+ print TARGETS "$file\n";
4283+ }
4284+
4285+ close(TARGETS)
4286+ or die "$0: error in closing '$filename' for writing: $!\n";
4287+
4288+ $filename;
4289+}
4290+
4291+# Set the svn command line options that are used anytime svn connects
4292+# to the repository.
4293+sub set_svn_use_repos_cmd_opts
4294+{
4295+ unless (@_ == 2)
4296+ {
4297+ confess "$0: set_svn_use_repos_cmd_opts $INCORRECT_NUMBER_OF_ARGS";
4298+ }
4299+
4300+ my $username = shift;
4301+ my $password = shift;
4302+
4303+ @svn_use_repos_cmd_opts = ('--non-interactive');
4304+ if (defined $username and length $username)
4305+ {
4306+ push(@svn_use_repos_cmd_opts, '--username', $username);
4307+ }
4308+ if (defined $password)
4309+ {
4310+ push(@svn_use_repos_cmd_opts, '--password', $password);
4311+ }
4312+}
4313+
4314+sub get_tag_dir
4315+{
4316+ unless (@_ == 1)
4317+ {
4318+ confess "$0: get_tag_dir $INCORRECT_NUMBER_OF_ARGS";
4319+ }
4320+
4321+ my $load_dir = shift;
4322+
4323+ # Take the tag relative directory, search for pairs of
4324+ # REGEX_SEP_CHAR's and use the regular expression inside the pair to
4325+ # put in the tag directory name.
4326+ my $tag_location = $opt_import_tag_location;
4327+ my $load_tag = '';
4328+ while ((my $i = index($tag_location, $REGEX_SEP_CHAR)) >= 0)
4329+ {
4330+ $load_tag .= substr($tag_location, 0, $i, '');
4331+ substr($tag_location, 0, 1, '');
4332+ my $j = index($tag_location, $REGEX_SEP_CHAR);
4333+ if ($j < 0)
4334+ {
4335+ die "$0: -t value '$opt_import_tag_location' does not have ",
4336+ "matching $REGEX_SEP_CHAR.\n";
4337+ }
4338+ my $regex = substr($tag_location, 0, $j, '');
4339+ $regex = "($regex)" unless ($regex =~ /\(.+\)/);
4340+ substr($tag_location, 0, 1, '');
4341+ my @results = $load_dir =~ m/$regex/;
4342+ $load_tag .= join('', @results);
4343+ }
4344+ $load_tag .= $tag_location;
4345+
4346+ $load_tag;
4347+}
4348+
4349+# Return a two element array. The first element is a single character
4350+# that represents the type of object the path points to. The second
4351+# is a boolean (1 for true, '' for false) if the path points to a file
4352+# and if the file is executable.
4353+sub file_info
4354+{
4355+ lstat(shift) or return ('0', '');
4356+ -b _ and return ('b', '');
4357+ -c _ and return ('c', '');
4358+ -d _ and return ('d', '');
4359+ -f _ and return ('f', -x _);
4360+ -l _ and return ('l', '');
4361+ -p _ and return ('p', '');
4362+ -S _ and return ('S', '');
4363+ return '?';
4364+}
4365+
4366+# Start a child process safely without using /bin/sh.
4367+sub safe_read_from_pipe
4368+{
4369+ unless (@_)
4370+ {
4371+ croak "$0: safe_read_from_pipe $INCORRECT_NUMBER_OF_ARGS";
4372+ }
4373+
4374+ my $openfork_available = "MSWin32" ne $OSNAME;
4375+ if ($openfork_available)
4376+ {
4377+ print "Running @_\n";
4378+ my $pid = open(SAFE_READ, "-|");
4379+ unless (defined $pid)
4380+ {
4381+ die "$0: cannot fork: $!\n";
4382+ }
4383+ unless ($pid)
4384+ {
4385+ # child
4386+ open(STDERR, ">&STDOUT")
4387+ or die "$0: cannot dup STDOUT: $!\n";
4388+ exec(@_)
4389+ or die "$0: cannot exec '@_': $!\n";
4390+ }
4391+ }
4392+ else
4393+ {
4394+ # Redirect the comment into a temp file and use that to work around
4395+ # Windoze's (non-)handling of multi-line commands.
4396+ my @commandline = ();
4397+ my $command;
4398+ my $comment;
4399+
4400+ while ($command = shift)
4401+ {
4402+ if ("-m" eq $command)
4403+ {
4404+ my $comment = shift;
4405+ my ($handle, $tmpfile) = tempfile(DIR => $temp_dir);
4406+ print $handle $comment;
4407+ close($handle);
4408+
4409+ push(@commandline, "--file");
4410+ push(@commandline, $tmpfile);
4411+ }
4412+ else
4413+ {
4414+ # Munge the command to protect it from the command line
4415+ $command =~ s/\"/\\\"/g;
4416+ if ($command =~ m"\s") { $command = "\"$command\""; }
4417+ if ($command eq "") { $command = "\"\""; }
4418+ if ($command =~ m"\n")
4419+ {
4420+ warn "$0: carriage return detected in command - may not work\n";
4421+ }
4422+ push(@commandline, $command);
4423+ }
4424+ }
4425+
4426+ print "Running @commandline\n";
4427+ if ( $comment ) { print $comment; }
4428+
4429+ # Now do the pipe.
4430+ open(SAFE_READ, "@commandline |")
4431+ or die "$0: cannot pipe to command: $!\n";
4432+ }
4433+
4434+ # parent
4435+ my @output;
4436+ while (<SAFE_READ>)
4437+ {
4438+ chomp;
4439+ push(@output, $_);
4440+ }
4441+ close(SAFE_READ);
4442+ my $result = $?;
4443+ my $exit = $result >> 8;
4444+ my $signal = $result & 127;
4445+ my $cd = $result & 128 ? "with core dump" : "";
4446+ if ($signal or $cd)
4447+ {
4448+ warn "$0: pipe from '@_' failed $cd: exit=$exit signal=$signal\n";
4449+ }
4450+ if (wantarray)
4451+ {
4452+ return ($result, @output);
4453+ }
4454+ else
4455+ {
4456+ return $result;
4457+ }
4458+}
4459+
4460+# Use safe_read_from_pipe to start a child process safely and exit the
4461+# script if the child failed for whatever reason.
4462+sub read_from_process
4463+{
4464+ unless (@_)
4465+ {
4466+ croak "$0: read_from_process $INCORRECT_NUMBER_OF_ARGS";
4467+ }
4468+ my ($status, @output) = &safe_read_from_pipe(@_);
4469+ if ($status)
4470+ {
4471+ print STDERR "$0: @_ failed with this output:\n", join("\n", @output),
4472+ "\n";
4473+ unless ($opt_no_user_input)
4474+ {
4475+ print STDERR
4476+ "Press return to quit and clean up svn working directory: ";
4477+ <STDIN>;
4478+ }
4479+ exit 1;
4480+ }
4481+ else
4482+ {
4483+ return @output;
4484+ }
4485+}
4486+
4487+# Get a list of all the files and directories in the specified
4488+# directory, the type of file and a digest hash of file types.
4489+sub recursive_ls_and_hash
4490+{
4491+ unless (@_ == 1)
4492+ {
4493+ croak "$0: recursive_ls_and_hash $INCORRECT_NUMBER_OF_ARGS";
4494+ }
4495+
4496+ # This is the directory to change into.
4497+ my $dir = shift;
4498+
4499+ # Get the current directory so that the script can change into the
4500+ # current working directory after changing into the specified
4501+ # directory.
4502+ my $return_cwd = cwd;
4503+
4504+ chdir($dir)
4505+ or die "$0: cannot chdir '$dir': $!\n";
4506+
4507+ my %files;
4508+
4509+ my $wanted = sub
4510+ {
4511+ s#^\./##;
4512+ return if $_ eq '.';
4513+ my ($file_type) = &file_info($_);
4514+ my $file_digest;
4515+ if ($file_type eq 'f' or ($file_type eq 'l' and stat($_) and -f _))
4516+ {
4517+ $file_digest = &digest_hash_file($_);
4518+ }
4519+ $files{$_} = {type => $file_type,
4520+ digest => $file_digest};
4521+ };
4522+ find({no_chdir => 1,
4523+ preprocess => sub
4524+ {
4525+ grep
4526+ {
4527+ my $ok=1;
4528+ foreach my $x (@glob_ignores)
4529+ {
4530+ if ( $_ =~ /$x/ ) {$ok=0;last;}
4531+ }
4532+ $ok
4533+ } @_
4534+ },
4535+ wanted => $wanted
4536+ }, '.');
4537+
4538+ chdir($return_cwd)
4539+ or die "$0: cannot chdir '$return_cwd': $!\n";
4540+
4541+ %files;
4542+}
4543+
4544+# Given a list of files and directories which have been renamed but
4545+# not commtited, commit them with a proper log message.
4546+sub commit_renames
4547+{
4548+ unless (@_ == 4)
4549+ {
4550+ croak "$0: commit_renames $INCORRECT_NUMBER_OF_ARGS";
4551+ }
4552+
4553+ my $load_dir = shift;
4554+ my $renamed_filenames = shift;
4555+ my $rename_from_files = shift;
4556+ my $rename_to_files = shift;
4557+
4558+ my $number_renames = @$renamed_filenames/2;
4559+
4560+ my $message = "To prepare to load $load_dir into $repos_load_abs_path, " .
4561+ "perform $number_renames rename" .
4562+ ($number_renames > 1 ? "s" : "") . ".\n";
4563+
4564+ # Text::Wrap::wrap appears to replace multiple consecutive \n's with
4565+ # one \n, so wrap the text and then append the second \n.
4566+ $message = wrap("", "", $message) . "\n";
4567+ while (@$renamed_filenames)
4568+ {
4569+ my $from = "$repos_load_abs_path/" . shift @$renamed_filenames;
4570+ my $to = "$repos_load_abs_path/" . shift @$renamed_filenames;
4571+ $message .= wrap("", " ", "* $to: Renamed from $from.\n");
4572+ }
4573+
4574+ # Change to the top of the working copy so that any
4575+ # directories will also be updated.
4576+ my $cwd = cwd;
4577+ chdir($wc_import_dir_cwd)
4578+ or die "$0: cannot chdir '$wc_import_dir_cwd': $!\n";
4579+ read_from_process($svn, 'commit', @svn_use_repos_cmd_opts, '-m', $message);
4580+ read_from_process($svn, 'update', @svn_use_repos_cmd_opts);
4581+ chdir($cwd)
4582+ or die "$0: cannot chdir '$cwd': $!\n";
4583+
4584+ # Some versions of subversion have a bug where renamed files
4585+ # or directories are not deleted after a commit, so do that
4586+ # here.
4587+ my @del_files = sort {length($b) <=> length($a) || $a cmp $b }
4588+ keys %$rename_from_files;
4589+ rmtree(\@del_files, 1, 0);
4590+
4591+ # Empty the list of old and new renamed names.
4592+ undef %$rename_from_files;
4593+ undef %$rename_to_files;
4594+}
4595+
4596+# Take a one file or directory and see if its name is equal to a
4597+# second or is contained in the second if the second file's file type
4598+# is a directory.
4599+sub contained_in
4600+{
4601+ unless (@_ == 3)
4602+ {
4603+ croak "$0: contain_in $INCORRECT_NUMBER_OF_ARGS";
4604+ }
4605+
4606+ my $contained = shift;
4607+ my $container = shift;
4608+ my $container_type = shift;
4609+
4610+ if ($container eq $contained)
4611+ {
4612+ return 1;
4613+ }
4614+
4615+ if ($container_type eq 'd')
4616+ {
4617+ my $dirname = "$container/";
4618+ my $dirname_length = length($dirname);
4619+
4620+ if ($dirname_length <= length($contained) and
4621+ $dirname eq substr($contained, 0, $dirname_length))
4622+ {
4623+ return 1;
4624+ }
4625+ }
4626+
4627+ return 0;
4628+}
4629+
4630+# Take an array reference containing a list of files and directories
4631+# and take a hash reference and remove from the array reference any
4632+# files and directories and the files the directory contains listed in
4633+# the hash.
4634+sub filter_renamed_files
4635+{
4636+ unless (@_ == 2)
4637+ {
4638+ croak "$0: filter_renamed_files $INCORRECT_NUMBER_OF_ARGS";
4639+ }
4640+
4641+ my $array_ref = shift;
4642+ my $hash_ref = shift;
4643+
4644+ foreach my $remove_filename (keys %$hash_ref)
4645+ {
4646+ my $remove_file_type = $hash_ref->{$remove_filename}{type};
4647+ for (my $i=0; $i<@$array_ref;)
4648+ {
4649+ if (contained_in($array_ref->[$i],
4650+ $remove_filename,
4651+ $remove_file_type))
4652+ {
4653+ splice(@$array_ref, $i, 1);
4654+ next;
4655+ }
4656+ ++$i;
4657+ }
4658+ }
4659+}
4660+
4661+# Get a digest hash of the specified filename.
4662+sub digest_hash_file
4663+{
4664+ unless (@_ == 1)
4665+ {
4666+ croak "$0: digest_hash_file $INCORRECT_NUMBER_OF_ARGS";
4667+ }
4668+
4669+ my $filename = shift;
4670+
4671+ my $ctx = Digest::MD5->new;
4672+ if (open(READ, $filename))
4673+ {
4674+ binmode READ;
4675+ $ctx->addfile(*READ);
4676+ close(READ);
4677+ }
4678+ else
4679+ {
4680+ die "$0: cannot open '$filename' for reading: $!\n";
4681+ }
4682+ $ctx->digest;
4683+}
4684+
4685+# Read standard input until a line contains the required input or an
4686+# empty line to signify the default answer.
4687+sub get_answer
4688+{
4689+ unless (@_ == 3)
4690+ {
4691+ croak "$0: get_answer $INCORRECT_NUMBER_OF_ARGS";
4692+ }
4693+
4694+ my $message = shift;
4695+ my $answers = shift;
4696+ my $def_ans = shift;
4697+
4698+ return $def_ans if $opt_no_user_input;
4699+
4700+ my $char;
4701+ do
4702+ {
4703+ print $message;
4704+ $char = '';
4705+ my $line = <STDIN>;
4706+ if (defined $line and length $line)
4707+ {
4708+ $char = substr($line, 0, 1);
4709+ $char = '' if $char eq "\n";
4710+ }
4711+ } until $char eq '' or $answers =~ /$char/ig;
4712+
4713+ return $def_ans if $char eq '';
4714+ return pos($answers) - 1;
4715+}
4716+
4717+# Determine the native end of line on this system by writing a \n in
4718+# non-binary mode to an empty file and reading the same file back in
4719+# binary mode.
4720+sub determine_native_eol
4721+{
4722+ my $filename = "$temp_dir/svn_load_dirs_eol_test.$$";
4723+ if (-e $filename)
4724+ {
4725+ unlink($filename)
4726+ or die "$0: cannot unlink '$filename': $!\n";
4727+ }
4728+
4729+ # Write the \n in non-binary mode.
4730+ open(NL_TEST, ">$filename")
4731+ or die "$0: cannot open '$filename' for writing: $!\n";
4732+ print NL_TEST "\n";
4733+ close(NL_TEST)
4734+ or die "$0: error in closing '$filename' for writing: $!\n";
4735+
4736+ # Read the \n in binary mode.
4737+ open(NL_TEST, $filename)
4738+ or die "$0: cannot open '$filename' for reading: $!\n";
4739+ binmode NL_TEST;
4740+ local $/;
4741+ undef $/;
4742+ my $eol = <NL_TEST>;
4743+ close(NL_TEST)
4744+ or die "$0: cannot close '$filename' for reading: $!\n";
4745+ unlink($filename)
4746+ or die "$0: cannot unlink '$filename': $!\n";
4747+
4748+ my $eol_length = length($eol);
4749+ unless ($eol_length)
4750+ {
4751+ die "$0: native eol length on this system is 0.\n";
4752+ }
4753+
4754+ print "Native EOL on this system is ";
4755+ for (my $i=0; $i<$eol_length; ++$i)
4756+ {
4757+ printf "\\%03o", ord(substr($eol, $i, 1));
4758+ }
4759+ print ".\n\n";
4760+
4761+ $eol;
4762+}
4763+
4764+# Take a filename, open the file and replace all CR, CRLF and LF's
4765+# with the native end of line style for this system.
4766+sub convert_file_to_native_eol
4767+{
4768+ unless (@_ == 1)
4769+ {
4770+ croak "$0: convert_file_to_native_eol $INCORRECT_NUMBER_OF_ARGS";
4771+ }
4772+
4773+ my $filename = shift;
4774+ open(FILE, $filename)
4775+ or die "$0: cannot open '$filename' for reading: $!\n";
4776+ binmode FILE;
4777+ local $/;
4778+ undef $/;
4779+ my $in = <FILE>;
4780+ close(FILE)
4781+ or die "$0: error in closing '$filename' for reading: $!\n";
4782+ my $out = '';
4783+
4784+ # Go through the file and transform it byte by byte.
4785+ my $i = 0;
4786+ while ($i < length($in))
4787+ {
4788+ my $cc = substr($in, $i, 2);
4789+ if ($cc eq "\015\012")
4790+ {
4791+ $out .= $native_eol;
4792+ $i += 2;
4793+ next;
4794+ }
4795+
4796+ my $c = substr($cc, 0, 1);
4797+ if ($c eq "\012" or $c eq "\015")
4798+ {
4799+ $out .= $native_eol;
4800+ }
4801+ else
4802+ {
4803+ $out .= $c;
4804+ }
4805+ ++$i;
4806+ }
4807+
4808+ return 0 if $in eq $out;
4809+
4810+ my $tmp_filename = ".svn/tmp/svn_load_dirs.$$";
4811+ open(FILE, ">$tmp_filename")
4812+ or die "$0: cannot open '$tmp_filename' for writing: $!\n";
4813+ binmode FILE;
4814+ print FILE $out;
4815+ close(FILE)
4816+ or die "$0: cannot close '$tmp_filename' for writing: $!\n";
4817+ rename($tmp_filename, $filename)
4818+ or die "$0: cannot rename '$tmp_filename' to '$filename': $!\n";
4819+
4820+ return 1;
4821+}
4822+
4823+# Split the input line into words taking into account that single or
4824+# double quotes may define a single word with whitespace in it.
4825+sub split_line
4826+{
4827+ unless (@_ == 1)
4828+ {
4829+ croak "$0: split_line $INCORRECT_NUMBER_OF_ARGS";
4830+ }
4831+
4832+ my $line = shift;
4833+
4834+ # Strip leading whitespace. Do not strip trailing whitespace which
4835+ # may be part of quoted text that was never closed.
4836+ $line =~ s/^\s+//;
4837+
4838+ my $line_length = length $line;
4839+ my @words = ();
4840+ my $current_word = '';
4841+ my $in_quote = '';
4842+ my $in_protect = '';
4843+ my $in_space = '';
4844+ my $i = 0;
4845+
4846+ while ($i < $line_length)
4847+ {
4848+ my $c = substr($line, $i, 1);
4849+ ++$i;
4850+
4851+ if ($in_protect)
4852+ {
4853+ if ($c eq $in_quote)
4854+ {
4855+ $current_word .= $c;
4856+ }
4857+ elsif ($c eq '"' or $c eq "'")
4858+ {
4859+ $current_word .= $c;
4860+ }
4861+ else
4862+ {
4863+ $current_word .= "$in_protect$c";
4864+ }
4865+ $in_protect = '';
4866+ }
4867+ elsif ($c eq '\\')
4868+ {
4869+ $in_protect = $c;
4870+ }
4871+ elsif ($in_quote)
4872+ {
4873+ if ($c eq $in_quote)
4874+ {
4875+ $in_quote = '';
4876+ }
4877+ else
4878+ {
4879+ $current_word .= $c;
4880+ }
4881+ }
4882+ elsif ($c eq '"' or $c eq "'")
4883+ {
4884+ $in_quote = $c;
4885+ }
4886+ elsif ($c =~ m/^\s$/)
4887+ {
4888+ unless ($in_space)
4889+ {
4890+ push(@words, $current_word);
4891+ $current_word = '';
4892+ }
4893+ }
4894+ else
4895+ {
4896+ $current_word .= $c;
4897+ }
4898+
4899+ $in_space = $c =~ m/^\s$/;
4900+ }
4901+
4902+ # Handle any leftovers.
4903+ $current_word .= $in_protect if $in_protect;
4904+ push(@words, $current_word) if length $current_word;
4905+
4906+ @words;
4907+}
4908+
4909+# This package exists just to delete the temporary directory.
4910+package Temp::Delete;
4911+
4912+sub new
4913+{
4914+ bless {}, shift;
4915+}
4916+
4917+sub DESTROY
4918+{
4919+ print "Cleaning up $temp_dir\n";
4920+ File::Path::rmtree([$temp_dir], 0, 0);
4921+}
4922
4923=== added file 'contrib/client-side/svn_load_dirs/svn_load_dirs_property_table.example'
4924--- contrib/client-side/svn_load_dirs/svn_load_dirs_property_table.example 1970-01-01 00:00:00 +0000
4925+++ contrib/client-side/svn_load_dirs/svn_load_dirs_property_table.example 2009-12-12 13:21:15 +0000
4926@@ -0,0 +1,29 @@
4927+# This is sample table for svn_load_dirs.pl -p command line option.
4928+\.(ai|eps|ps)$ break svn:mime-type application/postscript
4929+\.bz2$ break svn:mime-type application/x-bzip2
4930+\.css$ break svn:mime-type text/css
4931+\.doc$ break svn:mime-type application/msword
4932+\.ds(p|w)$ break svn:eol-style CRLF
4933+\.exe$ break svn:mime-type application/octet-stream
4934+\.gif$ break svn:mime-type image/gif
4935+\.gtar$ break svn:mime-type application/x-gtar
4936+\.(gz|tgz)$ break svn:mime-type application/x-gzip
4937+\.hqx$ break svn:mime-type application/mac-binhex40
4938+\.html?$ break svn:mime-type text/html
4939+\.ilk$ break svn:eol-style CRLF
4940+\.(jpeg|jpg|jpe)$ break svn:mime-type image/jpeg
4941+\.js$ break svn:mime-type application/x-javascript
4942+\.(mov|qt)$ break svn:mime-type video/quicktime
4943+\.ncb$ break svn:eol-style CRLF
4944+\.opt$ break svn:eol-style CRLF
4945+\.pdf$ break svn:mime-type application/pdf
4946+\.png$ break svn:mime-type image/png
4947+\.pp(s|t)$ break svn:mime-type application/vnd.ms-powerpoint
4948+\.rtf$ break svn:mime-type application/rtf
4949+\.swf$ break svn:mime-type application/x-shockwave-flash
4950+\.tar$ break svn:mime-type application/x-tar
4951+\.tiff?$ break svn:mime-type image/tiff
4952+\.xls$ break svn:mime-type application/vnd.ms-excel
4953+\.zip$ break svn:mime-type application/zip
4954+dos2unix-eol\.sh$ break
4955+#.* break svn:eol-style native
4956
4957=== added file 'contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py'
4958--- contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py 1970-01-01 00:00:00 +0000
4959+++ contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py 2009-12-12 13:21:15 +0000
4960@@ -0,0 +1,452 @@
4961+#!/usr/bin/env python
4962+#
4963+# svnmerge-migrate-history-remotely.py: Remotely migrate merge history from
4964+# svnmerge.py's format to Subversion 1.5's format.
4965+#
4966+# ====================================================================
4967+# Copyright (c) 2008 CollabNet. All rights reserved.
4968+#
4969+# This software is licensed as described in the file COPYING, which
4970+# you should have received as part of this distribution. The terms
4971+# are also available at http://subversion.tigris.org/license-1.html.
4972+# If newer versions of this license are posted there, you may use a
4973+# newer version instead, at your option.
4974+#
4975+# This software consists of voluntary contributions made by many
4976+# individuals. For exact contribution history, see the revision
4977+# history and logs, available at http://subversion.tigris.org/.
4978+# ====================================================================
4979+
4980+# $HeadURL: http://svn.collab.net/repos/svn/branches/1.6.x/contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py $
4981+# $Date: 2009-01-20 22:25:54 +0000 (Tue, 20 Jan 2009) $
4982+# $Author: cmpilato $
4983+# $Rev: 35358 $
4984+
4985+
4986+### THE SVNMERGE HISTORY MIGRATION ALGORITHM EMPLOYED HEREIN
4987+###
4988+### 1. Fetch properties for PATH, looking specifically for
4989+### 'svnmerge-blocked', and 'svnmerge-integrated'.
4990+###
4991+### 2. Convert properties into real mergeinfo. NOTE: svnmerge-*
4992+### properties have a slightly different and more flexible syntax.
4993+###
4994+### 3. Combine mergeinfos together.
4995+###
4996+### 4. [non-naive] Subtract natural history of the merge target from
4997+### its own mergeinfo.
4998+###
4999+### 5. [non-naive] Filter mergeinfo by merge source natural history
5000+### (so that mergeinfo only reflects real locations).
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: