diff --git a/contrib-1187941.tar.bz2 b/contrib-1187941.tar.bz2 deleted file mode 100644 index cf774de..0000000 --- a/contrib-1187941.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f316a8e662f1730ee6f8ac3da5ea375b9cc4923e9022066880d38eb75dd267f5 -size 294963 diff --git a/contrib-1485350.tar.bz2 b/contrib-1485350.tar.bz2 new file mode 100644 index 0000000..1e427e3 --- /dev/null +++ b/contrib-1485350.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9919eb327d8acc32473737c6ec6dee85b2d1ffb4a276ea3bd03b9722c12967e8 +size 293043 diff --git a/sqlite-amalgamation-3071501.zip b/sqlite-amalgamation-3071501.zip new file mode 100644 index 0000000..c6969c6 --- /dev/null +++ b/sqlite-amalgamation-3071501.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c90b21864a5df1f46e7a3cd7ee6bcfc3e050db4e3a24f2c6a3996970584c383c +size 1396268 diff --git a/sqlite-autoconf-3070603.tar.bz2 b/sqlite-autoconf-3070603.tar.bz2 deleted file mode 100644 index e250828..0000000 --- a/sqlite-autoconf-3070603.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22cf70872a5bad5f8aad338b6373af6ad001a08a4dd70f4315d86acaa44cafe1 -size 1280774 diff --git a/subversion-1.7.10.tar.bz2 b/subversion-1.7.10.tar.bz2 deleted file mode 100644 index 2fc362f..0000000 --- a/subversion-1.7.10.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1df222bec83d014d17785e2ceba6bc80962f64b280967de0285836d8d77a8e7 -size 5952121 diff --git a/subversion-1.7.10.tar.bz2.asc b/subversion-1.7.10.tar.bz2.asc deleted file mode 100644 index a9b1b2a..0000000 --- a/subversion-1.7.10.tar.bz2.asc +++ /dev/null @@ -1,74 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.13 (OpenBSD) - -iQEcBAABAgAGBQJRnUIdAAoJEE99uqmaWblzOuMH/0FyKuG3mW4y4wt+swv26fYu -gsQYTbcdePAX9B2hzh92L5I1URDC1F9aZ8JPeUHVgFwzWo9N4aTG/b5ElB1R0EPT -hJuw22I08iHJ5R63wCJ/9Fi1tiTy9xdjSNmMQ+NRgm3muxPu88Ogb7+355KMwkB8 -xZB4L17r3DsCJ0fx8wLqlDoTSP0zEuA27BUvZ4OcELXAZ1nVJU29QXrFqWjQsVt3 -coJEuP4ZTuVB2UAqWQXbMz3YwHhtpfQyry2gMdvSpSULY/iMNrnut1X269tH5vKv -mm+6Ed3ucS2n8MXHMDqTraRvwSzP0QmTtxykX/IniIhLqvu0+q9IfflQG/3KZuk= -=hXr9 ------END PGP SIGNATURE----- ------BEGIN PGP SIGNATURE----- -Version: GnuPG/MacGPG2 v2.0.19 (Darwin) -Comment: GPGTools - http://gpgtools.org - -iQIcBAABCgAGBQJRn9bXAAoJEGLUj60WoN4BrDoQAIUE3WmkSfG6A5rJxJrmlC6d -a5hVGIE+q3usZhm4sDEgEhf7C7eQq7qbRACelep+xPki7ZY85rnqauGlRUBI5A9X -kkTdij1+XDJ0+nj30wmmrIOfmuuUU2dqnKHge5a3LjZmii+9wPoK7fvRxccky6n/ -1e39iwOj7C6cmGkadsGHCnFUic+U7KBFqb2KyRGUaW/sPPWO5FvYV23vFjgnOV7r -DOhn1lhq/cfTYeOvtJ5Cxg6/N0rfP9fw4OYVKSPAhtBs4lSw1DB4hDNMjp16QZgC -gxfdjtpiYri5R24TtMbUyXzo4WQtgrSDlPaw/GScdh8+T5V+2VHjQJslp9B27oNr -Db+GuYMRMLg+6FMSoICa6ezY5Caz+O0Plcxx5gqg1rZYaE8R6GkA7EN04CHEQgBJ -bFMb0be214X0pDjyJiyq4ufKHgqYhQw81OLl3JbnGzxpJXqpdXwP4++L+JcjSEfS -9J9qyoGSRU59c1k/FAHP908aBmmVgM1U5o7MXhO6vthxV3U+deglLPW6EkM/tyHe -hZJF/YtTTaELiBtDOlyEK6DfMtZKj9KpV/45/eC2Hh5Xn+rHR770JP9jXkB855RN -MHKchEwTCG5P5x+BMxe6sLh15nzOTePuIEQUTKMthv2m2UT8qcrvL9kuxxmuTWnV -sxFTLc3fsospoBUcHkl3 -=l3Fp ------END PGP SIGNATURE----- ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.12 (GNU/Linux) - -iQEcBAABCAAGBQJRoH2eAAoJEHbXiOHtGlmcMM8H/0lkLXfY4ioYQJlswMjjbR3R -sLzvPaXAgr6EUGIpib/FBi5eG9vZ7zLQsnH6y4GBNhVT/GFhfHRdu8d8MN6MEmel -YWfYT+/K4nfes7Uugz7rUN3wtYnXTREbwmOhsz2iPesRzvKsaZPW7GoWZW9PXsr4 -uAbEf59+1SBTqRaMXWJoUhmXq3L6C6QSHw/en6CVhxhcrIosB/8pHp5SSyWTKdOb -23vHe9Iz7y4tNISDZa3obU12M93UuYzrhrWALzhuBz1CPQFRj88HddHqAZRPGYBH -HWzBdaNV4QkEs9UtjeCGs3LG3US4ouFrn0Rs4t/Bguhb8iwMq2Pbmyy+UV/Q2bg= -=8BwG ------END PGP SIGNATURE----- ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iQIcBAABCAAGBQJRn7R5AAoJEPXg8AH+aBMzKoYP/1ra6222Ui7MkdJegN4HIWUT -hZXcnvj5nHcIHoNTNX7EPIR5rVUknApzJyHJvdoy9W/2JtzbFmn47VaT8ULphGnK -1+DAJUcB8vRxk0I9nXUGj+Bx3IYtkQrGrKdB5mu5meIPNNiZTX/5fSJio6q9KklK -JmTOjSNr7uZJdRXO1nUFWiHcg7V6M/Zoc7j0PdfSVTOZ9W15av7M/MQDjipaPrfQ -K8iWMC6V8fQUd7GXK5EsWplC6yr7k20j7ZeapUSAeDMZ94enI1omjjvFKlrROTuo -NLAeG5puTPBN6hdLgpMfNxqWJfi1+5a6OPAb/FZbImHydX77xbAQLg3p7cUYMaXd -kkVm5U7GnFWIOhij0yFwa6p+1B2xF9NfuyIqevbBifgRDRa8S2WF9UXd6OGxDHge -h9BZTJgOTCWgo6WH7LajFWx18wgNqB5ZPWJUmNqdimB0kfYQhmblW1T4rtp6f415 -V7CDSm1lYx8RDkmk67EgANL9JxW/G2fj2o13JGXaRZQnkCajYWqs/KMHIfHhh/KK -yjc5leMqKhWHBcR1EoF8jpOLgDNiDS6viCOBVILZw9nclXMZqGpmWlQ+yyQ+RIs7 -2Exh5/YAQa/nUXWvYXX+Sqd8Z9jHXZzhzGYUDzMglfK0rYiqiXA0H6e5hAVPKOaB -gSQMb7Q/+NNWl8mz4jXJ -=rbqu ------END PGP SIGNATURE----- ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.11 (GNU/Linux) - -iQIcBAABCAAGBQJRo8Y9AAoJEB+wZLhO7MST55AQAMjsaMbrD2Rj1XZf2CBxq3nj -6K0RbuitgY1ZN9ID2rzdBavyY+F+7lcTQqf6bLV5oOdPfVeRYnFM0mm3Lmft2Q3D -uLcgMNH0ldKhvU9rWx/cBfLVtkhhc3Sbw1uLfWiHEHEq8PaPmXSnhj+FmWZxIIQo -OwAvCjzGbVOPohndof7G6TWmbqgfOMioGQa8q5FvNM7MU2zHT5HXEvd80vu9LYO3 -IQSAyWJ8oWNxaal0cBUpY5Ps58UxzRxgCoDqbloSEDQrkzxo+Y9DhY9YXsagF93o -07unC49x7bIagZieps0AI5u6HAB+HQb77VxdZ3F3QIeThAsMikyluCNb+XHcOFhx -+B2s9fwdufndJF84CYD/BS0Qt6Unph7GENE0hbNJq+k/XiWJ6g5qGeWKAhVp71fB -SagqmksH05scjwM3GFlmqcUJRUERPs0HqGRFPDqVRXLRiL0LgYg/P2pGJNj8qI7A -dmxe3Uncz25ntjN2U0H0+vHr9AEbA4olLSzO8mnfieeDn/C3S3ZAp9A7npABJTYj -mSLjx5snKgpOaE7vdNSjD9BhyHr/3bLryHCoNZ4m9uGFzkoTUTq52hsf4PPG6xYD -Bxk+540hYlif6w1Y/v/5QyHszRbT9D8Ef+l8xlyOPq9yiAEbJon+LJibwjYu+zlS -TlBAvncAwfpbTLpRpjf9 -=J44D ------END PGP SIGNATURE----- diff --git a/subversion-1.7.4-ruby-1.9-RbConfig.patch b/subversion-1.7.4-ruby-1.9-RbConfig.patch deleted file mode 100644 index 24e10da..0000000 --- a/subversion-1.7.4-ruby-1.9-RbConfig.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Andreas Stieger -Date: Sat, 12 May 2012 00:20:35 +0100 -Subject: [PATCH] fix Ruby 1.9 deprecation warning for Config, use RbConfig -References: http://mail-archives.apache.org/mod_mbox/subversion-dev/201205.mbox/%3C4FAD9EC3.1030207%40gmx.de%3E https://mail-archives.apache.org/mod_mbox/subversion-commits/201205.mbox/%3C20120512111900.C40DB2388860%40eris.apache.org%3E -Upstream: merged - -Fixes warning/error in ruby 1.9 "Use RbConfig instead of obsolete and deprecated Config" - -$ svn log -r1337514 -v https://svn.apache.org/repos/asf/subversion/trunk/ ------------------------------------------------------------------------- -r1337514 | astieger | 2012-05-12 12:19:00 +0100 (Sat, 12 May 2012) | 9 lines -Changed paths: - M /subversion/trunk/build/ac-macros/swig.m4 - M /subversion/trunk/configure.ac - -fix Ruby 1.9 deprecation warning for Config, use RbConfig - -* configure.ac - replace Config with RbConfig -* build/ac-macros/swig.m4 - replace Config with RbConfig - -Approved by: gstein - ---- - build/ac-macros/swig.m4 | 2 +- - configure.ac | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -Index: subversion-1.7.8/build/ac-macros/swig.m4 -=================================================================== ---- subversion-1.7.8.orig/build/ac-macros/swig.m4 2011-06-22 15:45:03.000000000 +0100 -+++ subversion-1.7.8/build/ac-macros/swig.m4 2012-12-11 13:00:18.000000000 +0000 -@@ -187,7 +187,7 @@ AC_DEFUN(SVN_FIND_SWIG, - for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ - rubyhdrdir sitedir sitelibdir sitearchdir libdir - do -- rbconfig_tmp=`$rbconfig "print Config::CONFIG@<:@'$var_name'@:>@"` -+ rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG@<:@'$var_name'@:>@"` - eval "rbconfig_$var_name=\"$rbconfig_tmp\"" - done - -Index: subversion-1.7.8/configure.ac -=================================================================== ---- subversion-1.7.8.orig/configure.ac 2012-10-02 18:18:00.000000000 +0100 -+++ subversion-1.7.8/configure.ac 2012-12-11 13:00:18.000000000 +0000 -@@ -1117,12 +1117,12 @@ if test "$RUBY" != "none"; then - AC_PATH_PROGS(RDOC, rdoc rdoc1.8 rdoc18, none) - fi - AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[ -- svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MAJOR))'`" -+ svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MAJOR))'`" - ]) - RUBY_MAJOR="$svn_cv_ruby_major" - - AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[ -- svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MINOR))'`" -+ svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MINOR))'`" - ]) - RUBY_MINOR="$svn_cv_ruby_minor" - diff --git a/subversion-1.7.8-TestHarness_run_py_test_exit_code.patch b/subversion-1.7.8-TestHarness_run_py_test_exit_code.patch deleted file mode 100644 index 9ed3672..0000000 --- a/subversion-1.7.8-TestHarness_run_py_test_exit_code.patch +++ /dev/null @@ -1,35 +0,0 @@ -Date: Wed, 12 Dec 2012 20:01:11 +0000 -From: Andreas Stieger -Subject: [PATCH] Prevent false negative results of "make check" in Python -References: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?r1=1420904&r2=1420944&pathrev=1420944 -Upstream: merged - -Patch changes the test harness to prevent some false negatives when -running the test suite. Specifically, if a python test initialisation -returns in such a way that the test runner doesn't know how to handle -the result, change to code to return a non-zero exit code like and, -subsequently, have "make check" fail correctly. Reproducible by using -Python < 2.5 or missing sqlite3 Python bindings, exit triggered by -subversion/tests/cmdline/svntest/__init__.py - -In the openSUSE obs, affects SLE 11 only, when building with unit tests. - -svn diff -c1420944 https://svn.apache.org/repos/asf/subversion/trunk - ---- - build/run_tests.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: subversion-1.7.8/build/run_tests.py -=================================================================== ---- subversion-1.7.8.orig/build/run_tests.py 2012-09-29 05:02:11.000000000 +0100 -+++ subversion-1.7.8/build/run_tests.py 2012-12-12 20:48:29.000000000 +0000 -@@ -378,7 +378,7 @@ class TestHarness: - ('.py', 'U', imp.PY_SOURCE)) - except: - print('Don\'t know what to do about ' + progbase) -- raise -+ sys.exit(1) - - import svntest.main - diff --git a/subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch b/subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch deleted file mode 100644 index 4afb054..0000000 --- a/subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Andreas Stieger -Date: 2013-05-21 17:43:00 +0100 -Subject: [PATCH] do not clear LD_LIBRARY_PATH in davautocheck.sh -Upstream: merged -References: http://svn.apache.org/viewvc?view=revision&revision=1197065 - -During "make check", auth-test loads DSOs at runtime and cannot find them -unless LD_LIBRARY_PATH inlucdes subversion/libsvn_auth_kwallet/.libs and -/subversion/libsvn_auth_gnome_keyring/.libs. - -Adjust davautocheck.sh so that LD_LIBRARY_PATH is prepended to rather -than overwritten so that the spec file can set the required paths for -the auth-tests to pass. - -Actually then found to have been fixed in the trunk in r1197065. Required -for unit tests with 1.7.x but not 1.8.x - ---- - subversion/tests/cmdline/dav-mirror-autocheck.sh | 2 +- - subversion/tests/cmdline/davautocheck.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: subversion-1.7.9/subversion/tests/cmdline/dav-mirror-autocheck.sh -=================================================================== ---- subversion-1.7.9.orig/subversion/tests/cmdline/dav-mirror-autocheck.sh 2011-04-21 12:42:32.000000000 +0100 -+++ subversion-1.7.9/subversion/tests/cmdline/dav-mirror-autocheck.sh 2013-05-21 20:32:40.000000000 +0100 -@@ -323,7 +323,7 @@ fi - [ -r "$MOD_AUTHZ_SVN" ] \ - || fail "authz_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script" - --export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs" -+export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs:$LD_LIBRARY_PATH" - - MASTER_REPOS="${MASTER_REPOS:-"$HTTPD_ROOT/master_repos"}" - SLAVE_REPOS="${SLAVE_REPOS:-"$HTTPD_ROOT/slave_repos"}" -Index: subversion-1.7.9/subversion/tests/cmdline/davautocheck.sh -=================================================================== ---- subversion-1.7.9.orig/subversion/tests/cmdline/davautocheck.sh 2012-05-13 05:03:03.000000000 +0100 -+++ subversion-1.7.9/subversion/tests/cmdline/davautocheck.sh 2013-05-21 20:32:40.000000000 +0100 -@@ -198,7 +198,7 @@ fi - [ -r "$MOD_AUTHZ_SVN" ] \ - || fail "authz_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script" - --export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs" -+export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs:$LD_LIBRARY_PATH" - - case "`uname`" in - Darwin*) LDD='otool -L' diff --git a/subversion-1.8.0.tar.bz2 b/subversion-1.8.0.tar.bz2 new file mode 100644 index 0000000..9e69a89 --- /dev/null +++ b/subversion-1.8.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a470803293a8aced445cff0f7b24b95ad276600af55d4b24b1e196fd2de87f10 +size 6711904 diff --git a/subversion-1.8.0.tar.bz2.asc b/subversion-1.8.0.tar.bz2.asc new file mode 100644 index 0000000..b9f22d8 --- /dev/null +++ b/subversion-1.8.0.tar.bz2.asc @@ -0,0 +1,76 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG/MacGPG2 v2.0.18 (Darwin) +Comment: GPGTools - http://gpgtools.org + +iQIcBAABCgAGBQJRuZJdAAoJEGLUj60WoN4B24IP/3uFSZrIA5a4nbrb2gzQIBZL +sS6yKC2uA7lpAJx6eG8GVN9P5PMZtWfdYRBcq9Pm+hPaHaG9jhj04hck5aR5wwyg +YEm4bsMfkeG/IPpBCOg2kuU9KipqCOeRIJFhbOMz3ctWnJc/WTPSAI7YsrRE7NuG +mQexpTWt04BdHviDDg7hZDAN0eYXKud42hk+UxQYjiejCt1/84EtfQIsHs5GXFay +5g+X9gc4iIDmPle5Y52aZ3gOejgu/sJN80zU3j+C8CqG5aniuLPkmSKgbPd7l1M4 +idGO0tROH6dUYRIIG8q0uoCaBK02+Kw2gpZSsYvf6EvEBAeHQCYFwq0iVBlrUGBZ +2iUEJfXJ4VWQm5w4SzVPyEeaNWtDh66J6ZM89JEVe6pnT5GDLgDu1Fu5r1QHJ5pq +wuFzxdHXGl4KRUJOZT4oHzycjVEePIZRAQKQ2joJ36Q/zs9ZyiTw0nL9ATyNeQd8 +Sv8SudI7rgrHMy1GIcYbzIVdG+58Ad+WqAndgmG1KJrKZA7SG5U7UTayJXYIKhfe +7hnNrn3OcyG9saftD2VZ2vyefBDbeFRcFwqP2ZCfTNqNxx1LC3UFqEQ78KHm8CDY +fVLv8xfPBXm8S+eVRCILXP1fFf1MzEvDwlPELYboJrCqnvPUUYa8pjsuGb2ZBGtC +82GNrq1om9tA/L86t1C3 +=BPj9 +-----END PGP SIGNATURE----- +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.13 (OpenBSD) + +iQEcBAABAgAGBQJRuz/qAAoJEE99uqmaWblzVhcIAKGghKe6ZRRefpfRBQ2Kbdso +T0mDFeKAnfPfdf3EDSvaqOLCNoY8wOlmx7nbsYGJPnsNoz66XerPlgzhZoC6tHUT +Yn48q7DAkcB2FYg9oJlgvQxRELpsZIcW53rC/EEPkZWTScY2fTLf8DM6NgQGFiE0 ++9dOheRycsoSESjzzsVVyBcprydWfXT3IOuOao9jSO85m32t0XgbxZtzNOewEzgX +wEbn91yYTbx+sxTpv8JX9GbH9lE6pqsH/Ldenl5UzZEirCppPKQidm1RFO83+E3r +7gFKOkgO554AqxUgYR6n7i4Q1A00O/kSdt62jhs3gyTfUD2TtIHB1Q7rmZ/3xNk= +=WHUI +-----END PGP SIGNATURE----- +-----BEGIN PGP SIGNATURE----- +Version: GnuPG/MacGPG2 v2.0.19 (Darwin) +Comment: GPGTools - http://gpgtools.org + +iQIcBAABCgAGBQJRvHF5AAoJEBvKZYajR5Q/hqkQAJZY94/Js2joZeGfV7JinmO4 +qRZpnq9h7hPiI1KsRKUelHi2Nx4pSsrCfBJO5j1ma0KQSvcHTT+vulQh21Gajl3e +T1TF7tX77Dsdp7rdPRFrnd3g74koLOPVk8PXM3TSKj5l5TCBHpCflYY9TovfiTYa +efbpXmzVLVeRPfBGeCsXSXKOlhgcmsWjufLGjz1u5sbPrpxQ9ijZegRsZV0P7j5y +vTE4cPQng0hO9kong/o41QDctwEAeunkqF2T7mMv7nkf+J20N2r5UB/d7lUblt0v +2vobIvpR5ZO8bUGqh5do03+bL2AUMvcYMTkmQrylDPTMU/Ou2YXA0ppdjIV4zdfH +wmDc88It7M8bl9MNYOsR7IoNDC8fgGMJIVa+RYeoqyUZS+QS0l5OXcZ3/TIGlT02 +1gSY9HmAfYLCTfC6lOJqcSxB4VCDlHZGRegS81nYoXJe9bVXBH6XYyRP4aZew9v3 +hngDA8EpiwpNQDSe7E7qwmvTDdmh1r0ikcV7OKwldMJBJDGMtDM6LsJL+rQCNmjO +MS7/y2EKEGf3I2gV5QV4GPER/Pbq1jgjunyimA3mqWL4gc2bjX+l9ez1oVxEVJJ5 +IAIYQWhpZfbGVUAvh6grBhczKsVe9n67Mkz01eez+IALpO4u5qYVMM1rHMrpARRf +lyD6mZmF81qy7laFKEqY +=Qo1h +-----END PGP SIGNATURE----- +-----BEGIN PGP SIGNATURE----- +Version: GnuPG/MacGPG2 v2.0.19 (Darwin) +Comment: GPGTools - http://gpgtools.org + +iQEcBAABCgAGBQJRvHDyAAoJECm4ktDIYoUBBZ0H/3jmU3Z9BUQTMUcp9Vqln2CW +wL1uylJOurZNsrSUwxCxeUwAiVvokI59mlDrsYTdNIaSstIRO6/ogGznUzWqE+Hb +icuc4x1sxIMX38sntUxP3W8kwk2wLAlW25emaPmSdylMwMHGRD/plC+NELXVPlVf +ba8gvJ1vtyeqV2UNY2X4OvlKLZrMhEoP9FDNWagN228t5LB1NVEjOyw825jABRhK ++lIevtTTdZg8WGplE1o77NxY36Nv2UFmMOc1JVp3WajmRF5+aedzfvV3mh+xhlQR +tR9E4w5QCHXNm7R0lDFMjDqblS17mLDCg7tVqHl+1SCT2UzuoHp5mllfGiOJ2Ak= +=/ONU +-----END PGP SIGNATURE----- +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iQIcBAABCAAGBQJRvSxHAAoJEPXg8AH+aBMzy7QQAJIhTGb4Mc4ktah//UPLUcXG +cZ/fdIpPxC8OgjNkThjFVljFupvp8bCLSf2/+/EUhbzqmR1i2Xh25qEjvzTWMJHc +idqmL5OSzOWYSq4BDU8I+NuNc4Q6eUWMl8HOiLxcENFeejOOaNecVtoABXzrIryh +VBzByVVBuC7oQztbAmWlsilk5ySaDCKQV9gBihe/adhCS32oojTIeACKnpJE2tXB +1D0ywAl/eLNWALzb42EimIgesc7Qz1XVaby7kUrUfM418prRycqZqGUcVB6VHVog +4Tb9/TocD+y/SrBho/ORSJo7mR/smSXPpYNGgaMXSvXrjU/fUwvqEn835nQ/9dFN +5Eg/twP7Uy6atoj+qLujqcSWhgg0Xvz1mVwLaXGC8L46acKvUSeo7MdlDHGGV4c3 +/Qo8RJ0vHNyZcu6fjkj+QsU0MAvBvhWmwIrCBDVblZn5N7VHx68HHQi//xCoScTq +D+5DA7E+3Qa/HrEUM8n1yEaVnkAJMS30AJ0u2mVfXq+2TeAeyvx2BreLH0cpKe86 +ppWyTz26pId9xEADDaa8MW8AhPxSSwMC3c2WNIRScMzHvioeu/K0YTzc0v3s73np +rmnsK3aaFfgCw735TB+hfAfkLdzOnAVRiC+Wp6HBjAqhIUjtTrFnHBLLN4otNOwJ +27erlHjo1xGYxhnL9QUd +=ld0e +-----END PGP SIGNATURE----- diff --git a/subversion-neon-systemproxy.patch b/subversion-neon-systemproxy.patch deleted file mode 100644 index c28a7e6..0000000 --- a/subversion-neon-systemproxy.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: subversion/libsvn_ra_neon/session.c -=================================================================== ---- subversion/libsvn_ra_neon/session.c.orig 2011-12-21 17:36:12.000000000 +0000 -+++ subversion/libsvn_ra_neon/session.c 2011-12-21 17:36:17.000000000 +0000 -@@ -910,6 +910,17 @@ svn_ra_neon__open(svn_ra_session_t *sess - } - #endif - } -+#ifdef SVN_NEON_0_29 -+ else -+ { -+ /* If we do not have any proxy specified for this host and -+ we're running a new enough neon implementation, we use -+ neon's session proxy autodetection (via libproxy). */ -+ ne_session_system_proxy(sess, 0); -+ ne_session_system_proxy(sess2, 0); -+ } -+#endif -+ - - if (!timeout) - timeout = DEFAULT_HTTP_TIMEOUT; -Index: build/ac-macros/neon.m4 -=================================================================== ---- build/ac-macros/neon.m4.orig 2011-12-21 17:36:12.000000000 +0000 -+++ build/ac-macros/neon.m4 2011-12-21 17:38:02.000000000 +0000 -@@ -100,6 +100,11 @@ AC_DEFUN(SVN_NEON_CONFIG, - [Define to 1 if you have Neon 0.28 or later.]) - fi - -+ if test -n ["`echo "$NEON_VERSION" | $EGREP '^0\.(29|3[0-9])\.'`"] ; then -+ AC_DEFINE_UNQUOTED([SVN_NEON_0_29], [1], -+ [Define to 1 if you have Neon 0.29 or later.]) -+ fi -+ - for svn_allowed_neon in $NEON_ALLOWED_LIST; do - if test -n "`echo "$NEON_VERSION" | grep "^$svn_allowed_neon"`" || - test "$svn_allowed_neon" = "any"; then diff --git a/subversion-no-build-date.patch b/subversion-no-build-date.patch index 4ec36e8..e8dfa3f 100644 --- a/subversion-no-build-date.patch +++ b/subversion-no-build-date.patch @@ -1,27 +1,86 @@ From: Andreas Stieger -Date: 2013-04-07 21:09:15 +0100 -Subject: remove build date and time from binary +Date: Wed, 06 Mar 2013 00:05:08 +0000 +Subject: Remove volatile build information Upstream: never -Prevent unneccessary rebuilds by removing date and time macros. +Prevent unneccessary rebuilds of binary packages differing only by date, time and build host. --- - subversion/libsvn_subr/opt.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) + subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java | 4 ++-- + subversion/libsvn_subr/opt.c | 8 ++------ + subversion/libsvn_subr/version.c | 4 ++-- + subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout | 1 - + subversion/tests/cmdline/getopt_tests_data/svn--version_stdout | 1 - + 5 files changed, 6 insertions(+), 12 deletions(-) -Index: subversion-1.7.9/subversion/libsvn_subr/opt.c +Index: subversion-nightly/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java =================================================================== ---- subversion-1.7.9.orig/subversion/libsvn_subr/opt.c 2013-01-04 03:05:28.000000000 +0000 -+++ subversion-1.7.9/subversion/libsvn_subr/opt.c 2013-04-07 21:09:14.000000000 +0100 -@@ -1084,9 +1084,8 @@ svn_opt__print_version_info(const char * +--- subversion-nightly.orig/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java 2013-04-01 20:57:02.000000000 +0100 ++++ subversion-nightly/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java 2013-04-11 23:50:53.000000000 +0100 +@@ -140,10 +140,10 @@ public class BasicTests extends SVNTests + { + VersionExtended vx = client.getVersionExtended(false); + String result = vx.getBuildDate(); +- if (result == null || result.trim().length() == 0) ++ if (result == null) + throw new Exception("Build date empty"); + result = vx.getBuildTime(); +- if (result == null || result.trim().length() == 0) ++ if (result == null) + throw new Exception("Build time empty"); + result = vx.getBuildHost(); + if (result == null || result.trim().length() == 0) +Index: subversion-nightly/subversion/libsvn_subr/opt.c +=================================================================== +--- subversion-nightly.orig/subversion/libsvn_subr/opt.c 2013-03-23 14:35:40.000000000 +0000 ++++ subversion-nightly/subversion/libsvn_subr/opt.c 2013-04-11 23:51:47.000000000 +0100 +@@ -1114,12 +1114,8 @@ svn_opt__print_version_info(const char * if (quiet) return svn_cmdline_printf(pool, "%s\n", SVN_VER_NUMBER); - SVN_ERR(svn_cmdline_printf(pool, _("%s, version %s\n" -- " compiled %s, %s\n\n"), pgm_name, -- SVN_VERSION, __DATE__, __TIME__)); -+ SVN_ERR(svn_cmdline_printf(pool, _("%s, version %s\n\n"), pgm_name, -+ SVN_VERSION)); - SVN_ERR(svn_cmdline_fputs( - _("Copyright (C) 2013 The Apache Software Foundation.\n" - "This software consists of contributions made by many " +- " compiled %s, %s on %s\n\n"), +- pgm_name, SVN_VERSION, +- svn_version_ext_build_date(info), +- svn_version_ext_build_time(info), +- svn_version_ext_build_host(info))); ++ SVN_ERR(svn_cmdline_printf(pool, _("%s, version %s\n\n"), ++ pgm_name, SVN_VERSION)); + SVN_ERR(svn_cmdline_printf(pool, "%s\n", svn_version_ext_copyright(info))); + + if (footer) +Index: subversion-nightly/subversion/libsvn_subr/version.c +=================================================================== +--- subversion-nightly.orig/subversion/libsvn_subr/version.c 2013-03-22 15:59:11.000000000 +0000 ++++ subversion-nightly/subversion/libsvn_subr/version.c 2013-04-11 23:50:53.000000000 +0100 +@@ -125,8 +125,8 @@ svn_version_extended(svn_boolean_t verbo + { + svn_version_extended_t *info = apr_pcalloc(pool, sizeof(*info)); + +- info->build_date = __DATE__; +- info->build_time = __TIME__; ++ info->build_date = ""; ++ info->build_time = ""; + info->build_host = SVN_BUILD_HOST; + info->copyright = apr_pstrdup + (pool, _("Copyright (C) 2013 The Apache Software Foundation.\n" +Index: subversion-nightly/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout +=================================================================== +--- subversion-nightly.orig/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout 2012-09-10 22:58:53.000000000 +0100 ++++ subversion-nightly/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout 2013-04-11 23:51:25.000000000 +0100 +@@ -1,5 +1,4 @@ + svn, version 1.8.0-dev (under development) +- compiled Sep 10 2012, 14:00:24 on i386-apple-darwin11.4.0 + + Copyright (C) 2012 The Apache Software Foundation. + This software consists of contributions made by many people; +Index: subversion-nightly/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout +=================================================================== +--- subversion-nightly.orig/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout 2012-09-10 13:03:34.000000000 +0100 ++++ subversion-nightly/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout 2013-04-11 23:51:33.000000000 +0100 +@@ -1,5 +1,4 @@ + svn, version 0.16.0 (r3987) +- compiled Dec 5 2002, 00:02:51 + + Copyright (C) 2010 The Apache Software Foundation. + This software consists of contributions made by many people; diff --git a/subversion-swig-perl-install_vendor.patch b/subversion-swig-perl-install_vendor.patch index 78249f4..c53ae09 100644 --- a/subversion-swig-perl-install_vendor.patch +++ b/subversion-swig-perl-install_vendor.patch @@ -1,11 +1,11 @@ Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: Makefile.in +Index: subversion-1.8.0-rc2/Makefile.in =================================================================== ---- Makefile.in.orig 2011-12-21 17:32:20.000000000 +0000 -+++ Makefile.in 2011-12-21 17:32:27.000000000 +0000 -@@ -756,7 +756,7 @@ check-swig-pl: swig-pl swig-pl-lib +--- subversion-1.8.0-rc2.orig/Makefile.in 2013-05-14 20:24:53.000000000 +0100 ++++ subversion-1.8.0-rc2/Makefile.in 2013-05-14 20:24:54.000000000 +0100 +@@ -780,7 +780,7 @@ check-swig-pl: swig-pl swig-pl-lib cd $(SWIG_PL_DIR)/native; $(MAKE) test install-swig-pl: swig-pl install-swig-pl-lib diff --git a/subversion.README.SuSE b/subversion.README.SuSE index 771c4ff..db3e193 100644 --- a/subversion.README.SuSE +++ b/subversion.README.SuSE @@ -6,6 +6,7 @@ An online version can be found at http://svnbook.red-bean.com/ Topics: +0. upgrading to Apache Subversion 1.8 1. mini-howto 2. allowing anonymous read access 3. serving several repositories with SVNParentPath @@ -15,6 +16,32 @@ Topics: ================================================================================ +0. upgrading to Apache Subversion 1.8 + +- concerns when upgrading from earlier versions + * Upgrading the Working Copy + 1.8 introduces a new working copy format. One-time execution of + "svn upgrade" required. After that, clients earlier than 1.8 will + be unable to use the working copy. Working copy must have been + created using 1.6 or 1.7. For details, please see: + https://subversion.apache.org/docs/release-notes/1.8.html#wc-upgrade + * Upgrading the Repository + 1.8 can read and write repositories created by earlier versions. + "svnadmin upgrade" may be used to upgrade to FSFS format 6 of 1.8, + after which the repository will be no longer be usable for 1.7 servers. + An optional dump/load cycle may be used to apply FSFS improvements + to past revisions. + https://subversion.apache.org/docs/release-notes/1.8.html#compatibility + https://subversion.apache.org/docs/release-notes/1.8.html#fsfs-enhancements + * Required configuration changes when using mod_dav_svn with Apache httpd2: + The MaxKeepAliveRequests option in httpd.conf needs to be increased + from 100 (the default) to at least 1000 (there is no reason why it + could not be 10000). This will improve performance by allowing serf + clients to use fewer TCP connections to the server. Clients using + neon will also work fine with this configuration. + +================================================================================ + 1. mini-howto To run a subversion server, you need to configure apache2 to load two modules: @@ -28,6 +55,12 @@ A default/example configuration of the dav_svn module can be found in /etc/apache2/conf.d/subversion.conf. The current default configuration automatically includes this file the default server configuration. +The MaxKeepAliveRequests option in httpd.conf needs to be increased from 100 +(the default) to at least 1000 (there is no reason why it could not be 10000). +This will improve performance by allowing serf clients to use fewer TCP +connections to the server. Clients using neon will also work fine with this +configuration. + Create some directories to contain the repositories and other files: mkdir -p /srv/svn/repos @@ -42,7 +75,7 @@ this, discard this section. If instead you wish to show a list of repositories, set "SVNListParentPath on" later. See for details: -http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.browsing.reposlisting +http://svnbook.red-bean.com/en/1.8/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.browsing.reposlisting The section following that will configure a repository to be served out of the path /srv/svn/repos/myproject1. Note that the location "/repo/myproject1" @@ -152,7 +185,7 @@ To start, ensure proper ownership of repositories and run: service svnserve start For further information about multi-method repository access, see -http://svnbook.red-bean.com/en/1.7/svn.serverconfig.multimethod.html +http://svnbook.red-bean.com/en/1.8/svn.serverconfig.multimethod.html You can test repository access by: @@ -165,7 +198,7 @@ configued access via /srv/svn/repos/repo1/conf/svnserve.conf To configue authentication for svnserve, see -http://svnbook.red-bean.com/en/1.7/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.auth +http://svnbook.red-bean.com/en/1.8/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.auth ================================================================================ diff --git a/subversion.changes b/subversion.changes index 25491c7..9ba1383 100644 --- a/subversion.changes +++ b/subversion.changes @@ -1,3 +1,71 @@ +------------------------------------------------------------------- +Tue Jun 18 00:00:00 UTC 2013 - andreas.stieger@gmx.de + +- Apache Subversion 1.8.0 +- Major new features + * working copy records moves as first-class operation + * merge uses reintegrate mode automatically when needed + * FSFS: Packing of revision property shards + * support inheritable properties + * repository can suggest config for autoprops and ignores + * support gpg-agent for password caching + * authz rules can be stored inside the repository +- concerns when upgrading from earlier versions + * Upgrading the Working Copy + 1.8 introduces a new working copy format. One-time execution of + "svn upgrade" required. After that, clients earlier than 1.8 will + be unable to use the working copy. Working copy must have been + created using 1.6 or 1.7. For details, please see: + https://subversion.apache.org/docs/release-notes/1.8.html#wc-upgrade + * Upgrading the Repository + 1.8 can read and write repositories created by earlier versions. + "svnadmin upgrade" may be used to upgrade to FSFS format 6 of 1.8, + after which the repository will be no longer be usable for 1.7 servers. + An optional dump/load cycle may be used to apply FSFS improvements + to past revisions. + https://subversion.apache.org/docs/release-notes/1.8.html#compatibility + https://subversion.apache.org/docs/release-notes/1.8.html#fsfs-enhancements + * Required configuration changes when using mod_dav_svn with Apache httpd2: + The MaxKeepAliveRequests option in httpd.conf needs to be increased + from 100 (the default) to at least 1000 (there is no reason why it + could not be 10000). This will improve performance by allowing serf + clients to use fewer TCP connections to the server. Clients using + neon will also work fine with this configuration. +- many minor features and improvements listed in: + https://subversion.apache.org/docs/release-notes/1.8.html + http://svn.apache.org/repos/asf/subversion/tags/1.8.0/CHANGES +- Deprecations: + * require serf as client-side http library (neon support removed) + * deprecate the Berkeley DB FS backend (libsvn_fs_base) +- packaging changes: + * ra_serf is now the only http library + * remove neon dependency, ra_neon removed upstream + * update in-tree sqlite to recommended version 3.7.15.1 + * build with sqlite amalgamation for openSUSE 12.2 and earlier + * dropped patches, accepted upstream: + subversion-1.7.4-ruby-1.9-RbConfig.patch + subversion-1.7.8-TestHarness_run_py_test_exit_code.patch + * dropped patches, no longer required: + subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch + Also setting LD_LIBRARY_PATH no longer required for tests. + * dropped patches, feature removed upstream: + subversion-neon-systemproxy.patch + * updated patches for upstream changes: + subversion-no-build-date.patch + subversion-swig-perl-install_vendor.patch + subversion.libtool-verbose.patch + subversion.perl.LD_RUN_PATH.patch + subversion.libtool-pie-flags.patch + * update tools installation, svnmucc is now a first order tool + * updated build requirements: + + python >= 2.5 + + serf >= 1.2.1 + + ruby 1.8.x, >= 1.8.2 or 1.9.3 + * build ruby bindings again for openSUSE 12.3 and Factory + * fix detection of ruby sitelib directory + * remove obsolete tool svnmerge.py + * update contrib package to r1485350 + ------------------------------------------------------------------- Sat Jun 15 23:20:09 UTC 2013 - andreas.stieger@gmx.de diff --git a/subversion.keyring b/subversion.keyring index 5ef3e9d..cfc9052 100644 --- a/subversion.keyring +++ b/subversion.keyring @@ -6,7 +6,7 @@ uid Greg Stein uid Greg Stein -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBD1bRO4RBACFxCQEk8j9a9SSzVIFUg6EKAXabSii1f2vyhdsj7yLd4E2nybA 6907ohpFkIHdOGWAasKKDRG3rpL1X37c5dxUYgGFGyfbe7FapUPP0azq/Wsfn8Ax @@ -877,7 +877,7 @@ uid Branko \xc4\x8cibej sub 2048R/38EB9A57 2005-04-03 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQELBEJPxd4BCACiGbCB4SoehQ58kVa/3TQaFVd8XE1+KX2vIm3Z5Od3xmmibbVy YVxg2C/NIsEAEpFBGANUPrkloCN2aE3hQbNbd6rB2BCvBkk+KeVp+OOE2BpdUBBn @@ -1299,7 +1299,7 @@ uid Brian William Fitzpatrick sub 1024g/C4D0817F 1999-09-08 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBDfWZZQRBACpBaGLjfUj1AnxnfPtv2yLj/5IAvhiZZLRpSBtBxezDxmUJUOF twoA3fABTkJwA+mA/j2Evl0GcBeBJGZLnyodFl9LomwjPdsBryZIBltKjAG1Sj/0 @@ -1531,7 +1531,7 @@ uid [jpeg image of size 8330] sub 4096R/830522D6 2012-10-08 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBFBy+/sBEADGYozqCg0EypAf+WLWkjdStBRWf98JjKR58b1iNhZHntq1rEDI eQpyvBZjzfrZLHVIiSr5qVjwAu1XhPheDy8F+PZNVOpzlcSC9nE1ZyK0q/cbZXiq @@ -1805,7 +1805,7 @@ uid C. Michael Pilato sub 1024g/D88CE17E 2004-06-14 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEDN0pYRBAClirW6MNfy6lTyV4AvCNoDGr29GVx5Cb1DzxwmZKxWMnoVRj08 oPUvm/pR3DO6oq+ugHKN1rSwXeuGVugZWJXsVefZc29J0vgfgzdlye+fs4vYJ2xb @@ -2005,7 +2005,7 @@ uid Justin R. Erenkrantz sub 2048g/8B626683 1999-09-19 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBDflD4IRBADqhgm28jVQWqu8ogG/NvYOSySYc4MhrXFqOQrRxJOcAxdc03fR Mu7RtAa4hXpNfjOLIfxY0cc6aqKJLlOuZAUxNNFWIcuO3xSWsPrwflaBsATt+0jw @@ -3465,7 +3465,7 @@ uid Max Bowsher sub 4096R/AB4F09C1 2011-05-14 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBE3OiZEBEACvSeK+1fknmv21QBaMH3+sImiH9Iao+dNcFM1EM0Q/bBE96IT0 HhMylBVnAK1aHBRusTFurjOT7/yW2+g9SUxRBjcmuIi0WyRcvW90gkbhPauX/CHj @@ -3717,7 +3717,7 @@ uid Max Bowsher sub 2048g/AF3B563D 2005-02-05 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEIEyD4RBACb+Fl9PmkfIbribsJhuvvQVzfGN3bhOns+UtSszc/0ZA8BkJo4 OxOQnXM9mZiQ/7EXdwNAmjSV2hpuzVJrQ5BcGF2KRQFZlwbJ/ebG13HunWcttNvM @@ -4180,7 +4180,7 @@ pub 1024D/4DF18BE2 2006-07-20 uid Jeremy Whitlock (This is the PGP key for Jeremy Whitlock .) -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBES/1sYRBACWqlYCla67kGt1EYs4Wc4aa8NxQRSkUmjGG/vneSMd4epH6ydK gV3FmMrH9b2shB+S5uKo+qG8KgJ7r+vUC9nJn6iLdKsCsIEH1Ln+DT8wDBxaX+R2 @@ -4205,7 +4205,7 @@ uid Julian Foad sub 2048g/AC1665DA 2008-04-21 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEgMqa0RBACs3NeioAILFVipAOL41UIPFISwjyqGPyRwYp4L9OwFdr/kGv94 1/Pftllwu9IH41iPq4AOPP9gEoqkw0y+ZipJEjh90LOgncosXqOz7JDIfu+6eqqW @@ -4278,7 +4278,7 @@ uid Julian Foad sub 4096R/9D5140CB 2012-10-11 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBFB2JwIBEADP0O07jET+WpolukaVoArxvGL8eNScUs+KPXEhrNeL+2obEatE HURIFnyvcFZgFVAufzdFQPbz+H3AEpUAorfowQjyfLpPc84fq/X+DyxhI+O/9sjS @@ -4377,7 +4377,7 @@ uid Ivan Zhakov sub 4096R/C1F0F3B9 2013-04-01 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBFFZa3wBEADXN2umZqUrLWqOaymsN8rfvTx39V0cj4G9dfdPmx3xeIvJEoKE 2NnpN3BgYY+PDlY8XMuu9idUyreDIGb/SZL6ihQRFIkM1LNhYYvKma3UsqJ/+K/C @@ -4434,7 +4434,7 @@ uid Paul T. Burba sub 4096R/552AF6EF 2012-12-11 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBFDHkigBEACbZzrCCTNLW34+9ZVfs5r2qGzIG+pULWsk647ItoXKGEZ4m40T TxAZXvtBauYR6oeclXY6RQyYoi1i3OGP3VNh1lsaY3oLxxcWTBHxE+f+qnp1A16N @@ -4509,7 +4509,7 @@ uid [jpeg image of size 4854] sub 4096g/8D8BA92B 2005-05-13 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEKE95oRBACPaJTtIZYzmpILZamUuBkNGOp1sZkcNaWIf1wokFXw54rcxWXf /rUYx1/vGYWT2XGrnuI3/JlQD0RA7G+xwBaJ0fGfQiKQjmVVV72Qf7g1PB3Cp+6w @@ -6157,7 +6157,7 @@ uid Mark Phippard (markphip) sub 2048g/63C81123 2007-12-09 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEdcAyURBAD7UF11q0Uxa3pxEgngfZkaTjxmw/f1RvpSP+inlDvnFq/pNhEp HIuVNYw3PdNfJQ+N/Cydlt5dbLwlcYjYyj60ZQlPMIV/hRH9nZCg744SrHE7BkWv @@ -6193,7 +6193,7 @@ uid Blair Zajac sub 2048g/D2A97751 2005-03-28 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEJHiucRBACInJS8Mb744CJIg9F9d/KbL5OgBCjjRme4zkvf6JV1C/Hm8JkE caGHXlHYWk1aTkwVZHd3NNo3KZeUg8P0sgIh3vsVAU2MFVGrZIofAHKgvCUGkElD @@ -6264,7 +6264,7 @@ uid Stefan Sperling sub 2048R/1F5A49FB 2012-10-23 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQENBFCGhv8BCADVQ5AV0768s5v2RUqTHh4eyBRRwm6KAXKOSknUh4sdhrQB6uTP hOJrIEFF6ozqHeRVLpfPF8HrSzEXwQeCdu7Y0cu0D93CNRPfbwArObBy7iuvZzXE @@ -6391,7 +6391,7 @@ uid Stefan Sperling (Elego Software Solutions GmbH) sub 3072g/C307B960 2009-08-05 [expires: 2014-08-14] -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEp5/fkRBACQ4CU2w72NeH8feIRjqwE2XxKEdf6HZ2ae9TKOsz/ZTErAoSYG Ywj9juTqmTc7BO7jOakdW2HBFZ+t/+95U+iZoJUU/+vL/TeKY72z0EuAIzTmflWx @@ -8386,7 +8386,7 @@ uid Senthil Kumaran S sub 2048g/F902D62D 2008-07-02 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEhra/QRBACJCtNyVyi8+iH45zmHlw7vnU8ipoYQRCIpjKu8dDDnn2J2AgiQ bdRY3s6jGmlwdkxD51L5qejiOWnRMJbc6n90D0z1U7e0v9Bb0F0AaPjxS9aZXxp+ @@ -8449,7 +8449,7 @@ uid Jostein Chr. Andersen (General Key) sub 2048g/EFC2899F 2007-09-18 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEbvm9gRBADwqrGXyYZFR6TJ+llGdqVMvbGVdJx7TCEziBqgXwHDG0FbW9Id OvalvUY31JvsKT632Wz6++B1ceYUcXMzuOWxZlHneQAGXnu7C9ZPvi6PFFmCsUy8 @@ -8498,7 +8498,7 @@ uid [jpeg image of size 12985] sub 2048g/A0A215FC 2004-05-25 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBDPG2+4RBADXCEi2slv6ZyLCURMPgE47ddIXqZJrqNKOzQks/ob6iyECFvWD GHsElNdAvEF5LoMHbigavSRsY9y9y3H3lyOcVMYmg7oS44AkELYhIeoqrjWYXTbD @@ -11040,7 +11040,7 @@ uid [jpeg image of size 10861] sub 2048R/7547A8A9 2008-02-02 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQENBEekKYIBCADoq2adWRvlki6f3GyUgKWIqSRifhSqMcdqMrooP7qWn2PfiTFQ KjeFoUKua+W1IeQAC0i9ATTmDhCMC5Oy5fq/grWlPPj9J2wRVDvUn3Tml75CC1wq @@ -12046,7 +12046,7 @@ uid Bert Huijben sub 4096g/105F872D 2008-10-10 [expires: 2016-10-08] -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEjvQ+kRBACuegU5uzlZnaN2ee8597GfxfpQhwfvhSXZ3qxdQFzRL0Jc9b/K AY/X8eT8jasucwnbLY+W3pLshMWwGR2sco7pIzws1s/9vmntu7zTnV2ICTyK+jGq @@ -12211,7 +12211,7 @@ uid Bert Huijben sub 4096R/5065EB6D 2012-09-18 [expires: 2020-09-16] -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBFBXyBwBEADWUjMUWlklDw3yCTnD8qIBwp4SGInslNp5EQFmkZDrc3f9h7EG hoHT88AuoyJFAZiJLWVc7ULKWM5XjkC865/MO9Lqw8yDJnm8LaHCdE2iLntkoFRq @@ -12296,7 +12296,7 @@ uid Philip Martin uid Philip Martin -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQENBEtUtcgBCACtSyRpMQWQEE+aggXFxvFJIYz7H3fWggQoRRvoztMJPYcEhWt2 nxsWPc16waWNo98uqvqNqNzE0fip2E/Hs7omKI5GtXl094mKn93bmwqbiBUL+p/3 @@ -12733,7 +12733,7 @@ uid Jelmer Vernooij sub 1024g/93C471CD 2001-10-30 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBDve33cRBACY+4UBw8lSvL4cTFJU7AxuigeEbvIx9Hq0jnhSnzs1VEVNrIF6 1bqGvHYaPoqF1yTLwU0f8ku70XKFQjBNxYAKO3z4rXh+CBCe6LEMoZvl9SRPViGG @@ -22164,7 +22164,7 @@ uid Jelmer Vernooij sub 4096R/1DB3C01A 2009-07-05 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBEpQwsABEACqYMFfTgdeBfCGdgavnGu3jzWAU0+l/ILYZLOjYUumFOmXkSUH AD9YxGh/SXi+UO9K9wnbSWaH63sZSYoHP7pnP9GoegQODQqZQI0lhFZieJjkVmgQ @@ -30136,7 +30136,7 @@ uid Neels Janosch Hofmeyr (Subversion) sub 2048g/7584CE0B 2008-05-16 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBEgt8nURBACs4zhGf6YCyno/76D7llE2v7Iac8Yx9EOiQCtgWp3Yo8+EBxKa uo+7Wz1EY0BjWPwrTE2z39uAlMCh04ljdt75Zq6aS9csxrOAhN7xIy4JLSErOfUh @@ -30274,7 +30274,7 @@ pub 4096R/C232B454 2011-05-18 [expired: 2012-05-17] uid Stefan Fuhrmann -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBE3TF2ABEADDhqWikW5+jfMyzrlgSx6wCJlxImpVDcDCaRzgPWOoacRFKtdA s+RE/Y9bWoCJyOqRz34xhUYYHX3JMCGEq7fRD+Is/5gl5rehVDzEqkQmUYdObrS4 @@ -30364,7 +30364,7 @@ uid Ramkumar Ramachandra (artagnon) sub 2048R/6FC9FB42 2009-09-28 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQENBErAw2ABCADRhHz/FSgjSDN6+Hvh1Ipjl+RsmGDMYIanxk08pUaO+4tridXC L6RMeXFsVFSkEAXOsxAGKHM3MbqNyk/uXdf8P8CcbkvYcTaRHFJAueBN7Ot1z1aF @@ -30414,7 +30414,7 @@ uid Johan Corveleyn sub 4096R/781EAAF9 2010-09-19 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBEyV1RABEADLj63b8G0xcpyMLruCLvB/VatArRY+vevbDUJOxWPJ9UzbIPus sB7ymcLlXt/X34TEIsAMTQRXo/ylQ4cfihWbEeI8Qhu3gXjRpXKeb4m+CdppPaQ5 @@ -30553,7 +30553,7 @@ uid Ben Reser sub 4096R/5EF5CC13 2011-01-28 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQINBE1CV48BEAC7OiEWFfHiHd6AQbYfSOEw2Gv0Z7GcySDfdHsDX3VBGVUrrQGi 1a2AEFQNyj2pvQxBhlW5eP92ZKL30S7/4aYOeqxuvjDFq5gBYn0Nll7nsKFSstJa @@ -31567,7 +31567,7 @@ uid Joe Schaefer sub 1024g/ED4260B6 2003-06-13 -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) +Version: GnuPG v2.0.19 (FreeBSD) mQGiBD7qX7gRBACxF9D8+GYaiLC/c7eyNwuxQJtbkm6myjuhUoZsG6o0Z4SPNqP7 dlQn3uYIQeRrT3pZjXCpcxYAq10c2QpDNR/Ip3w20FXF/QDGZZ/B+DRAY0Te7jv5 diff --git a/subversion.libtool-pie-flags.patch b/subversion.libtool-pie-flags.patch index 1863cab..d0da7c7 100644 --- a/subversion.libtool-pie-flags.patch +++ b/subversion.libtool-pie-flags.patch @@ -1,8 +1,12 @@ -Index: Makefile.in +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: subversion-nightly/Makefile.in =================================================================== ---- Makefile.in.orig 2011-12-21 17:32:27.000000000 +0000 -+++ Makefile.in 2011-12-21 17:32:31.000000000 +0000 -@@ -231,8 +231,8 @@ libsvn_subr_LDFLAGS = @libsvn_subr_LDFLA +--- subversion-nightly.orig/Makefile.in 2013-03-17 20:02:10.000000000 +0000 ++++ subversion-nightly/Makefile.in 2013-03-17 20:02:15.000000000 +0000 +@@ -228,8 +228,8 @@ libsvn_subr_LDFLAGS = @libsvn_subr_LDFLA libsvn_wc_LDFLAGS = @libsvn_wc_LDFLAGS@ # Compilation of SWIG-generated C source code diff --git a/subversion.libtool-verbose.patch b/subversion.libtool-verbose.patch index ad97aba..a734300 100644 --- a/subversion.libtool-verbose.patch +++ b/subversion.libtool-verbose.patch @@ -1,7 +1,11 @@ -Index: Makefile.in +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: subversion-nightly/Makefile.in =================================================================== ---- Makefile.in.orig 2011-07-16 12:50:53.000000000 +0100 -+++ Makefile.in 2011-12-21 17:32:20.000000000 +0000 +--- subversion-nightly.orig/Makefile.in 2013-03-15 12:21:46.000000000 +0000 ++++ subversion-nightly/Makefile.in 2013-03-17 20:02:04.000000000 +0000 @@ -112,8 +112,8 @@ EXEEXT = @EXEEXT@ SHELL = @SHELL@ diff --git a/subversion.perl.LD_RUN_PATH.patch b/subversion.perl.LD_RUN_PATH.patch index 15dbcc9..61429d1 100644 --- a/subversion.perl.LD_RUN_PATH.patch +++ b/subversion.perl.LD_RUN_PATH.patch @@ -6,11 +6,11 @@ ERROR: RPATH "/usr/src/packages/BUILD/subversion-1.5.x/subversion/libsvn_subr/.l Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: Makefile.in +Index: subversion-1.8.0-rc2/Makefile.in =================================================================== ---- Makefile.in.orig 2011-12-21 17:32:31.000000000 +0000 -+++ Makefile.in 2011-12-21 17:32:35.000000000 +0000 -@@ -736,7 +736,7 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWI +--- subversion-1.8.0-rc2.orig/Makefile.in 2013-05-14 20:25:00.000000000 +0100 ++++ subversion-1.8.0-rc2/Makefile.in 2013-05-14 20:25:01.000000000 +0100 +@@ -760,7 +760,7 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWI ./config.status subversion/bindings/swig/perl/native/Makefile.PL $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL diff --git a/subversion.spec b/subversion.spec index b8a7ca5..0896cc8 100644 --- a/subversion.spec +++ b/subversion.spec @@ -2,6 +2,7 @@ # spec file for package subversion # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 Andreas Stieger # Copyright (c) 2009-2010 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -17,14 +18,13 @@ # -# Subversion as of 1.7.4 does not work with ruby 1.9 in Factory -%define with_ruby 0%{?suse_version} > 1110 && 0%{?suse_version} < 1220 +%define with_ruby 0%{?suse_version} > 1110 %define with_intree_swig 0%{?suse_version} != 1110 %if 0%{?always_use_intree_sqlite:1} %define with_intree_sqlite 1 %define with_python_ctypes 0%{?suse_version} > 1110 %else -%define with_intree_sqlite 0%{?suse_version} < 1110 +%define with_intree_sqlite 0%{?suse_version} < 1230 %define with_python_ctypes 0 %endif %if %suse_version >= 1220 @@ -33,9 +33,6 @@ %define with_kde4_kwallet 0%{?suse_version} > 1100 %define with_gnome_keyring 0%{?suse_version} > 1100 -%bcond_without neon -%bcond_without serf - # run build --with=regression_tests to run test suite %bcond_with regression_tests @@ -49,12 +46,12 @@ %define svnuser svn Name: subversion -Version: 1.7.10 +Version: 1.8.0 Release: 0 # in-tree SWIG version to use for the build: %define swig_version 1.3.36 -%define sqlite_version 3.7.6.3 -%define sqlite_pkg_version 3070603 +%define sqlite_version 3.7.15.1 +%define sqlite_pkg_version 3071501 BuildRequires: apache2-devel BuildRequires: db-devel BuildRequires: file-devel @@ -81,7 +78,17 @@ BuildRequires: bash-completion BuildRequires: ctypesgen %endif %if %with_ruby -BuildRequires: ruby-devel +# Only 1.8.x releases are fully supported, 1.9.3 support is new +# configure script disallows versions between 1.8.7 and 1.9.3 +BuildConflicts: ruby-devel = 1.9.0 +BuildConflicts: ruby-devel = 1.9.1 +BuildConflicts: ruby-devel = 1.9.2 +%if 0%{?suse_version} >= 1310 +# 13.1 and later have a ruby19 package, pkgconfig and a different versioning scheme +BuildRequires: pkgconfig(ruby-1.9) +%else +BuildRequires: ruby-devel >= 1.8.2 +%endif %endif # with_ruby BuildRequires: apache2-prefork BuildRequires: cyrus-sasl-devel @@ -94,9 +101,7 @@ BuildRequires: libgnome-keyring-devel BuildRequires: gnome-keyring-devel %endif %endif # with_gnome_keyring -%if %{with serf} -BuildRequires: libserf-devel -%endif +BuildRequires: libserf-devel >= 1.2.1 %if %with_kde4_kwallet BuildRequires: dbus-1-devel BuildRequires: kdelibs4-core @@ -110,14 +115,6 @@ BuildRequires: junit %else %define with_java 0 %endif -%if %{with neon} -%if 0%{?suse_version} > 1030 -BuildRequires: libneon-devel -%else -BuildRequires: neon-devel -BuildRequires: openldap2-devel -%endif # suse_version > 1030 -%endif # with neon %if 0%{?suse_version} >= 1230 # fix "have choice for libjpeg-devel needed by libmng-devel: libjpeg62-devel libjpeg8-devel" #!BuildIgnore: libjpeg62-devel @@ -125,7 +122,11 @@ BuildRequires: openldap2-devel %if %{with regression_tests} # svnserveautocheck.sh davautocheck.sh requirements BuildRequires: net-tools +BuildRequires: util-linux BuildRequires: wget +%if 0%{?suse_version} > 1230 +BuildRequires: time +%endif %if 0%{?sles_version} == 11 # additional python sqlite required for SLE 11 only for python tests to complete # needs to be added to branch project to work, e.g. @@ -150,12 +151,11 @@ Summary: Subversion version control system License: Apache-2.0 Group: Development/Tools/Version Control BuildRoot: %{_tmppath}/%{name}-%{version}-build -Url: http://subversion.apache.org -Source0: http://www.apache.org/dist/subversion/subversion-%{version}.tar.bz2 +Url: https://subversion.apache.org +Source0: https://www.apache.org/dist/subversion/%{name}-%{version}.tar.bz2 Source1: subversion.conf Source2: subversion.README.SuSE -Source3: svnmerge.py -Source4: contrib-1187941.tar.bz2 +Source4: contrib-1485350.tar.bz2 Source9: subversion.rcsvnserve Source10: subversion.sysconfig.svnserve Source12: subversion.sysconfig.svnserve.remoteaccess @@ -177,8 +177,9 @@ Source90: swig-%{swig_version}.tar.bz2 BuildRequires: swig %endif %if %with_intree_sqlite -# http://www.sqlite.org/sqlite-amalgamation-%{sqlite_version}.tar.gz -Source91: sqlite-autoconf-%{sqlite_pkg_version}.tar.bz2 +Source91: https://www.sqlite.org/sqlite-amalgamation-%{sqlite_pkg_version}.zip +BuildRequires: unzip +BuildConflicts: sqlite3-devel %else BuildRequires: sqlite3-devel >= %{sqlite_version} %requires_ge libsqlite3-0 @@ -191,23 +192,12 @@ Patch20: subversion-swig-perl-install_vendor.patch Patch23: subversion.libtool-pie-flags.patch Patch31: subversion.perl.LD_RUN_PATH.patch Patch37: subversion-no-build-date.patch -# PATCH-FEATURE-UPSTREAM subversion-neon-systemproxy.patch dimstar@opensuse.org -- Use system proxy offered by neon, if no specific config is used (Thus, actually using libproxy in the background to use 'the right proxy' as configured in the system). -Patch38: subversion-neon-systemproxy.patch -Patch39: subversion-1.7.4-ruby-1.9-RbConfig.patch -Patch40: subversion-1.7.8-TestHarness_run_py_test_exit_code.patch -Patch41: subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch # %if %with_ruby -%if %{!?rb_arch:1}0 %define rb_arch %(echo "%{_host_cpu}-%{_os}" | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/") -%endif -%if %{!?rb_major_ver:1}0 -%define rb_major_ver %(/usr/bin/ruby -e 'puts VERSION'|cut -f1,2 -d.) -%endif -%if %{!?site_ruby:1}0 -%define site_ruby %{_usr}/%{_lib}/ruby/site_ruby/%{rb_major_ver} -%endif +%define site_ruby %(ruby -rrbconfig -e 'print RbConfig::CONFIG["sitelibdir"]') %endif # with_ruby +# %if %with_java Provides: subversion-javahl = %{version}-%{release} %endif # with_java @@ -357,21 +347,15 @@ parameters and keywords for the svn command and other tools. %if %with_intree_sqlite %__install -d ./sqlite-amalgamation pushd ./sqlite-amalgamation -%__bzip2 -d -c "%{SOURCE91}" | %__tar xf - "sqlite-autoconf-%{sqlite_pkg_version}/sqlite3.c" -%__mv "sqlite-autoconf-%{sqlite_pkg_version}/sqlite3.c" . -%__rm -rf "sqlite-autoconf-%{sqlite_pkg_version}" +unzip -ej "%{SOURCE91}" popd #./sqlite-amalgamation %endif # with_intree_sqlite # -%patch11 -p0 -%patch20 -%patch23 -p0 -%patch31 +%patch11 -p1 +%patch20 -p1 +%patch23 -p1 +%patch31 -p1 %patch37 -p1 -%patch38 -%patch39 -p1 -%patch40 -p1 -%patch41 -p1 SQLITE_RECOMMENDED_VER=$(grep -E '^SQLITE_RECOMMENDED_VER=' configure.ac|cut -f2 -d=|cut -f2 -d\") #" @@ -499,17 +483,13 @@ export LDFLAGS=-pie export PATH="${SWIG_ROOT}/bin:${PATH}" %configure \ --with-editor="vim -c 'set tw=72 et' " \ -%if %{with neon} - --with-neon=%{_prefix} \ -%endif -%if %{with serf} --with-serf=%{_prefix} \ -%endif --with-apr=%{_prefix} \ --with-apr-util=%{_prefix} \ --with-apxs=%{apxs} \ --with-zlib=%{_prefix} \ --with-berkeley-db=db.h:db.h:%{_prefix}:db \ + --with-apache-libexecdir=%{apache_libexecdir} \ $with_jdk \ %if %with_java --with-junit="%{_usr}/share/java/junit.jar" \ @@ -547,7 +527,7 @@ python_ctypes_target=ctypes-python %else python_ctypes_target= %endif # with_python_ctypes -%__make extraclean-swig +%__make extraclean-bindings %__make swig-py $python_ctypes_target swig-pl $ruby_target SWIG_LDFLAGS= $with_jdk %install @@ -583,7 +563,6 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ cp -avL contrib/client-side/emacs/*.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ rm -f $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/vc-svn.el # -install -m 755 contrib/client-side/svnmerge/svnmerge.py $RPM_BUILD_ROOT/usr/bin/svnmerge.py cp -avL contrib/client-side/svn_apply_autoprops.py $RPM_BUILD_ROOT/usr/bin # mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d @@ -596,7 +575,7 @@ cat with_jdk.files >> files.subversion # # tools %__make DESTDIR="$RPM_BUILD_ROOT" install-tools -%__mv $RPM_BUILD_ROOT%{_bindir}/svn-tools/{svn-populate-node-origins-index,svn-rep-sharing-stats,svnauthz-validate,svnmucc} $RPM_BUILD_ROOT%{_bindir} +%__mv $RPM_BUILD_ROOT%{_bindir}/svn-tools/{svn-populate-node-origins-index,svn-rep-sharing-stats,svnauthz-validate} $RPM_BUILD_ROOT%{_bindir} # discard all other tools %__rm -rf $RPM_BUILD_ROOT%{_bindir}/svn-tools # @@ -635,7 +614,6 @@ rm -f %{buildroot}/var/adm/perl-modules/subversion # # double check that the essential repository access schemes have been compiled in -# requires at least one http library: neon or serf # schemes=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version | %__grep "'" | cut -d\' -f2 | sort -u) # reset vim syntax: ' @@ -644,51 +622,23 @@ http https svn" # -%if %{with neon} -# -# double check that when building with neon support, ra_neon is actually available and handles http and https schemes -# -serf_schemes=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version | %__grep -A2 "ra_neon" | %__grep "'" | cut -d\' -f2 ) -# reset vim syntax: ' -test "$serf_schemes" = "http -https" -# -%endif # with neon -# -%if %{with serf} -# -# double check that when building with serf support, ra_serf is actually available and handles http and https schemes -# -serf_schemes=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version | %__grep -A2 "ra_serf" | %__grep "'" | cut -d\' -f2 ) -# reset vim syntax: ' -test "$serf_schemes" = "http -https" -# -%endif # with serf +# check that when building with in-tree SQLite, it is statically linked and of exactly that version +sqlite_info=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version -v | %__grep "SQLite" | cut -d\- -f2) +%if %with_intree_sqlite +test "$sqlite_info" = " SQLite %{sqlite_version} (static)" +%endif # %if %{with regression_tests} -ulimit -a -# During "make check", auth-test loads DSOs at runtime and can't find -# them if we don't set up LD_LIBRARY_PATH as below. -export LD_LIBRARY_PATH="$PWD/subversion/libsvn_auth_kwallet/.libs:$PWD/subversion/libsvn_auth_gnome_keyring/.libs:$LD_LIBRARY_PATH" - # run tests over ra_local (file://) %__make check CLEANUP=true FS_TYPE=fsfs # run tests over ra_svn (svn://) %__make svnserveautocheck CLEANUP=true FS_TYPE=fsfs -# run tests over ra_neon (http://) -%if %{with neon} -%__make davautocheck CLEANUP=true FS_TYPE=fsfs HTTP_LIBRARY=neon -%endif # neon - # run tests over ra_serf (http://) -%if %{with serf} %__make davautocheck CLEANUP=true FS_TYPE=fsfs HTTP_LIBRARY=serf -%endif # serf %if %with_java %__make check-javahl @@ -743,22 +693,19 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/svnserve.conf %post -n subversion-perl -p /sbin/ldconfig %postun -n subversion-perl -p /sbin/ldconfig + %if %with_ruby - %post -n subversion-ruby -p /sbin/ldconfig - %postun -n subversion-ruby -p /sbin/ldconfig %endif # with_ruby + %if %with_gnome_keyring - %post -n libsvn_auth_gnome_keyring-1-0 -p /sbin/ldconfig - %postun -n libsvn_auth_gnome_keyring-1-0 -p /sbin/ldconfig %endif # with_gnome_keyring + %if %with_kde4_kwallet - %post -n libsvn_auth_kwallet-1-0 -p /sbin/ldconfig - %postun -n libsvn_auth_kwallet-1-0 -p /sbin/ldconfig %endif # with_kde4_kwallet @@ -789,6 +736,7 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/svnserve.conf %attr(755,root,root) /usr/bin/svngrep %attr(755,root,root) /usr/bin/svnsync %attr(755,root,root) /usr/bin/svnrdump +%attr(755,root,root) /usr/bin/svnmucc %{_libdir}/libsvn_client*.so.* %{_libdir}/libsvn_delta*.so.* %{_libdir}/libsvn_diff*.so.* @@ -816,8 +764,8 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/svnserve.conf %{_libdir}/libsvn_swig_py-1.so.* %{site_python}/libsvn/* %{site_python}/svn/* -%if %with_python_ctypes +%if %with_python_ctypes %files python-ctypes %defattr(-,root,root) %doc subversion/bindings/ctypes-python/examples @@ -827,8 +775,8 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/svnserve.conf %{site_python}/svn_ctypes_python_bindings-*-py%{py_ver}.egg-info %endif # suse_version >= 1020 %endif # with_python_ctypes -%if %with_ruby +%if %with_ruby %files ruby %defattr(-,root,root) %dir %{site_ruby} @@ -845,12 +793,10 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/svnserve.conf %files tools %defattr(-,root,root) -%attr(755,root,root) %{_bindir}/svnmerge.py %attr(755,root,root) %{_bindir}/svn_apply_autoprops.py %{_bindir}/svn-populate-node-origins-index %{_bindir}/svnauthz-validate %{_bindir}/svn-rep-sharing-stats -%{_bindir}/svnmucc %files server %defattr(-,root,root) @@ -860,15 +806,15 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/svnserve.conf %{apache_libexecdir}/mod_dav_svn.* %{apache_libexecdir}/mod_authz_svn.* %{apache_libexecdir}/mod_dontdothat.* -%if %with_gnome_keyring +%if %with_gnome_keyring %files -n libsvn_auth_gnome_keyring-1-0 %defattr(-,root,root) %{_libdir}/libsvn_auth_gnome_keyring-1.so.0 %{_libdir}/libsvn_auth_gnome_keyring-1.so.0.* %endif # with_gnome_keyring -%if %with_kde4_kwallet +%if %with_kde4_kwallet %files -n libsvn_auth_kwallet-1-0 %defattr(-,root,root) %{_libdir}/libsvn_auth_kwallet-1.so.0 @@ -876,7 +822,6 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/svnserve.conf %endif # with_kde4_kwallet %if %with_bashcomp - %files bash-completion %defattr(-,root,root) %config %{_sysconfdir}/bash_completion.d/%{name} diff --git a/subversion.sysconfig.svnserve b/subversion.sysconfig.svnserve index 73a7597..89dd563 100644 --- a/subversion.sysconfig.svnserve +++ b/subversion.sysconfig.svnserve @@ -8,7 +8,7 @@ # The -R option enforces read-only access, i.e. write operations to the # repository (such as commits) will not be allowed. # Authentication should be configured before allowing write access. -# See http://svnbook.red-bean.com/en/1.7/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.auth +# See http://svnbook.red-bean.com/en/1.8/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.auth # SVNSERVE_OPTIONS="-d -R -r /srv/svn/repos" @@ -21,7 +21,7 @@ SVNSERVE_OPTIONS="-d -R -r /srv/svn/repos" # svn group and the setgid flag is set on the repositories # usermod -A svn wwwrun # chmod -R g+s /srv/svn/repos -# See http://svnbook.red-bean.com/en/1.7/svn.serverconfig.multimethod.html +# See http://svnbook.red-bean.com/en/1.8/svn.serverconfig.multimethod.html # SVNSERVE_USERID="svn" @@ -34,6 +34,6 @@ SVNSERVE_USERID="svn" # svn group and the setgid flag is set on the repositories # usermod -A svn wwwrun # chmod -R g+s /srv/svn/repos -# See http://svnbook.red-bean.com/en/1.7/svn.serverconfig.multimethod.html +# See http://svnbook.red-bean.com/en/1.8/svn.serverconfig.multimethod.html # SVNSERVE_GROUPID="svn" diff --git a/svnmerge.py b/svnmerge.py deleted file mode 100644 index c8eae9d..0000000 --- a/svnmerge.py +++ /dev/null @@ -1,2370 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (c) 2005, Giovanni Bajo -# Copyright (c) 2004-2005, Awarix, Inc. -# All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# Author: Archie Cobbs -# Rewritten in Python by: Giovanni Bajo -# -# Acknowledgments: -# John Belmonte - metadata and usability -# improvements -# Blair Zajac - random improvements -# Raman Gupta - bidirectional and transitive -# merging support -# Dustin J. Mitchell - support for multiple -# location identifier formats -# -# $HeadURL$ -# $LastChangedDate$ -# $LastChangedBy$ -# $LastChangedRevision$ -# -# Requisites: -# svnmerge.py has been tested with all SVN major versions since 1.1 (both -# client and server). It is unknown if it works with previous versions. -# -# Differences from svnmerge.sh: -# - More portable: tested as working in FreeBSD and OS/2. -# - Add double-verbose mode, which shows every svn command executed (-v -v). -# - "svnmerge avail" now only shows commits in source, not also commits in -# other parts of the repository. -# - Add "svnmerge block" to flag some revisions as blocked, so that -# they will not show up anymore in the available list. Added also -# the complementary "svnmerge unblock". -# - "svnmerge avail" has grown two new options: -# -B to display a list of the blocked revisions -# -A to display both the blocked and the available revisions. -# - Improved generated commit message to make it machine parsable even when -# merging commits which are themselves merges. -# - Add --force option to skip working copy check -# - Add --record-only option to "svnmerge merge" to avoid performing -# an actual merge, yet record that a merge happened. -# - Can use a variety of location-identifier formats -# -# TODO: -# - Add "svnmerge avail -R": show logs in reverse order -# -# Information for Hackers: -# -# Identifiers for branches: -# A branch is identified in three ways within this source: -# - as a working copy (variable name usually includes 'dir') -# - as a fully qualified URL -# - as a path identifier (an opaque string indicating a particular path -# in a particular repository; variable name includes 'pathid') -# A "target" is generally user-specified, and may be a working copy or -# a URL. - -import sys, os, getopt, re, types, tempfile, time, locale -from bisect import bisect -from xml.dom import pulldom - -NAME = "svnmerge" -if not hasattr(sys, "version_info") or sys.version_info < (2, 0): - error("requires Python 2.0 or newer") - -# Set up the separator used to separate individual log messages from -# each revision merged into the target location. Also, create a -# regular expression that will find this same separator in already -# committed log messages, so that the separator used for this run of -# svnmerge.py will have one more LOG_SEPARATOR appended to the longest -# separator found in all the commits. -LOG_SEPARATOR = 8 * '.' -LOG_SEPARATOR_RE = re.compile('^((%s)+)' % re.escape(LOG_SEPARATOR), - re.MULTILINE) - -# Each line of the embedded log messages will be prefixed by LOG_LINE_PREFIX. -LOG_LINE_PREFIX = 2 * ' ' - -# Set python to the default locale as per environment settings, same as svn -# TODO we should really parse config and if log-encoding is specified, set -# the locale to match that encoding -locale.setlocale(locale.LC_ALL, '') - -# We want the svn output (such as svn info) to be non-localized -# Using LC_MESSAGES should not affect localized output of svn log, for example -if os.environ.has_key("LC_ALL"): - del os.environ["LC_ALL"] -os.environ["LC_MESSAGES"] = "C" - -############################################################################### -# Support for older Python versions -############################################################################### - -# True/False constants are Python 2.2+ -try: - True, False -except NameError: - True, False = 1, 0 - -def lstrip(s, ch): - """Replacement for str.lstrip (support for arbitrary chars to strip was - added in Python 2.2.2).""" - i = 0 - try: - while s[i] == ch: - i = i+1 - return s[i:] - except IndexError: - return "" - -def rstrip(s, ch): - """Replacement for str.rstrip (support for arbitrary chars to strip was - added in Python 2.2.2).""" - try: - if s[-1] != ch: - return s - i = -2 - while s[i] == ch: - i = i-1 - return s[:i+1] - except IndexError: - return "" - -def strip(s, ch): - """Replacement for str.strip (support for arbitrary chars to strip was - added in Python 2.2.2).""" - return lstrip(rstrip(s, ch), ch) - -def rsplit(s, sep, maxsplits=0): - """Like str.rsplit, which is Python 2.4+ only.""" - L = s.split(sep) - if not 0 < maxsplits <= len(L): - return L - return [sep.join(L[0:-maxsplits])] + L[-maxsplits:] - -############################################################################### - -def kwextract(s): - """Extract info from a svn keyword string.""" - try: - return strip(s, "$").strip().split(": ")[1] - except IndexError: - return "" - -__revision__ = kwextract('$Rev$') -__date__ = kwextract('$Date$') - -# Additional options, not (yet?) mapped to command line flags -default_opts = { - "svn": "svn", - "prop": NAME + "-integrated", - "block-prop": NAME + "-blocked", - "commit-verbose": True, - "verbose": 0, -} -logs = {} - -def console_width(): - """Get the width of the console screen (if any).""" - try: - return int(os.environ["COLUMNS"]) - except (KeyError, ValueError): - pass - - try: - # Call the Windows API (requires ctypes library) - from ctypes import windll, create_string_buffer - h = windll.kernel32.GetStdHandle(-11) - csbi = create_string_buffer(22) - res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) - if res: - import struct - (bufx, bufy, - curx, cury, wattr, - left, top, right, bottom, - maxx, maxy) = struct.unpack("hhhhHhhhhhh", csbi.raw) - return right - left + 1 - except ImportError: - pass - - # Parse the output of stty -a - if os.isatty(1): - out = os.popen("stty -a").read() - m = re.search(r"columns (\d+);", out) - if m: - return int(m.group(1)) - - # sensible default - return 80 - -def error(s): - """Subroutine to output an error and bail.""" - print >> sys.stderr, "%s: %s" % (NAME, s) - sys.exit(1) - -def report(s): - """Subroutine to output progress message, unless in quiet mode.""" - if opts["verbose"]: - print "%s: %s" % (NAME, s) - -def prefix_lines(prefix, lines): - """Given a string representing one or more lines of text, insert the - specified prefix at the beginning of each line, and return the result. - The input must be terminated by a newline.""" - assert lines[-1] == "\n" - return prefix + lines[:-1].replace("\n", "\n"+prefix) + "\n" - -def recode_stdout_to_file(s): - if locale.getdefaultlocale()[1] is None or not hasattr(sys.stdout, "encoding") \ - or sys.stdout.encoding is None: - return s - u = s.decode(sys.stdout.encoding) - return u.encode(locale.getdefaultlocale()[1]) - -class LaunchError(Exception): - """Signal a failure in execution of an external command. Parameters are the - exit code of the process, the original command line, and the output of the - command.""" - -try: - """Launch a sub-process. Return its output (both stdout and stderr), - optionally split by lines (if split_lines is True). Raise a LaunchError - exception if the exit code of the process is non-zero (failure). - - This function has two implementations, one based on subprocess (preferred), - and one based on popen (for compatibility). - """ - import subprocess - import shlex - - def launch(cmd, split_lines=True): - # Requiring python 2.4 or higher, on some platforms we get - # much faster performance from the subprocess module (where python - # doesn't try to close an exhorbitant number of file descriptors) - stdout = "" - stderr = "" - try: - if os.name == 'nt': - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, \ - close_fds=False, stderr=subprocess.PIPE) - else: - # Use shlex to break up the parameters intelligently, - # respecting quotes. shlex can't handle unicode. - args = shlex.split(cmd.encode('ascii')) - p = subprocess.Popen(args, stdout=subprocess.PIPE, \ - close_fds=False, stderr=subprocess.PIPE) - stdoutAndErr = p.communicate() - stdout = stdoutAndErr[0] - stderr = stdoutAndErr[1] - except OSError, inst: - # Using 1 as failure code; should get actual number somehow? For - # examples see svnmerge_test.py's TestCase_launch.test_failure and - # TestCase_launch.test_failurecode. - raise LaunchError(1, cmd, stdout + " " + stderr + ": " + str(inst)) - - if p.returncode == 0: - if split_lines: - # Setting keepends=True for compatibility with previous logic - # (where file.readlines() preserves newlines) - return stdout.splitlines(True) - else: - return stdout - else: - raise LaunchError(p.returncode, cmd, stdout + stderr) -except ImportError: - # support versions of python before 2.4 (slower on some systems) - def launch(cmd, split_lines=True): - if os.name not in ['nt', 'os2']: - import popen2 - p = popen2.Popen4(cmd) - p.tochild.close() - if split_lines: - out = p.fromchild.readlines() - else: - out = p.fromchild.read() - ret = p.wait() - if ret == 0: - ret = None - else: - ret >>= 8 - else: - i,k = os.popen4(cmd) - i.close() - if split_lines: - out = k.readlines() - else: - out = k.read() - ret = k.close() - - if ret is None: - return out - raise LaunchError(ret, cmd, out) - -def launchsvn(s, show=False, pretend=False, **kwargs): - """Launch SVN and grab its output.""" - username = password = configdir = "" - if opts.get("username", None): - username = "--username=" + opts["username"] - if opts.get("password", None): - password = "--password=" + opts["password"] - if opts.get("config-dir", None): - configdir = "--config-dir=" + opts["config-dir"] - cmd = ' '.join(filter(None, [opts["svn"], "--non-interactive", - username, password, configdir, s])) - if show or opts["verbose"] >= 2: - print cmd - if pretend: - return None - return launch(cmd, **kwargs) - -def svn_command(s): - """Do (or pretend to do) an SVN command.""" - out = launchsvn(s, show=opts["show-changes"] or opts["dry-run"], - pretend=opts["dry-run"], - split_lines=False) - if not opts["dry-run"]: - print out - -def check_dir_clean(dir): - """Check the current status of dir for local mods.""" - if opts["force"]: - report('skipping status check because of --force') - return - report('checking status of "%s"' % dir) - - # Checking with -q does not show unversioned files or external - # directories. Though it displays a debug message for external - # directories, after a blank line. So, practically, the first line - # matters: if it's non-empty there is a modification. - out = launchsvn("status -q %s" % dir) - if out and out[0].strip(): - error('"%s" has local modifications; it must be clean' % dir) - -class PathIdentifier: - """Abstraction for a path identifier, so that we can start talking - about it before we know the form that it takes in the properties (its - external_form). Objects are referenced in the class variable 'locobjs', - keyed by all known forms.""" - - # a map of UUID (or None) to repository root URL. - repo_hints = {} - - # a map from any known string form to the corresponding PathIdentifier - locobjs = {} - - def __init__(self, repo_relative_path, uuid=None, url=None, external_form=None): - self.repo_relative_path = repo_relative_path - self.uuid = uuid - self.url = url - self.external_form = external_form - - def __repr__(self): - return "' - - def __str__(self): - """Return a printable string representation""" - if self.external_form: - return self.external_form - if self.url: - return self.format('url') - if self.uuid: - return self.format('uuid') - return self.format('path') - - def from_pathid(pathid_str): - """convert pathid_str to a PathIdentifier""" - if not PathIdentifier.locobjs.has_key(pathid_str): - if is_url(pathid_str): - # we can determine every form; PathIdentifier.hint knows how to do that - PathIdentifier.hint(pathid_str) - elif pathid_str[:7] == 'uuid://': - mo = re.match('uuid://([^/]*)(.*)', pathid_str) - if not mo: - error("Invalid path identifier '%s'" % pathid_str) - uuid, repo_relative_path = mo.groups() - pathid = PathIdentifier(repo_relative_path, uuid=uuid) - # we can cache this by uuid:// pathid and by repo-relative path - PathIdentifier.locobjs[pathid_str] = PathIdentifier.locobjs[repo_relative_path] = pathid - elif pathid_str and pathid_str[0] == '/': - # strip any trailing slashes - pathid_str = pathid_str.rstrip('/') - pathid = PathIdentifier(repo_relative_path=pathid_str) - # we can only cache this by repo-relative path - PathIdentifier.locobjs[pathid_str] = pathid - else: - error("Invalid path identifier '%s'" % pathid_str) - return PathIdentifier.locobjs[pathid_str] - from_pathid = staticmethod(from_pathid) - - def from_target(target): - """Convert a target (either a working copy path or an URL) into a - path identifier.""" - # prime the cache first if we don't know about this target yet - if not PathIdentifier.locobjs.has_key(target): - PathIdentifier.hint(target) - - try: - return PathIdentifier.locobjs[target] - except KeyError: - error("Could not recognize path identifier '%s'" % target) - from_target = staticmethod(from_target) - - def hint(target): - """Cache some information about target, as it may be referenced by - repo-relative path in subversion properties; the cache can help to - expand such a relative path to a full path identifier.""" - if PathIdentifier.locobjs.has_key(target): return - if not is_url(target) and not is_wc(target): return - - url = target_to_url(target) - - root = get_repo_root(url) - assert root[-1] != "/" - assert url[:len(root)] == root, "url=%r, root=%r" % (url, root) - repo_relative_path = url[len(root):] - - try: - uuid = get_svninfo(target)['Repository UUID'] - uuid_pathid = 'uuid://%s%s' % (uuid, repo_relative_path) - except KeyError: - uuid = None - uuid_pathid = None - - locobj = PathIdentifier.locobjs.get(url) or \ - (uuid_pathid and PathIdentifier.locobjs.get(uuid_pathid)) - if not locobj: - locobj = PathIdentifier(repo_relative_path, uuid=uuid, url=url) - - PathIdentifier.repo_hints[uuid] = root # (uuid may be None) - - PathIdentifier.locobjs[target] = locobj - PathIdentifier.locobjs[url] = locobj - if uuid_pathid: - PathIdentifier.locobjs[uuid_pathid] = locobj - if not PathIdentifier.locobjs.has_key(repo_relative_path): - PathIdentifier.locobjs[repo_relative_path] = locobj - hint = staticmethod(hint) - - def format(self, fmt): - if fmt == 'path': - return self.repo_relative_path - elif fmt == 'uuid': - return "uuid://%s%s" % (self.uuid, self.repo_relative_path) - elif fmt == 'url': - return self.url - else: - error("Unkonwn path type '%s'" % fmt) - - def match_substring(self, str): - """Test whether str is a substring of any representation of this - PathIdentifier.""" - if self.repo_relative_path.find(str) >= 0: - return True - - if self.uuid: - if ("uuid://%s%s" % (self.uuid, self.repo_relative_path)).find(str) >= 0: - return True - - if self.url: - if (self.url + self.repo_relative_path).find(str) >= 0: - return True - - return False - - def get_url(self): - """Convert a pathid into a URL. If this is not possible, error out.""" - if self.url: - return self.url - # if we have a uuid and happen to know the URL for it, use that - elif self.uuid and PathIdentifier.repo_hints.has_key(self.uuid): - self.url = PathIdentifier.repo_hints[self.uuid] + self.repo_relative_path - PathIdentifier.locobjs[self.url] = self - return self.url - # if we've only seen one rep, use that (a guess, but an educated one) - elif not self.uuid and len(PathIdentifier.repo_hints) == 1: - uuid, root = PathIdentifier.repo_hints.items()[0] - if uuid: - self.uuid = uuid - PathIdentifier.locobjs['uuid://%s%s' % (uuid, self.repo_relative_path)] = self - self.url = root + self.repo_relative_path - PathIdentifier.locobjs[self.url] = self - report("Guessing that '%s' refers to '%s'" % (self, self.url)) - return self.url - else: - error("Cannot determine URL for '%s'; " % self + - "Explicit source argument (-S/--source) required.\n") - -class RevisionLog: - """ - A log of the revisions which affected a given URL between two - revisions. - """ - - def __init__(self, url, begin, end, find_propchanges=False): - """ - Create a new RevisionLog object, which stores, in self.revs, a list - of the revisions which affected the specified URL between begin and - end. If find_propchanges is True, self.propchange_revs will contain a - list of the revisions which changed properties directly on the - specified URL. URL must be the URL for a directory in the repository. - """ - self.url = url - - # Setup the log options (--quiet, so we don't show log messages) - log_opts = '--xml --quiet -r%s:%s "%s"' % (begin, end, url) - if find_propchanges: - # The --verbose flag lets us grab merge tracking information - # by looking at propchanges - log_opts = "--verbose " + log_opts - - # Read the log to look for revision numbers and merge-tracking info - self.revs = [] - self.propchange_revs = [] - repos_pathid = PathIdentifier.from_target(url) - for chg in SvnLogParser(launchsvn("log %s" % log_opts, - split_lines=False)): - self.revs.append(chg.revision()) - for p in chg.paths(): - if p.action() == 'M' and p.pathid() == repos_pathid.repo_relative_path: - self.propchange_revs.append(chg.revision()) - - # Save the range of the log - self.begin = int(begin) - if end == "HEAD": - # If end is not provided, we do not know which is the latest - # revision in the repository. So we set 'end' to the latest - # known revision. - self.end = self.revs[-1] - else: - self.end = int(end) - - self._merges = None - self._blocks = None - - def merge_metadata(self): - """ - Return a VersionedProperty object, with a cached view of the merge - metadata in the range of this log. - """ - - # Load merge metadata if necessary - if not self._merges: - self._merges = VersionedProperty(self.url, opts["prop"]) - self._merges.load(self) - - return self._merges - - def block_metadata(self): - if not self._blocks: - self._blocks = VersionedProperty(self.url, opts["block-prop"]) - self._blocks.load(self) - - return self._blocks - - -class VersionedProperty: - """ - A read-only, cached view of a versioned property. - - self.revs contains a list of the revisions in which the property changes. - self.values stores the new values at each corresponding revision. If the - value of the property is unknown, it is set to None. - - Initially, we set self.revs to [0] and self.values to [None]. This - indicates that, as of revision zero, we know nothing about the value of - the property. - - Later, if you run self.load(log), we cache the value of this property over - the entire range of the log by noting each revision in which the property - was changed. At the end of the range of the log, we invalidate our cache - by adding the value "None" to our cache for any revisions which fall out - of the range of our log. - - Once self.revs and self.values are filled, we can find the value of the - property at any arbitrary revision using a binary search on self.revs. - Once we find the last revision during which the property was changed, - we can lookup the associated value in self.values. (If the associated - value is None, the associated value was not cached and we have to do - a full propget.) - - An example: We know that the 'svnmerge' property was added in r10, and - changed in r21. We gathered log info up until r40. - - revs = [0, 10, 21, 40] - values = [None, "val1", "val2", None] - - What these values say: - - From r0 to r9, we know nothing about the property. - - In r10, the property was set to "val1". This property stayed the same - until r21, when it was changed to "val2". - - We don't know what happened after r40. - """ - - def __init__(self, url, name): - """View the history of a versioned property at URL with name""" - self.url = url - self.name = name - - # We know nothing about the value of the property. Setup revs - # and values to indicate as such. - self.revs = [0] - self.values = [None] - - # We don't have any revisions cached - self._initial_value = None - self._changed_revs = [] - self._changed_values = [] - - def load(self, log): - """ - Load the history of property changes from the specified - RevisionLog object. - """ - - # Get the property value before the range of the log - if log.begin > 1: - self.revs.append(log.begin-1) - try: - self._initial_value = self.raw_get(log.begin-1) - except LaunchError: - # The specified URL might not exist before the - # range of the log. If so, we can safely assume - # that the property was empty at that time. - self._initial_value = { } - self.values.append(self._initial_value) - else: - self._initial_value = { } - self.values[0] = self._initial_value - - # Cache the property values in the log range - old_value = self._initial_value - for rev in log.propchange_revs: - new_value = self.raw_get(rev) - if new_value != old_value: - self._changed_revs.append(rev) - self._changed_values.append(new_value) - self.revs.append(rev) - self.values.append(new_value) - old_value = new_value - - # Indicate that we know nothing about the value of the property - # after the range of the log. - if log.revs: - self.revs.append(log.end+1) - self.values.append(None) - - def raw_get(self, rev=None): - """ - Get the property at revision REV. If rev is not specified, get - the property at revision HEAD. - """ - return get_revlist_prop(self.url, self.name, rev) - - def get(self, rev=None): - """ - Get the property at revision REV. If rev is not specified, get - the property at revision HEAD. - """ - - if rev is not None: - - # Find the index using a binary search - i = bisect(self.revs, rev) - 1 - - # Return the value of the property, if it was cached - if self.values[i] is not None: - return self.values[i] - - # Get the current value of the property - return self.raw_get(rev) - - def changed_revs(self, key=None): - """ - Get a list of the revisions in which the specified dictionary - key was changed in this property. If key is not specified, - return a list of revisions in which any key was changed. - """ - if key is None: - return self._changed_revs - else: - changed_revs = [] - old_val = self._initial_value - for rev, val in zip(self._changed_revs, self._changed_values): - if val.get(key) != old_val.get(key): - changed_revs.append(rev) - old_val = val - return changed_revs - - def initialized_revs(self): - """ - Get a list of the revisions in which keys were added or - removed in this property. - """ - initialized_revs = [] - old_len = len(self._initial_value) - for rev, val in zip(self._changed_revs, self._changed_values): - if len(val) != old_len: - initialized_revs.append(rev) - old_len = len(val) - return initialized_revs - -class RevisionSet: - """ - A set of revisions, held in dictionary form for easy manipulation. If we - were to rewrite this script for Python 2.3+, we would subclass this from - set (or UserSet). As this class does not include branch - information, it's assumed that one instance will be used per - branch. - """ - def __init__(self, parm): - """Constructs a RevisionSet from a string in property form, or from - a dictionary whose keys are the revisions. Raises ValueError if the - input string is invalid.""" - - self._revs = {} - - revision_range_split_re = re.compile('[-:]') - - if isinstance(parm, types.DictType): - self._revs = parm.copy() - elif isinstance(parm, types.ListType): - for R in parm: - self._revs[int(R)] = 1 - else: - parm = parm.strip() - if parm: - for R in parm.split(","): - rev_or_revs = re.split(revision_range_split_re, R) - if len(rev_or_revs) == 1: - self._revs[int(rev_or_revs[0])] = 1 - elif len(rev_or_revs) == 2: - for rev in range(int(rev_or_revs[0]), - int(rev_or_revs[1])+1): - self._revs[rev] = 1 - else: - raise ValueError, 'Ill formatted revision range: ' + R - - def sorted(self): - revnums = self._revs.keys() - revnums.sort() - return revnums - - def normalized(self): - """Returns a normalized version of the revision set, which is an - ordered list of couples (start,end), with the minimum number of - intervals.""" - revnums = self.sorted() - revnums.reverse() - ret = [] - while revnums: - s = e = revnums.pop() - while revnums and revnums[-1] in (e, e+1): - e = revnums.pop() - ret.append((s, e)) - return ret - - def __str__(self): - """Convert the revision set to a string, using its normalized form.""" - L = [] - for s,e in self.normalized(): - if s == e: - L.append(str(s)) - else: - L.append(str(s) + "-" + str(e)) - return ",".join(L) - - def __contains__(self, rev): - return self._revs.has_key(rev) - - def __sub__(self, rs): - """Compute subtraction as in sets.""" - revs = {} - for r in self._revs.keys(): - if r not in rs: - revs[r] = 1 - return RevisionSet(revs) - - def __and__(self, rs): - """Compute intersections as in sets.""" - revs = {} - for r in self._revs.keys(): - if r in rs: - revs[r] = 1 - return RevisionSet(revs) - - def __nonzero__(self): - return len(self._revs) != 0 - - def __len__(self): - """Return the number of revisions in the set.""" - return len(self._revs) - - def __iter__(self): - return iter(self.sorted()) - - def __or__(self, rs): - """Compute set union.""" - revs = self._revs.copy() - revs.update(rs._revs) - return RevisionSet(revs) - -def merge_props_to_revision_set(merge_props, pathid): - """A converter which returns a RevisionSet instance containing the - revisions from PATH as known to BRANCH_PROPS. BRANCH_PROPS is a - dictionary of pathid -> revision set branch integration information - (as returned by get_merge_props()).""" - if not merge_props.has_key(pathid): - error('no integration info available for path "%s"' % pathid) - return RevisionSet(merge_props[pathid]) - -def dict_from_revlist_prop(propvalue): - """Given a property value as a string containing per-source revision - lists, return a dictionary whose key is a source path identifier - and whose value is the revisions for that source.""" - prop = {} - - # Multiple sources are separated by any whitespace. - for L in propvalue.split(): - # We use rsplit to play safe and allow colons in pathids. - pathid_str, revs = rsplit(L.strip(), ":", 1) - - pathid = PathIdentifier.from_pathid(pathid_str) - - # cache the "external" form we saw - pathid.external_form = pathid_str - - prop[pathid] = revs - return prop - -def get_revlist_prop(url_or_dir, propname, rev=None): - """Given a repository URL or working copy path and a property - name, extract the values of the property which store per-source - revision lists and return a dictionary whose key is a source path - identifier, and whose value is the revisions for that source.""" - - # Note that propget does not return an error if the property does - # not exist, it simply does not output anything. So we do not need - # to check for LaunchError here. - args = '--strict "%s" "%s"' % (propname, url_or_dir) - if rev: - args = '-r %s %s' % (rev, args) - out = launchsvn('propget %s' % args, split_lines=False) - - return dict_from_revlist_prop(out) - -def get_merge_props(dir): - """Extract the merged revisions.""" - return get_revlist_prop(dir, opts["prop"]) - -def get_block_props(dir): - """Extract the blocked revisions.""" - return get_revlist_prop(dir, opts["block-prop"]) - -def get_blocked_revs(dir, source_pathid): - p = get_block_props(dir) - if p.has_key(source_pathid): - return RevisionSet(p[source_pathid]) - return RevisionSet("") - -def format_merge_props(props, sep=" "): - """Formats the hash PROPS as a string suitable for use as a - Subversion property value.""" - assert sep in ["\t", "\n", " "] # must be a whitespace - props = props.items() - props.sort() - L = [] - for h, r in props: - L.append("%s:%s" % (h, r)) - return sep.join(L) - -def _run_propset(dir, prop, value): - """Set the property 'prop' of directory 'dir' to value 'value'. We go - through a temporary file to not run into command line length limits.""" - try: - fd, fname = tempfile.mkstemp() - f = os.fdopen(fd, "wb") - except AttributeError: - # Fallback for Python <= 2.3 which does not have mkstemp (mktemp - # suffers from race conditions. Not that we care...) - fname = tempfile.mktemp() - f = open(fname, "wb") - - try: - f.write(value) - f.close() - report("property data written to temp file: %s" % value) - svn_command('propset "%s" -F "%s" "%s"' % (prop, fname, dir)) - finally: - os.remove(fname) - -def set_props(dir, name, props): - props = format_merge_props(props) - if props: - _run_propset(dir, name, props) - else: - # Check if NAME exists on DIR before trying to delete it. - # As of 1.6 propdel no longer supports deleting a - # non-existent property. - out = launchsvn('propget "%s" "%s"' % (name, dir)) - if out: - svn_command('propdel "%s" "%s"' % (name, dir)) - -def set_merge_props(dir, props): - set_props(dir, opts["prop"], props) - -def set_block_props(dir, props): - set_props(dir, opts["block-prop"], props) - -def set_blocked_revs(dir, source_pathid, revs): - props = get_block_props(dir) - if revs: - props[source_pathid] = str(revs) - elif props.has_key(source_pathid): - del props[source_pathid] - set_block_props(dir, props) - -def is_url(url): - """Check if url looks like a valid url.""" - return re.search(r"^[a-zA-Z][-+\.\w]*://[^\s]+$", url) is not None and url[:4] != 'uuid' - -def check_url(url): - """Similar to is_url, but actually invoke get_svninfo to find out""" - return get_svninfo(url) != {} - -def is_pathid(pathid): - return isinstance(pathid, PathIdentifier) - -def is_wc(dir): - """Check if a directory is a working copy.""" - return os.path.isdir(os.path.join(dir, ".svn")) or \ - os.path.isdir(os.path.join(dir, "_svn")) - -_cache_svninfo = {} -def get_svninfo(target): - """Extract the subversion information for a target (through 'svn info'). - This function uses an internal cache to let clients query information - many times.""" - if _cache_svninfo.has_key(target): - return _cache_svninfo[target] - info = {} - for L in launchsvn('info "%s"' % target): - L = L.strip() - if not L: - continue - key, value = L.split(": ", 1) - info[key] = value.strip() - _cache_svninfo[target] = info - return info - -def target_to_url(target): - """Convert working copy path or repos URL to a repos URL.""" - if is_wc(target): - info = get_svninfo(target) - return info["URL"] - return target - -_cache_reporoot = {} -def get_repo_root(target): - """Compute the root repos URL given a working-copy path, or a URL.""" - # Try using "svn info WCDIR". This works only on SVN clients >= 1.3 - if not is_url(target): - try: - info = get_svninfo(target) - root = info["Repository Root"] - _cache_reporoot[root] = None - return root - except KeyError: - pass - url = target_to_url(target) - assert url[-1] != '/' - else: - url = target - - # Go through the cache of the repository roots. This avoids extra - # server round-trips if we are asking the root of different URLs - # in the same repository (the cache in get_svninfo() cannot detect - # that of course and would issue a remote command). - assert is_url(url) - for r in _cache_reporoot: - if url.startswith(r): - return r - - # Try using "svn info URL". This works only on SVN clients >= 1.2 - try: - info = get_svninfo(url) - # info may be {}, in which case we'll see KeyError here - root = info["Repository Root"] - _cache_reporoot[root] = None - return root - except (KeyError, LaunchError): - pass - - # Constrained to older svn clients, we are stuck with this ugly - # trial-and-error implementation. It could be made faster with a - # binary search. - while url: - temp = os.path.dirname(url) - try: - launchsvn('proplist "%s"' % temp) - except LaunchError: - _cache_reporoot[url] = None - return rstrip(url, "/") - url = temp - - error("svn repos root of %s not found" % target) - -class SvnLogParser: - """ - Parse the "svn log", going through the XML output and using pulldom (which - would even allow streaming the command output). - """ - def __init__(self, xml): - self._events = pulldom.parseString(xml) - def __getitem__(self, idx): - for event, node in self._events: - if event == pulldom.START_ELEMENT and node.tagName == "logentry": - self._events.expandNode(node) - return self.SvnLogRevision(node) - raise IndexError, "Could not find 'logentry' tag in xml" - - class SvnLogRevision: - def __init__(self, xmlnode): - self.n = xmlnode - def revision(self): - return int(self.n.getAttribute("revision")) - def author(self): - return self.n.getElementsByTagName("author")[0].firstChild.data - def paths(self): - return [self.SvnLogPath(n) - for n in self.n.getElementsByTagName("path")] - - class SvnLogPath: - def __init__(self, xmlnode): - self.n = xmlnode - def action(self): - return self.n.getAttribute("action") - def pathid(self): - return self.n.firstChild.data - def copyfrom_rev(self): - try: return self.n.getAttribute("copyfrom-rev") - except KeyError: return None - def copyfrom_pathid(self): - try: return self.n.getAttribute("copyfrom-path") - except KeyError: return None - -def get_copyfrom(target): - """Get copyfrom info for a given target (it represents the - repository-relative path from where it was branched). NOTE: - repos root has no copyfrom info. In this case None is returned. - - Returns the: - - source file or directory from which the copy was made - - revision from which that source was copied - - revision in which the copy was committed - """ - repos_path = PathIdentifier.from_target(target).repo_relative_path - for chg in SvnLogParser(launchsvn('log -v --xml --stop-on-copy "%s"' - % target, split_lines=False)): - for p in chg.paths(): - if p.action() == 'A' and p.pathid() == repos_path: - # These values will be None if the corresponding elements are - # not found in the log. - return p.copyfrom_pathid(), p.copyfrom_rev(), chg.revision() - return None,None,None - -def get_latest_rev(url): - """Get the latest revision of the repository of which URL is part.""" - try: - info = get_svninfo(url) - if not info.has_key("Revision"): - error("Not a valid URL: %s" % url) - return info["Revision"] - except LaunchError: - # Alternative method for latest revision checking (for svn < 1.2) - report('checking latest revision of "%s"' % url) - L = launchsvn('proplist --revprop -r HEAD "%s"' % opts["source-url"])[0] - rev = re.search("revision (\d+)", L).group(1) - report('latest revision of "%s" is %s' % (url, rev)) - return rev - -def get_created_rev(url): - """Lookup the revision at which the path identified by the - provided URL was first created.""" - oldest_rev = -1 - report('determining oldest revision for URL "%s"' % url) - ### TODO: Refactor this to use a modified RevisionLog class. - lines = None - cmd = "log -r1:HEAD --stop-on-copy -q " + url - try: - lines = launchsvn(cmd + " --limit=1") - except LaunchError: - # Assume that --limit isn't supported by the installed 'svn'. - lines = launchsvn(cmd) - if lines and len(lines) > 1: - i = lines[1].find(" ") - if i != -1: - oldest_rev = int(lines[1][1:i]) - if oldest_rev == -1: - error('unable to determine oldest revision for URL "%s"' % url) - return oldest_rev - -def get_commit_log(url, revnum): - """Return the log message for a specific integer revision - number.""" - out = launchsvn("log --incremental -r%d %s" % (revnum, url)) - return recode_stdout_to_file("".join(out[1:])) - -def construct_merged_log_message(url, revnums): - """Return a commit log message containing all the commit messages - in the specified revisions at the given URL. The separator used - in this log message is determined by searching for the longest - svnmerge separator existing in the commit log messages and - extending it by one more separator. This results in a new commit - log message that is clearer in describing merges that contain - other merges. Trailing newlines are removed from the embedded - log messages.""" - messages = [''] - longest_sep = '' - for r in revnums.sorted(): - message = get_commit_log(url, r) - if message: - message = re.sub(r'(\r\n|\r|\n)', "\n", message) - message = rstrip(message, "\n") + "\n" - messages.append(prefix_lines(LOG_LINE_PREFIX, message)) - for match in LOG_SEPARATOR_RE.findall(message): - sep = match[1] - if len(sep) > len(longest_sep): - longest_sep = sep - - longest_sep += LOG_SEPARATOR + "\n" - messages.append('') - return longest_sep.join(messages) - -def get_default_source(branch_target, branch_props): - """Return the default source for branch_target (given its branch_props). - Error out if there is ambiguity.""" - if not branch_props: - error("no integration info available") - - props = branch_props.copy() - pathid = PathIdentifier.from_target(branch_target) - - # To make bidirectional merges easier, find the target's - # repository local path so it can be removed from the list of - # possible integration sources. - if props.has_key(pathid): - del props[pathid] - - if len(props) > 1: - err_msg = "multiple sources found. " - err_msg += "Explicit source argument (-S/--source) required.\n" - err_msg += "The merge sources available are:" - for prop in props: - err_msg += "\n " + str(prop) - error(err_msg) - - return props.keys()[0] - -def should_find_reflected(branch_dir): - should_find_reflected = opts["bidirectional"] - - # If the source has integration info for the target, set find_reflected - # even if --bidirectional wasn't specified - if not should_find_reflected: - source_props = get_merge_props(opts["source-url"]) - should_find_reflected = source_props.has_key(PathIdentifier.from_target(branch_dir)) - - return should_find_reflected - -def analyze_revs(target_pathid, url, begin=1, end=None, - find_reflected=False): - """For the source of the merges in the source URL being merged into - target_pathid, analyze the revisions in the interval begin-end (which - defaults to 1-HEAD), to find out which revisions are changes in - the url, which are changes elsewhere (so-called 'phantom' - revisions), optionally which are reflected changes (to avoid - conflicts that can occur when doing bidirectional merging between - branches), and which revisions initialize merge tracking against other - branches. Return a tuple of four RevisionSet's: - (real_revs, phantom_revs, reflected_revs, initialized_revs). - - NOTE: To maximize speed, if "end" is not provided, the function is - not able to find phantom revisions following the last real - revision in the URL. - """ - - begin = str(begin) - if end is None: - end = "HEAD" - else: - end = str(end) - if long(begin) > long(end): - return RevisionSet(""), RevisionSet(""), \ - RevisionSet(""), RevisionSet("") - - logs[url] = RevisionLog(url, begin, end, find_reflected) - revs = RevisionSet(logs[url].revs) - - if end == "HEAD": - # If end is not provided, we do not know which is the latest revision - # in the repository. So return the phantom revision set only up to - # the latest known revision. - end = str(list(revs)[-1]) - - phantom_revs = RevisionSet("%s-%s" % (begin, end)) - revs - - if find_reflected: - reflected_revs = logs[url].merge_metadata().changed_revs(target_pathid) - reflected_revs += logs[url].block_metadata().changed_revs(target_pathid) - else: - reflected_revs = [] - - initialized_revs = RevisionSet(logs[url].merge_metadata().initialized_revs()) - reflected_revs = RevisionSet(reflected_revs) - - return revs, phantom_revs, reflected_revs, initialized_revs - -def analyze_source_revs(branch_target, source_url, **kwargs): - """For the given branch and source, extract the real and phantom - source revisions.""" - branch_url = target_to_url(branch_target) - branch_pathid = PathIdentifier.from_target(branch_target) - - # Extract the latest repository revision from the URL of the branch - # directory (which is already cached at this point). - end_rev = get_latest_rev(source_url) - - # Calculate the base of analysis. If there is a "1-XX" interval in the - # merged_revs, we do not need to check those. - base = 1 - r = opts["merged-revs"].normalized() - if r and r[0][0] == 1: - base = r[0][1] + 1 - - # See if the user filtered the revision set. If so, we are not - # interested in something outside that range. - if opts["revision"]: - revs = RevisionSet(opts["revision"]).sorted() - if base < revs[0]: - base = revs[0] - if end_rev > revs[-1]: - end_rev = revs[-1] - - return analyze_revs(branch_pathid, source_url, base, end_rev, **kwargs) - -def minimal_merge_intervals(revs, phantom_revs): - """Produce the smallest number of intervals suitable for merging. revs - is the RevisionSet which we want to merge, and phantom_revs are phantom - revisions which can be used to concatenate intervals, thus minimizing the - number of operations.""" - revnums = revs.normalized() - ret = [] - - cur = revnums.pop() - while revnums: - next = revnums.pop() - assert next[1] < cur[0] # otherwise it is not ordered - assert cur[0] - next[1] > 1 # otherwise it is not normalized - for i in range(next[1]+1, cur[0]): - if i not in phantom_revs: - ret.append(cur) - cur = next - break - else: - cur = (next[0], cur[1]) - - ret.append(cur) - ret.reverse() - return ret - -def display_revisions(revs, display_style, revisions_msg, source_url): - """Show REVS as dictated by DISPLAY_STYLE, either numerically, in - log format, or as diffs. When displaying revisions numerically, - prefix output with REVISIONS_MSG when in verbose mode. Otherwise, - request logs or diffs using SOURCE_URL.""" - if display_style == "revisions": - if revs: - report(revisions_msg) - print revs - elif display_style == "logs": - for start,end in revs.normalized(): - svn_command('log --incremental -v -r %d:%d %s' % \ - (start, end, source_url)) - elif display_style in ("diffs", "summarize"): - if display_style == 'summarize': - summarize = '--summarize ' - else: - summarize = '' - - for start, end in revs.normalized(): - print - if start == end: - print "%s: changes in revision %d follow" % (NAME, start) - else: - print "%s: changes in revisions %d-%d follow" % (NAME, - start, end) - print - - # Note: the starting revision number to 'svn diff' is - # NOT inclusive so we have to subtract one from ${START}. - svn_command("diff -r %d:%d %s %s" % (start - 1, end, summarize, - source_url)) - else: - assert False, "unhandled display style: %s" % display_style - -def action_init(target_dir, target_props): - """Initialize for merges.""" - # Check that directory is ready for being modified - check_dir_clean(target_dir) - - target_pathid = PathIdentifier.from_target(target_dir) - source_pathid = opts['source-pathid'] - if source_pathid == target_pathid: - error("cannot init integration source path '%s'\nIts path identifier does not " - "differ from the path identifier of the current directory, '%s'." - % (source_pathid, target_pathid)) - - source_url = opts['source-url'] - - # If the user hasn't specified the revisions to use, see if the - # "source" is a copy from the current tree and if so, we can use - # the version data obtained from it. - revision_range = opts["revision"] - if not revision_range: - # If source was originally copied from target, and we are merging - # changes from source to target (the copy target is the merge source, - # and the copy source is the merge target), then we want to mark as - # integrated up to the rev in which the copy was committed which - # created the merge source: - cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(source_url) - - cf_pathid = None - if cf_source: - cf_url = get_repo_root(source_url) + cf_source - if is_url(cf_url) and check_url(cf_url): - cf_pathid = PathIdentifier.from_target(cf_url) - - if target_pathid == cf_pathid: - report('the source "%s" was copied from "%s" in rev %s and committed in rev %s' % - (source_url, target_dir, cf_rev, copy_committed_in_rev)) - revision_range = "1-" + str(copy_committed_in_rev) - - if not revision_range: - # If the reverse is true: copy source is the merge source, and - # the copy target is the merge target, then we want to mark as - # integrated up to the specific rev of the merge target from - # which the merge source was copied. (Longer discussion at: - # http://subversion.tigris.org/issues/show_bug.cgi?id=2810 ) - cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(target_dir) - - cf_pathid = None - if cf_source: - cf_url = get_repo_root(target_dir) + cf_source - if is_url(cf_url) and check_url(cf_url): - cf_pathid = PathIdentifier.from_target(cf_url) - - source_pathid = PathIdentifier.from_target(source_url) - if source_pathid == cf_pathid: - report('the target "%s" was copied the source "%s" in rev %s and committed in rev %s' % - (target_dir, source_url, cf_rev, copy_committed_in_rev)) - revision_range = "1-" + cf_rev - - # When neither the merge source nor target is a copy of the other, and - # the user did not specify a revision range, then choose a default which is - # the current revision; saying, in effect, "everything has been merged, so - # mark as integrated up to the latest rev on source url). - if not revision_range: - revision_range = "1-" + get_latest_rev(source_url) - - revs = RevisionSet(revision_range) - - report('marking "%s" as already containing revisions "%s" of "%s"' % - (target_dir, revs, source_url)) - - revs = str(revs) - # If the local svnmerge-integrated property already has an entry - # for the source-pathid, simply error out. - if not opts["force"] and target_props.has_key(source_pathid): - error('Repository-relative path %s has already been initialized at %s\n' - 'Use --force to re-initialize' % (source_pathid, target_dir)) - # set the pathid's external_form based on the user's options - source_pathid.external_form = source_pathid.format(opts['location-type']) - - revs = str(revs) - target_props[source_pathid] = revs - - # Set property - set_merge_props(target_dir, target_props) - - # Write out commit message if desired - if opts["commit-file"]: - f = open(opts["commit-file"], "w") - print >>f, 'Initialized merge tracking via "%s" with revisions "%s" from ' \ - % (NAME, revs) - print >>f, '%s' % source_url - f.close() - report('wrote commit message to "%s"' % opts["commit-file"]) - -def action_avail(branch_dir, branch_props): - """Show commits available for merges.""" - source_revs, phantom_revs, reflected_revs, initialized_revs = \ - analyze_source_revs(branch_dir, opts["source-url"], - find_reflected= - should_find_reflected(branch_dir)) - report('skipping phantom revisions: %s' % phantom_revs) - if reflected_revs: - report('skipping reflected revisions: %s' % reflected_revs) - report('skipping initialized revisions: %s' % initialized_revs) - - blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) - avail_revs = source_revs - opts["merged-revs"] - blocked_revs - \ - reflected_revs - initialized_revs - - # Compose the set of revisions to show - revs = RevisionSet("") - report_msg = "revisions available to be merged are:" - if "avail" in opts["avail-showwhat"]: - revs |= avail_revs - if "blocked" in opts["avail-showwhat"]: - revs |= blocked_revs - report_msg = "revisions blocked are:" - - # Limit to revisions specified by -r (if any) - if opts["revision"]: - revs = revs & RevisionSet(opts["revision"]) - - display_revisions(revs, opts["avail-display"], - report_msg, - opts["source-url"]) - -def action_integrated(branch_dir, branch_props): - """Show change sets already merged. This set of revisions is - calculated from taking svnmerge-integrated property from the - branch, and subtracting any revision older than the branch - creation revision.""" - # Extract the integration info for the branch_dir - branch_props = get_merge_props(branch_dir) - revs = merge_props_to_revision_set(branch_props, opts["source-pathid"]) - - # Lookup the oldest revision on the branch path. - oldest_src_rev = get_created_rev(opts["source-url"]) - - # Subtract any revisions which pre-date the branch. - report("subtracting revisions which pre-date the source URL (%d)" % - oldest_src_rev) - revs = revs - RevisionSet(range(1, oldest_src_rev)) - - # Limit to revisions specified by -r (if any) - if opts["revision"]: - revs = revs & RevisionSet(opts["revision"]) - - display_revisions(revs, opts["integrated-display"], - "revisions already integrated are:", opts["source-url"]) - -def action_merge(branch_dir, branch_props): - """Record merge meta data, and do the actual merge (if not - requested otherwise via --record-only).""" - # Check branch directory is ready for being modified - check_dir_clean(branch_dir) - - source_revs, phantom_revs, reflected_revs, initialized_revs = \ - analyze_source_revs(branch_dir, opts["source-url"], - find_reflected= - should_find_reflected(branch_dir)) - - if opts["revision"]: - revs = RevisionSet(opts["revision"]) - else: - revs = source_revs - - blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) - merged_revs = opts["merged-revs"] - - # Show what we're doing - if opts["verbose"]: # just to avoid useless calculations - if merged_revs & revs: - report('"%s" already contains revisions %s' % (branch_dir, - merged_revs & revs)) - if phantom_revs: - report('memorizing phantom revision(s): %s' % phantom_revs) - if reflected_revs: - report('memorizing reflected revision(s): %s' % reflected_revs) - if blocked_revs & revs: - report('skipping blocked revisions(s): %s' % (blocked_revs & revs)) - if initialized_revs: - report('skipping initialized revision(s): %s' % initialized_revs) - - # Compute final merge set. - revs = revs - merged_revs - blocked_revs - reflected_revs - \ - phantom_revs - initialized_revs - if not revs: - report('no revisions to merge, exiting') - return - - # When manually marking revisions as merged, we only update the - # integration meta data, and don't perform an actual merge. - record_only = opts["record-only"] - - if record_only: - report('recording merge of revision(s) %s from "%s"' % - (revs, opts["source-url"])) - else: - report('merging in revision(s) %s from "%s"' % - (revs, opts["source-url"])) - - # Do the merge(s). Note: the starting revision number to 'svn merge' - # is NOT inclusive so we have to subtract one from start. - # We try to keep the number of merge operations as low as possible, - # because it is faster and reduces the number of conflicts. - old_block_props = get_block_props(branch_dir) - merge_metadata = logs[opts["source-url"]].merge_metadata() - block_metadata = logs[opts["source-url"]].block_metadata() - for start,end in minimal_merge_intervals(revs, phantom_revs): - if not record_only: - # Preset merge/blocked properties to the source value at - # the start rev to avoid spurious property conflicts - set_merge_props(branch_dir, merge_metadata.get(start - 1)) - set_block_props(branch_dir, block_metadata.get(start - 1)) - # Do the merge - svn_command("merge --force -r %d:%d %s %s" % \ - (start - 1, end, opts["source-url"], branch_dir)) - # TODO: to support graph merging, add logic to merge the property - # meta-data manually - - # Update the set of merged revisions. - merged_revs = merged_revs | revs | reflected_revs | phantom_revs | initialized_revs - branch_props[opts["source-pathid"]] = str(merged_revs) - set_merge_props(branch_dir, branch_props) - # Reset the blocked revs - set_block_props(branch_dir, old_block_props) - - # Write out commit message if desired - if opts["commit-file"]: - f = open(opts["commit-file"], "w") - if record_only: - print >>f, 'Recorded merge of revisions %s via %s from ' % \ - (revs, NAME) - else: - print >>f, 'Merged revisions %s via %s from ' % \ - (revs, NAME) - print >>f, '%s' % opts["source-url"] - if opts["commit-verbose"]: - print >>f - print >>f, construct_merged_log_message(opts["source-url"], revs), - - f.close() - report('wrote commit message to "%s"' % opts["commit-file"]) - -def action_block(branch_dir, branch_props): - """Block revisions.""" - # Check branch directory is ready for being modified - check_dir_clean(branch_dir) - - source_revs, phantom_revs, reflected_revs, initialized_revs = \ - analyze_source_revs(branch_dir, opts["source-url"]) - revs_to_block = source_revs - opts["merged-revs"] - - # Limit to revisions specified by -r (if any) - if opts["revision"]: - revs_to_block = RevisionSet(opts["revision"]) & revs_to_block - - if not revs_to_block: - error('no available revisions to block') - - # Change blocked information - blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) - blocked_revs = blocked_revs | revs_to_block - set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs) - - # Write out commit message if desired - if opts["commit-file"]: - f = open(opts["commit-file"], "w") - print >>f, 'Blocked revisions %s via %s' % (revs_to_block, NAME) - if opts["commit-verbose"]: - print >>f - print >>f, construct_merged_log_message(opts["source-url"], - revs_to_block), - - f.close() - report('wrote commit message to "%s"' % opts["commit-file"]) - -def action_unblock(branch_dir, branch_props): - """Unblock revisions.""" - # Check branch directory is ready for being modified - check_dir_clean(branch_dir) - - blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) - revs_to_unblock = blocked_revs - - # Limit to revisions specified by -r (if any) - if opts["revision"]: - revs_to_unblock = revs_to_unblock & RevisionSet(opts["revision"]) - - if not revs_to_unblock: - error('no available revisions to unblock') - - # Change blocked information - blocked_revs = blocked_revs - revs_to_unblock - set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs) - - # Write out commit message if desired - if opts["commit-file"]: - f = open(opts["commit-file"], "w") - print >>f, 'Unblocked revisions %s via %s' % (revs_to_unblock, NAME) - if opts["commit-verbose"]: - print >>f - print >>f, construct_merged_log_message(opts["source-url"], - revs_to_unblock), - f.close() - report('wrote commit message to "%s"' % opts["commit-file"]) - -def action_rollback(branch_dir, branch_props): - """Rollback previously integrated revisions.""" - - # Make sure the revision arguments are present - if not opts["revision"]: - error("The '-r' option is mandatory for rollback") - - # Check branch directory is ready for being modified - check_dir_clean(branch_dir) - - # Extract the integration info for the branch_dir - branch_props = get_merge_props(branch_dir) - # Get the list of all revisions already merged into this source-pathid. - merged_revs = merge_props_to_revision_set(branch_props, - opts["source-pathid"]) - - # At which revision was the src created? - oldest_src_rev = get_created_rev(opts["source-url"]) - src_pre_exist_range = RevisionSet("1-%d" % oldest_src_rev) - - # Limit to revisions specified by -r (if any) - revs = merged_revs & RevisionSet(opts["revision"]) - - # make sure there's some revision to rollback - if not revs: - report("Nothing to rollback in revision range r%s" % opts["revision"]) - return - - # If even one specified revision lies outside the lifetime of the - # merge source, error out. - if revs & src_pre_exist_range: - err_str = "Specified revision range falls out of the rollback range.\n" - err_str += "%s was created at r%d" % (opts["source-pathid"], - oldest_src_rev) - error(err_str) - - record_only = opts["record-only"] - - if record_only: - report('recording rollback of revision(s) %s from "%s"' % - (revs, opts["source-url"])) - else: - report('rollback of revision(s) %s from "%s"' % - (revs, opts["source-url"])) - - # Do the reverse merge(s). Note: the starting revision number - # to 'svn merge' is NOT inclusive so we have to subtract one from start. - # We try to keep the number of merge operations as low as possible, - # because it is faster and reduces the number of conflicts. - rollback_intervals = minimal_merge_intervals(revs, []) - # rollback in the reverse order of merge - rollback_intervals.reverse() - for start, end in rollback_intervals: - if not record_only: - # Do the merge - svn_command("merge --force -r %d:%d %s %s" % \ - (end, start - 1, opts["source-url"], branch_dir)) - - # Write out commit message if desired - # calculate the phantom revs first - if opts["commit-file"]: - f = open(opts["commit-file"], "w") - if record_only: - print >>f, 'Recorded rollback of revisions %s via %s from ' % \ - (revs , NAME) - else: - print >>f, 'Rolled back revisions %s via %s from ' % \ - (revs , NAME) - print >>f, '%s' % opts["source-url"] - - f.close() - report('wrote commit message to "%s"' % opts["commit-file"]) - - # Update the set of merged revisions. - merged_revs = merged_revs - revs - branch_props[opts["source-pathid"]] = str(merged_revs) - set_merge_props(branch_dir, branch_props) - -def action_uninit(branch_dir, branch_props): - """Uninit SOURCE URL.""" - # Check branch directory is ready for being modified - check_dir_clean(branch_dir) - - # If the source-pathid does not have an entry in the svnmerge-integrated - # property, simply error out. - if not branch_props.has_key(opts["source-pathid"]): - error('Repository-relative path "%s" does not contain merge ' - 'tracking information for "%s"' \ - % (opts["source-pathid"], branch_dir)) - - del branch_props[opts["source-pathid"]] - - # Set merge property with the selected source deleted - set_merge_props(branch_dir, branch_props) - - # Set blocked revisions for the selected source to None - set_blocked_revs(branch_dir, opts["source-pathid"], None) - - # Write out commit message if desired - if opts["commit-file"]: - f = open(opts["commit-file"], "w") - print >>f, 'Removed merge tracking for "%s" for ' % NAME - print >>f, '%s' % opts["source-url"] - f.close() - report('wrote commit message to "%s"' % opts["commit-file"]) - -############################################################################### -# Command line parsing -- options and commands management -############################################################################### - -class OptBase: - def __init__(self, *args, **kwargs): - self.help = kwargs["help"] - del kwargs["help"] - self.lflags = [] - self.sflags = [] - for a in args: - if a.startswith("--"): self.lflags.append(a) - elif a.startswith("-"): self.sflags.append(a) - else: - raise TypeError, "invalid flag name: %s" % a - if kwargs.has_key("dest"): - self.dest = kwargs["dest"] - del kwargs["dest"] - else: - if not self.lflags: - raise TypeError, "cannot deduce dest name without long options" - self.dest = self.lflags[0][2:] - if kwargs: - raise TypeError, "invalid keyword arguments: %r" % kwargs.keys() - def repr_flags(self): - f = self.sflags + self.lflags - r = f[0] - for fl in f[1:]: - r += " [%s]" % fl - return r - -class Option(OptBase): - def __init__(self, *args, **kwargs): - self.default = kwargs.setdefault("default", 0) - del kwargs["default"] - self.value = kwargs.setdefault("value", None) - del kwargs["value"] - OptBase.__init__(self, *args, **kwargs) - def apply(self, state, value): - assert value == "" - if self.value is not None: - state[self.dest] = self.value - else: - state[self.dest] += 1 - -class OptionArg(OptBase): - def __init__(self, *args, **kwargs): - self.default = kwargs["default"] - del kwargs["default"] - self.metavar = kwargs.setdefault("metavar", None) - del kwargs["metavar"] - OptBase.__init__(self, *args, **kwargs) - - if self.metavar is None: - if self.dest is not None: - self.metavar = self.dest.upper() - else: - self.metavar = "arg" - if self.default: - self.help += " (default: %s)" % self.default - def apply(self, state, value): - assert value is not None - state[self.dest] = value - def repr_flags(self): - r = OptBase.repr_flags(self) - return r + " " + self.metavar - -class CommandOpts: - class Cmd: - def __init__(self, *args): - self.name, self.func, self.usage, self.help, self.opts = args - def short_help(self): - return self.help.split(".")[0] - def __str__(self): - return self.name - def __call__(self, *args, **kwargs): - return self.func(*args, **kwargs) - - def __init__(self, global_opts, common_opts, command_table, version=None): - self.progname = NAME - self.version = version.replace("%prog", self.progname) - self.cwidth = console_width() - 2 - self.ctable = command_table.copy() - self.gopts = global_opts[:] - self.copts = common_opts[:] - self._add_builtins() - for k in self.ctable.keys(): - cmd = self.Cmd(k, *self.ctable[k]) - opts = [] - for o in cmd.opts: - if isinstance(o, types.StringType) or \ - isinstance(o, types.UnicodeType): - o = self._find_common(o) - opts.append(o) - cmd.opts = opts - self.ctable[k] = cmd - - def _add_builtins(self): - self.gopts.append( - Option("-h", "--help", help="show help for this command and exit")) - if self.version is not None: - self.gopts.append( - Option("-V", "--version", help="show version info and exit")) - self.ctable["help"] = (self._cmd_help, - "help [COMMAND]", - "Display help for a specific command. If COMMAND is omitted, " - "display brief command description.", - []) - - def _cmd_help(self, cmd=None, *args): - if args: - self.error("wrong number of arguments", "help") - if cmd is not None: - cmd = self._command(cmd) - self.print_command_help(cmd) - else: - self.print_command_list() - - def _paragraph(self, text, width=78): - chunks = re.split("\s+", text.strip()) - chunks.reverse() - lines = [] - while chunks: - L = chunks.pop() - while chunks and len(L) + len(chunks[-1]) + 1 <= width: - L += " " + chunks.pop() - lines.append(L) - return lines - - def _paragraphs(self, text, *args, **kwargs): - pars = text.split("\n\n") - lines = self._paragraph(pars[0], *args, **kwargs) - for p in pars[1:]: - lines.append("") - lines.extend(self._paragraph(p, *args, **kwargs)) - return lines - - def _print_wrapped(self, text, indent=0): - text = self._paragraphs(text, self.cwidth - indent) - print text.pop(0) - for t in text: - print " " * indent + t - - def _find_common(self, fl): - for o in self.copts: - if fl in o.lflags+o.sflags: - return o - assert False, fl - - def _compute_flags(self, opts, check_conflicts=True): - back = {} - sfl = "" - lfl = [] - for o in opts: - sapp = lapp = "" - if isinstance(o, OptionArg): - sapp, lapp = ":", "=" - for s in o.sflags: - if check_conflicts and back.has_key(s): - raise RuntimeError, "option conflict: %s" % s - back[s] = o - sfl += s[1:] + sapp - for l in o.lflags: - if check_conflicts and back.has_key(l): - raise RuntimeError, "option conflict: %s" % l - back[l] = o - lfl.append(l[2:] + lapp) - return sfl, lfl, back - - def _extract_command(self, args): - """ - Try to extract the command name from the argument list. This is - non-trivial because we want to allow command-specific options even - before the command itself. - """ - opts = self.gopts[:] - for cmd in self.ctable.values(): - opts.extend(cmd.opts) - sfl, lfl, _ = self._compute_flags(opts, check_conflicts=False) - - lopts,largs = getopt.getopt(args, sfl, lfl) - if not largs: - return None - return self._command(largs[0]) - - def _fancy_getopt(self, args, opts, state=None): - if state is None: - state= {} - for o in opts: - if not state.has_key(o.dest): - state[o.dest] = o.default - - sfl, lfl, back = self._compute_flags(opts) - try: - lopts,args = getopt.gnu_getopt(args, sfl, lfl) - except AttributeError: - # Before Python 2.3, there was no gnu_getopt support. - # So we can't parse intermixed positional arguments - # and options. - lopts,args = getopt.getopt(args, sfl, lfl) - - for o,v in lopts: - back[o].apply(state, v) - return state, args - - def _command(self, cmd): - if not self.ctable.has_key(cmd): - self.error("unknown command: '%s'" % cmd) - return self.ctable[cmd] - - def parse(self, args): - if not args: - self.print_small_help() - sys.exit(0) - - cmd = None - try: - cmd = self._extract_command(args) - opts = self.gopts[:] - if cmd: - opts.extend(cmd.opts) - args.remove(cmd.name) - state, args = self._fancy_getopt(args, opts) - except getopt.GetoptError, e: - self.error(e, cmd) - - # Handle builtins - if self.version is not None and state["version"]: - self.print_version() - sys.exit(0) - if state["help"]: # special case for --help - if cmd: - self.print_command_help(cmd) - sys.exit(0) - cmd = self.ctable["help"] - else: - if cmd is None: - self.error("command argument required") - if str(cmd) == "help": - cmd(*args) - sys.exit(0) - return cmd, args, state - - def error(self, s, cmd=None): - print >>sys.stderr, "%s: %s" % (self.progname, s) - if cmd is not None: - self.print_command_help(cmd) - else: - self.print_small_help() - sys.exit(1) - def print_small_help(self): - print "Type '%s help' for usage" % self.progname - def print_usage_line(self): - print "usage: %s [options...] [args...]\n" % self.progname - def print_command_list(self): - print "Available commands (use '%s help COMMAND' for more details):\n" \ - % self.progname - cmds = self.ctable.keys() - cmds.sort() - indent = max(map(len, cmds)) - for c in cmds: - h = self.ctable[c].short_help() - print " %-*s " % (indent, c), - self._print_wrapped(h, indent+6) - def print_command_help(self, cmd): - cmd = self.ctable[str(cmd)] - print 'usage: %s %s\n' % (self.progname, cmd.usage) - self._print_wrapped(cmd.help) - def print_opts(opts, self=self): - if not opts: return - flags = [o.repr_flags() for o in opts] - indent = max(map(len, flags)) - for f,o in zip(flags, opts): - print " %-*s :" % (indent, f), - self._print_wrapped(o.help, indent+5) - print '\nCommand options:' - print_opts(cmd.opts) - print '\nGlobal options:' - print_opts(self.gopts) - - def print_version(self): - print self.version - -############################################################################### -# Options and Commands description -############################################################################### - -global_opts = [ - Option("-F", "--force", - help="force operation even if the working copy is not clean, or " - "there are pending updates"), - Option("-n", "--dry-run", - help="don't actually change anything, just pretend; " - "implies --show-changes"), - Option("-s", "--show-changes", - help="show subversion commands that make changes"), - Option("-v", "--verbose", - help="verbose mode: output more information about progress"), - OptionArg("-u", "--username", - default=None, - help="invoke subversion commands with the supplied username"), - OptionArg("-p", "--password", - default=None, - help="invoke subversion commands with the supplied password"), - OptionArg("-c", "--config-dir", metavar="DIR", - default=None, - help="cause subversion commands to consult runtime config directory DIR"), -] - -common_opts = [ - Option("-b", "--bidirectional", - value=True, - default=False, - help="remove reflected and initialized revisions from merge candidates. " - "Not required but may be specified to speed things up slightly"), - OptionArg("-f", "--commit-file", metavar="FILE", - default="svnmerge-commit-message.txt", - help="set the name of the file where the suggested log message " - "is written to"), - Option("-M", "--record-only", - value=True, - default=False, - help="do not perform an actual merge of the changes, yet record " - "that a merge happened"), - OptionArg("-r", "--revision", - metavar="REVLIST", - default="", - help="specify a revision list, consisting of revision numbers " - 'and ranges separated by commas, e.g., "534,537-539,540"'), - OptionArg("-S", "--source", "--head", - default=None, - help="specify a merge source for this branch. It can be either " - "a working directory path, a full URL, or an unambiguous " - "substring of one of the locations for which merge tracking was " - "already initialized. Needed only to disambiguate in case of " - "multiple merge sources"), -] - -command_table = { - "init": (action_init, - "init [OPTION...] [SOURCE]", - """Initialize merge tracking from SOURCE on the current working - directory. - - If SOURCE is specified, all the revisions in SOURCE are marked as already - merged; if this is not correct, you can use --revision to specify the - exact list of already-merged revisions. - - If SOURCE is omitted, then it is computed from the "svn cp" history of the - current working directory (searching back for the branch point); in this - case, %s assumes that no revision has been integrated yet since - the branch point (unless you teach it with --revision).""" % NAME, - [ - "-f", "-r", # import common opts - OptionArg("-L", "--location-type", - dest="location-type", - default="path", - help="Use this type of location identifier in the new " + - "Subversion properties; 'uuid', 'url', or 'path' " + - "(default)"), - ]), - - "avail": (action_avail, - "avail [OPTION...] [PATH]", - """Show unmerged revisions available for PATH as a revision list. - If --revision is given, the revisions shown will be limited to those - also specified in the option. - - When svnmerge is used to bidirectionally merge changes between a - branch and its source, it is necessary to not merge the same changes - forth and back: e.g., if you committed a merge of a certain - revision of the branch into the source, you do not want that commit - to appear as available to merged into the branch (as the code - originated in the branch itself!). svnmerge will automatically - exclude these so-called "reflected" revisions.""", - [ - Option("-A", "--all", - dest="avail-showwhat", - value=["blocked", "avail"], - default=["avail"], - help="show both available and blocked revisions (aka ignore " - "blocked revisions)"), - "-b", - Option("-B", "--blocked", - dest="avail-showwhat", - value=["blocked"], - help="show the blocked revision list (see '%s block')" % NAME), - Option("-d", "--diff", - dest="avail-display", - value="diffs", - default="revisions", - help="show corresponding diff instead of revision list"), - Option("--summarize", - dest="avail-display", - value="summarize", - help="show summarized diff instead of revision list"), - Option("-l", "--log", - dest="avail-display", - value="logs", - help="show corresponding log history instead of revision list"), - "-r", - "-S", - ]), - - "integrated": (action_integrated, - "integrated [OPTION...] [PATH]", - """Show merged revisions available for PATH as a revision list. - If --revision is given, the revisions shown will be limited to - those also specified in the option.""", - [ - Option("-d", "--diff", - dest="integrated-display", - value="diffs", - default="revisions", - help="show corresponding diff instead of revision list"), - Option("-l", "--log", - dest="integrated-display", - value="logs", - help="show corresponding log history instead of revision list"), - "-r", - "-S", - ]), - - "rollback": (action_rollback, - "rollback [OPTION...] [PATH]", - """Rollback previously merged in revisions from PATH. The - --revision option is mandatory, and specifies which revisions - will be rolled back. Only the previously integrated merges - will be rolled back. - - When manually rolling back changes, --record-only can be used to - instruct %s that a manual rollback of a certain revision - already happened, so that it can record it and offer that - revision for merge henceforth.""" % (NAME), - [ - "-f", "-r", "-S", "-M", # import common opts - ]), - - "merge": (action_merge, - "merge [OPTION...] [PATH]", - """Merge in revisions into PATH from its source. If --revision is omitted, - all the available revisions will be merged. In any case, already merged-in - revisions will NOT be merged again. - - When svnmerge is used to bidirectionally merge changes between a - branch and its source, it is necessary to not merge the same changes - forth and back: e.g., if you committed a merge of a certain - revision of the branch into the source, you do not want that commit - to appear as available to merged into the branch (as the code - originated in the branch itself!). svnmerge will automatically - exclude these so-called "reflected" revisions. - - When manually merging changes across branches, --record-only can - be used to instruct %s that a manual merge of a certain revision - already happened, so that it can record it and not offer that - revision for merge anymore. Conversely, when there are revisions - which should not be merged, use '%s block'.""" % (NAME, NAME), - [ - "-b", "-f", "-r", "-S", "-M", # import common opts - ]), - - "block": (action_block, - "block [OPTION...] [PATH]", - """Block revisions within PATH so that they disappear from the available - list. This is useful to hide revisions which will not be integrated. - If --revision is omitted, it defaults to all the available revisions. - - Do not use this option to hide revisions that were manually merged - into the branch. Instead, use '%s merge --record-only', which - records that a merge happened (as opposed to a merge which should - not happen).""" % NAME, - [ - "-f", "-r", "-S", # import common opts - ]), - - "unblock": (action_unblock, - "unblock [OPTION...] [PATH]", - """Revert the effect of '%s block'. If --revision is omitted, all the - blocked revisions are unblocked""" % NAME, - [ - "-f", "-r", "-S", # import common opts - ]), - - "uninit": (action_uninit, - "uninit [OPTION...] [PATH]", - """Remove merge tracking information from PATH. It cleans any kind of merge - tracking information (including the list of blocked revisions). If there - are multiple sources, use --source to indicate which source you want to - forget about.""", - [ - "-f", "-S", # import common opts - ]), -} - - -def main(args): - global opts - - # Initialize default options - opts = default_opts.copy() - logs.clear() - - optsparser = CommandOpts(global_opts, common_opts, command_table, - version="%%prog r%s\n modified: %s\n\n" - "Copyright (C) 2004,2005 Awarix Inc.\n" - "Copyright (C) 2005, Giovanni Bajo" - % (__revision__, __date__)) - - cmd, args, state = optsparser.parse(args) - opts.update(state) - - source = opts.get("source", None) - branch_dir = "." - - if str(cmd) == "init": - if len(args) == 1: - source = args[0] - elif len(args) > 1: - optsparser.error("wrong number of parameters", cmd) - elif str(cmd) in command_table.keys(): - if len(args) == 1: - branch_dir = args[0] - elif len(args) > 1: - optsparser.error("wrong number of parameters", cmd) - else: - assert False, "command not handled: %s" % cmd - - # Validate branch_dir - if not is_wc(branch_dir): - if str(cmd) == "avail": - info = None - # it should be noted here that svn info does not error exit - # if an invalid target is specified to it (as is - # intuitive). so the try, except code is not absolutely - # necessary. but, I retain it to indicate the intuitive - # handling. - try: - info = get_svninfo(branch_dir) - except LaunchError: - pass - # test that we definitely targeted a subversion directory, - # mirroring the purpose of the earlier is_wc() call - if info is None or not info.has_key("Node Kind") or info["Node Kind"] != "directory": - error('"%s" is neither a valid URL, nor a working directory' % branch_dir) - else: - error('"%s" is not a subversion working directory' % branch_dir) - - # give out some hints as to potential pathids - PathIdentifier.hint(branch_dir) - if source: PathIdentifier.hint(source) - - # Extract the integration info for the branch_dir - branch_props = get_merge_props(branch_dir) - - # Calculate source_url and source_path - report("calculate source path for the branch") - if not source: - if str(cmd) == "init": - cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(branch_dir) - if not cf_source: - error('no copyfrom info available. ' - 'Explicit source argument (-S/--source) required.') - opts["source-url"] = get_repo_root(branch_dir) + cf_source - opts["source-pathid"] = PathIdentifier.from_target(opts["source-url"]) - - if not opts["revision"]: - opts["revision"] = "1-" + cf_rev - else: - opts["source-pathid"] = get_default_source(branch_dir, branch_props) - opts["source-url"] = opts["source-pathid"].get_url() - - assert is_pathid(opts["source-pathid"]) - assert is_url(opts["source-url"]) - else: - # The source was given as a command line argument and is stored in - # SOURCE. Ensure that the specified source does not end in a /, - # otherwise it's easy to have the same source path listed more - # than once in the integrated version properties, with and without - # trailing /'s. - source = rstrip(source, "/") - if not is_wc(source) and not is_url(source): - # Check if it is a substring of a pathid recorded - # within the branch properties. - found = [] - for pathid in branch_props.keys(): - if pathid.match_substring(source): - found.append(pathid) - if len(found) == 1: - # (assumes pathid is a repository-relative-path) - source_pathid = found[0] - source = source_pathid.get_url() - else: - error('"%s" is neither a valid URL, nor an unambiguous ' - 'substring of a repository path, nor a working directory' - % source) - else: - source_pathid = PathIdentifier.from_target(source) - - source_pathid = PathIdentifier.from_target(source) - if str(cmd) == "init" and \ - source_pathid == PathIdentifier.from_target("."): - error("cannot init integration source path '%s'\n" - "Its repository-relative path must differ from the " - "repository-relative path of the current directory." - % source_pathid) - opts["source-pathid"] = source_pathid - opts["source-url"] = target_to_url(source) - - # Sanity check source_url - assert is_url(opts["source-url"]) - # SVN does not support non-normalized URL (and we should not - # have created them) - assert opts["source-url"].find("/..") < 0 - - report('source is "%s"' % opts["source-url"]) - - # Get previously merged revisions (except when command is init) - if str(cmd) != "init": - opts["merged-revs"] = merge_props_to_revision_set(branch_props, - opts["source-pathid"]) - - # Perform the action - cmd(branch_dir, branch_props) - - -if __name__ == "__main__": - try: - main(sys.argv[1:]) - except LaunchError, (ret, cmd, out): - err_msg = "command execution failed (exit code: %d)\n" % ret - err_msg += cmd + "\n" - err_msg += "".join(out) - error(err_msg) - except KeyboardInterrupt: - # Avoid traceback on CTRL+C - print "aborted by user" - sys.exit(1)