Author: brane
Date: Sat Feb 28 10:37:27 2015
New Revision: 1662916
URL: http://svn.apache.org/r1662916
Log:
On the 1.9.x branch: Catch-up merge from trunk@1662901.
* STATUS: Closed for the Beta release.
Removed pending backport nominations, since they're all
included in the catch-up merge.
Added:
subversion/branches/1.9.x/subversion/svn/similarity.c
- copied unchanged from r1662901,
subversion/trunk/subversion/svn/similarity.c
subversion/branches/1.9.x/tools/dev/wc-ng/svn-wc-db-tester.c
- copied unchanged from r1662901,
subversion/trunk/tools/dev/wc-ng/svn-wc-db-tester.c
Modified:
subversion/branches/1.9.x/ (props changed)
subversion/branches/1.9.x/CHANGES
subversion/branches/1.9.x/STATUS
subversion/branches/1.9.x/build.conf
subversion/branches/1.9.x/build/generator/gen_base.py
subversion/branches/1.9.x/build/getversion.py
subversion/branches/1.9.x/build/run_tests.py
subversion/branches/1.9.x/build/transform_sql.py
subversion/branches/1.9.x/configure.ac
subversion/branches/1.9.x/gen-make.py
subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.cpp
subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.h
subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
subversion/branches/1.9.x/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
subversion/branches/1.9.x/subversion/bindings/swig/include/svn_containers.swg
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
subversion/branches/1.9.x/subversion/bindings/swig/python/tests/ra.py
subversion/branches/1.9.x/subversion/bindings/swig/python/tests/repository.py
subversion/branches/1.9.x/subversion/bindings/swig/svn_fs.i
subversion/branches/1.9.x/subversion/include/private/svn_cache.h
subversion/branches/1.9.x/subversion/include/private/svn_sqlite.h
subversion/branches/1.9.x/subversion/include/private/svn_string_private.h
subversion/branches/1.9.x/subversion/include/private/svn_wc_private.h
subversion/branches/1.9.x/subversion/include/svn_client.h
subversion/branches/1.9.x/subversion/include/svn_error.h
subversion/branches/1.9.x/subversion/include/svn_fs.h
subversion/branches/1.9.x/subversion/include/svn_repos.h
subversion/branches/1.9.x/subversion/include/svn_version.h
subversion/branches/1.9.x/subversion/include/svn_wc.h
subversion/branches/1.9.x/subversion/libsvn_client/add.c
subversion/branches/1.9.x/subversion/libsvn_client/blame.c
subversion/branches/1.9.x/subversion/libsvn_client/client.h
subversion/branches/1.9.x/subversion/libsvn_client/commit.c
subversion/branches/1.9.x/subversion/libsvn_client/commit_util.c
subversion/branches/1.9.x/subversion/libsvn_client/copy.c
subversion/branches/1.9.x/subversion/libsvn_client/deprecated.c
subversion/branches/1.9.x/subversion/libsvn_client/merge.c
subversion/branches/1.9.x/subversion/libsvn_client/patch.c
subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.c
subversion/branches/1.9.x/subversion/libsvn_fs_fs/hotcopy.c
subversion/branches/1.9.x/subversion/libsvn_repos/commit.c
subversion/branches/1.9.x/subversion/libsvn_repos/load-fs-vtable.c
subversion/branches/1.9.x/subversion/libsvn_subr/cache-membuffer.c
subversion/branches/1.9.x/subversion/libsvn_subr/cache.c
subversion/branches/1.9.x/subversion/libsvn_subr/error.c
subversion/branches/1.9.x/subversion/libsvn_subr/io.c
subversion/branches/1.9.x/subversion/libsvn_subr/sqlite.c
subversion/branches/1.9.x/subversion/libsvn_subr/string.c
subversion/branches/1.9.x/subversion/libsvn_wc/adm_ops.c
subversion/branches/1.9.x/subversion/libsvn_wc/conflicts.c
subversion/branches/1.9.x/subversion/libsvn_wc/copy.c
subversion/branches/1.9.x/subversion/libsvn_wc/crop.c
subversion/branches/1.9.x/subversion/libsvn_wc/delete.c
subversion/branches/1.9.x/subversion/libsvn_wc/entries.c
subversion/branches/1.9.x/subversion/libsvn_wc/externals.c
subversion/branches/1.9.x/subversion/libsvn_wc/info.c
subversion/branches/1.9.x/subversion/libsvn_wc/node.c
subversion/branches/1.9.x/subversion/libsvn_wc/questions.c
subversion/branches/1.9.x/subversion/libsvn_wc/revision_status.c
subversion/branches/1.9.x/subversion/libsvn_wc/status.c
subversion/branches/1.9.x/subversion/libsvn_wc/translate.c
subversion/branches/1.9.x/subversion/libsvn_wc/update_editor.c
subversion/branches/1.9.x/subversion/libsvn_wc/upgrade.c
subversion/branches/1.9.x/subversion/libsvn_wc/wc-checks.sql
subversion/branches/1.9.x/subversion/libsvn_wc/wc-queries.sql
subversion/branches/1.9.x/subversion/libsvn_wc/wc.h
subversion/branches/1.9.x/subversion/libsvn_wc/wc_db.c
subversion/branches/1.9.x/subversion/libsvn_wc/wc_db.h
subversion/branches/1.9.x/subversion/libsvn_wc/wc_db_private.h
subversion/branches/1.9.x/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/1.9.x/subversion/libsvn_wc/wc_db_util.c
subversion/branches/1.9.x/subversion/libsvn_wc/wc_db_wcroot.c
subversion/branches/1.9.x/subversion/libsvn_wc/workqueue.c
subversion/branches/1.9.x/subversion/svn/blame-cmd.c
subversion/branches/1.9.x/subversion/svn/cl.h
subversion/branches/1.9.x/subversion/svn/copy-cmd.c
subversion/branches/1.9.x/subversion/svn/info-cmd.c
subversion/branches/1.9.x/subversion/svn/propget-cmd.c
subversion/branches/1.9.x/subversion/svn/props.c
subversion/branches/1.9.x/subversion/svn/svn.c
subversion/branches/1.9.x/subversion/svn/util.c
subversion/branches/1.9.x/subversion/svnbench/svnbench.c
subversion/branches/1.9.x/subversion/tests/cmdline/authz_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/basic_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/blame_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/changelist_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/checkout_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/commit_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/copy_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/depth_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/diff_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/entries-dump.c
subversion/branches/1.9.x/subversion/tests/cmdline/entries_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/export_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/externals_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/history_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/import_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/info_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/input_validation_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/lock_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/log_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/merge_authz_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/merge_automatic_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/merge_reintegrate_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/merge_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/merge_tree_conflict_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/mergeinfo_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/move_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/patch_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/prop_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/relocate_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/resolve_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/revert_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/schedule_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/special_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/stat_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/svnauthz_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/svnlook_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/svnmucc_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/actions.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/deeptrees.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/factory.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/main.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/mergetrees.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/sandbox.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/tree.py
subversion/branches/1.9.x/subversion/tests/cmdline/svntest/wc.py
subversion/branches/1.9.x/subversion/tests/cmdline/svnversion_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/switch_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/trans_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/tree_conflict_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/update_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/upgrade_tests.py
subversion/branches/1.9.x/subversion/tests/cmdline/wc_tests.py
subversion/branches/1.9.x/subversion/tests/libsvn_client/client-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_client/mtcc-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_subr/cache-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_subr/sqlite-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_subr/string-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_subr/subst_translate-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_wc/db-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_wc/entries-compat.c
subversion/branches/1.9.x/subversion/tests/libsvn_wc/op-depth-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_wc/utils.c
subversion/branches/1.9.x/subversion/tests/libsvn_wc/utils.h
subversion/branches/1.9.x/subversion/tests/libsvn_wc/wc-queries-test.c
subversion/branches/1.9.x/subversion/tests/libsvn_wc/wc-test-queries.sql
subversion/branches/1.9.x/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
subversion/branches/1.9.x/tools/client-side/bash_completion
subversion/branches/1.9.x/tools/client-side/bash_completion_test
subversion/branches/1.9.x/tools/dist/backport.pl
subversion/branches/1.9.x/tools/dist/backport_tests.py
Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 28 10:37:27 2015
@@ -70,7 +70,7 @@
/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499,1144568,1146145
/subversion/branches/subtree-mergeinfo:876734-878766
/subversion/branches/svn-auth-x509:1603509-1655900
-/subversion/branches/svn-info-detail:1660035-1660413
+/subversion/branches/svn-info-detail:1660035-1662618
/subversion/branches/svn-mergeinfo-enhancements:870119-870195,870197-870288
/subversion/branches/svn-patch-improvements:918519-934609
/subversion/branches/svn_mutex:1141683-1182099
@@ -89,3 +89,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
+/subversion/trunk:1660545-1662901
Modified: subversion/branches/1.9.x/CHANGES
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/CHANGES?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/CHANGES (original)
+++ subversion/branches/1.9.x/CHANGES Sat Feb 28 10:37:27 2015
@@ -1,5 +1,5 @@
Version 1.9.0
-(?? ??? 2014, from /branches/1.9.x)
+(?? ??? 2015, from /branches/1.9.x)
http://svn.apache.org/repos/asf/subversion/tags/1.9.0
User-visible changes:
@@ -11,9 +11,9 @@ http://svn.apache.org/repos/asf/subversi
* membuffer: virtually perfect short-term cache efficiency (r1476664 et at)
* membuffer: quadruple the maximum cacheable directory size (r1545948 et
al)
* resolve: improve interactive conflict resolution menus
- * blame: allow -r M:N with M>N
+ * blame: support showing prospective as well as previous changes
+ * info: support printing of individual values with --show-item (r1662620)
* svn auth: new subcommand to manage cached credentials and certs
- * svn youngest: new remote version of svnlook youngest (issue #4299)
* new experimental filesystem fsx (faster, smaller)
* svnserve: cache config, authz and repos to lower resource usage and
be able to serve large numbers of connections with a limited number
@@ -139,6 +139,7 @@ http://svn.apache.org/repos/asf/subversi
file or SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE env variable (r1572916)
* store human readable info about SSL certs in auth store (r1573625)
* new '--pin-externals' option for svn copy (issue #1258)
+ * the '--strict' option was replaced by '--no-newline' (r1662224)
- Client-side bugfixes:
* export: fix problem exporting symlinks on windows (r1476093)
Modified: subversion/branches/1.9.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Sat Feb 28 10:37:27 2015
@@ -1,6 +1,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
- * THIS RELEASE STREAM IS OPEN FOR STABILIZATION. *
+ * THIS RELEASE STREAM IS *CLOSED* FOR BETA. *
+ * RELEASE BLOCKERS ONLY, PLEASE. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -15,156 +16,6 @@ Status of 1.9.0:
Candidate changes:
==================
- * r1660593
- Fix recording last-* information on nodes copied from foreign repositories
- Justification:
- Recording revisions (and other details) of foreign repositories causes
- incorrect status output and bugs when using -rCOMMITTED, -rPREV, etc.
- Local fix.
- Votes:
- +1: rhuijben, philip
-
- * r1660646
- Fix calculating the repository path of replaced directories on entry upgrade
- Justification:
- Simple fix that avoids recording invalid data in WC-NG.
- Votes:
- +1: rhuijben, philip
-
- * r1661131, r1661179
- Reduce revision gaps on simple moves during commit.
- Justification:
- Simple fix that exposes some of our hard work on move support in 1.8-1.9.
- Notes:
- This implements only the very simplest case to avoid touching too much
- code, but it should handle the most common move cases.
- Votes:
- +1: rhuijben
-
- * r1661247
- Support Python 3 in autogen.sh / gen-make.py.
- Justification:
- Allow building with Python 3, since Python 2 is end-of-life:
- https://www.python.org/dev/peps/pep-0373/#maintenance-releases
- Votes:
- +1: danielsh
-
- * r1661195,r1661208,r1661235,r1661236,r1661238,r1661253
- More 'svn blame' fixes.
- Justification:
- Cleans up the 'Prospective blame' implementation to something usable.
- Depends:
- Requires that the already approved r1660969 group is merged.
- Votes:
- +1: rhuijben, philip
-
- * r1661451, r1661484, r1661511
- Expose metadata_only option on svn_client_copy7()
- Justification:
- We revved this api in 1.9, and already expose this flag for move
- and revert. The implementation is used by at least one Subversion
- GUI since 1.8 (as the flag is available at the libsvn_wc level)
- Votes:
- +1: rhuijben, philip (not after 1.9.0)
-
- * r1661476, r1661480, r1661482
- Fix a segfault when running 'svn info' on a WORKING exclude
- Justification:
- Optimizes url calculation through libsvn_wc and libsvn_client and
- fixes a few real bugs. Makes not-present behavior in info explicit.
- Votes:
- +1: philip, rhuijben
-
- * ^/subversion/branches/1.9.x-db-verify
- Make the db and entries-compat test create valid databases. This merge
- fixes a lot of plumbing to bring in further db consistency fixes.
- Notes:
- While not a good backport suggestion by itself, other backports
- will depend on this backport. As subset this is not to hard to
- review (see logmessage on branch).
- .
- Merges: r1660587,1660610,1660633,1660641,1660659,1660671,1660687,
- 1660758,1660874,1660928,1660955,1660961
- Votes:
- +1: rhuijben
-
- * r1661934
- Make 'svn cp WC URL' provide sane items in its template
- Justification:
- Makes creating backport logmessages much easier. Simple fix.
- Votes:
- +1: rhuijben
-
- * ^/subversion/branches/1.9.x-commit-fixes
- Make the commit logic properly remove locks and break moves.
- Justification:
- Without this patch an incomplete commit will make the database
- inconsistent (leave half moves). Some commits may also leave lock
- tokens that are no longer valid.
- .
- These move cases should not be possible when committing from
- libsvn_client, (as these try to avoid these situations), but at least
- the old libsvn_wc public apis allow corrupting the db, as these give
- access to the wc side commit logic.
- Notes:
- Depends on, and is based of the ^/subversion/branches/1.9.x-db-verify
- branch. Merges: r1660781,1661335,1661363,1661504,1661730,1661755
- Votes:
- +1: rhuijben
-
- * ^/subversion/branches/1.9.x-update-tc-detection
- Improve tree conflict detection in the update editor.
- Justification:
- Without this patch the update editor in many cases doesn't see local
- unversioned items, and continues as if they aren't there. This includes
- items that were deleted and then replaced (but not added yet). These
- limitations affect how we record and handle these situations.
- Notes:
- This changes a public api (svn_wc_status3_t), so can't be released
- in this form after 1.9.0
- .
- Depends on, and is based of the ^/subversion/branches/1.9.x-db-verify
- branch. Merges: r1661570,1661654,1661664,1661669,1661673,1661695,1661698
- .
- Recommended way to review: check branch and its log message.
- Votes:
- +1: rhuijben
-
- * ^/subversion/branches/1.9.x-crop-safety
- Make 'svn update --set-depth X' safe, in that it won't just move your
- changes to /dev/null
- Justification:
- Improves usability of the crop/exclude features. Avoids losing
- things that shouldn't get lost.
- Notes:
- This feature uses code introduced in the
- ^/subversion/branches/1.9.x-update-tc-detection
- branch, to detect what can safely be deleted. As such it depends on
- and is based on this branch.
- .
- Another reason to backport this, is that it fixes how we use the
- database operations that remove nodes.
- .
- Recommended way to review: check branch and its log message.
- Votes:
- +1: rhuijben
-
- * ^/subversion/branches/1.9.x-update-delete
- Fix the creation of 'copies' when during update BASE is deleted, but
- local changes exists.
- Justification:
- Without this patch copies of mixed-revision working copies miss
- the not-present nodes in the intermediate layers, and moves are
- not properly moved to the copy and/or broken.
- Notes:
- This feature depends on and is based of the
- ^/subversion/branches/1.9.x-commit-fixes branch. The
- 1.9.x-update-tc-detection touches some of the same tests and either
- might need rebasing depending on which of the branches is merged first.
- .
- Recommended way to review: check branch and its log message.
- Votes:
- +1: rhuijben
Veto-blocked changes:
=====================
@@ -173,13 +24,3 @@ Veto-blocked changes:
Approved changes:
=================
- * r1660969, r1660975, r1660991, r1661120, r1661121
- Fix assertion reported as part of issue #4467,
- Justification:
- Fixing a few simple revision checks inside the blame handling allows the
- 'kidney blame' to work without assertions failing.
- Notes:
- r1661120 adds a regression test for this assertion problem, in which
- it is required that the file doesn't change in the passed revision.
- Votes:
- +1: rhuijben, julianfoad, philip
Modified: subversion/branches/1.9.x/build.conf
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/build.conf?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/build.conf (original)
+++ subversion/branches/1.9.x/build.conf Sat Feb 28 10:37:27 2015
@@ -1354,6 +1354,15 @@ libs = libsvn_wc libsvn_subr apriconv ap
msvc-force-static = yes
testing = skip
+[svn-wc-db-tester]
+type = exe
+path = tools/dev/wc-ng
+sources = svn-wc-db-tester.c
+install = test
+libs = libsvn_wc libsvn_subr apr
+msvc-force-static = yes
+testing = skip
+
# ----------------------------------------------------------------------------
#
# EXTERNAL TARGETS (NO BUILD NEEDED)
@@ -1513,7 +1522,7 @@ type = project
path = build/win32
libs = __ALL_TESTS__
diff diff3 diff4 fsfs-access-map svnauth
- svn-populate-node-origins-index
+ svn-populate-node-origins-index x509-parser svn-wc-db-tester
[__LIBS__]
type = project
@@ -1628,6 +1637,7 @@ libs = libsvn_wc libsvn_subr apriconv ap
install = tools
[x509-parser]
+description = Tool to verify x509 certificates
type = exe
path = tools/dev
sources = x509-parser.c
Modified: subversion/branches/1.9.x/build/generator/gen_base.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/build/generator/gen_base.py?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/build/generator/gen_base.py (original)
+++ subversion/branches/1.9.x/build/generator/gen_base.py Sat Feb 28 10:37:27
2015
@@ -240,12 +240,16 @@ class GeneratorBase:
os.rename(new_hdrfile, hdrfile)
def write_file_if_changed(self, fname, new_contents):
- """Rewrite the file if new_contents are different than its current content.
+ """Rewrite the file if NEW_CONTENTS are different than its current content.
If you have your windows projects open and generate the projects
it's not a small thing for windows to re-read all projects so
only update those that have changed.
+
+ Under Python >=3, NEW_CONTENTS must be a 'str', not a 'bytes'.
"""
+ if sys.version_info[0] >= 3:
+ new_contents = new_contents.encode()
try:
old_contents = open(fname, 'rb').read()
Modified: subversion/branches/1.9.x/build/getversion.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/build/getversion.py?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/build/getversion.py (original)
+++ subversion/branches/1.9.x/build/getversion.py Sat Feb 28 10:37:27 2015
@@ -26,6 +26,7 @@
import os
import re
import sys
+import traceback
__all__ = ['Parser', 'Result']
@@ -64,8 +65,10 @@ def svn_extractor(parser, include_file):
try:
r = p.parse(include_file)
- except IOError, e:
- usage_and_exit(str(e))
+ except IOError:
+ typ, val, tb = sys.exc_info()
+ msg = ''.join(traceback.format_exception_only(typ, val))
+ usage_and_exit(msg)
sys.stdout.write("%d.%d.%d" % (r.major, r.minor, r.patch))
@@ -75,8 +78,10 @@ def sqlite_extractor(parser, include_fil
try:
r = p.parse(include_file)
- except IOError, e:
- usage_and_exit(str(e))
+ except IOError:
+ typ, val, tb = sys.exc_info()
+ msg = ''.join(traceback.format_exception_only(typ, val))
+ usage_and_exit(msg)
major = r.version / 1000000
minor = (r.version - (major * 1000000)) / 1000
micro = (r.version - (major * 1000000) - (minor * 1000))
Modified: subversion/branches/1.9.x/build/run_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/build/run_tests.py?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/build/run_tests.py (original)
+++ subversion/branches/1.9.x/build/run_tests.py Sat Feb 28 10:37:27 2015
@@ -45,7 +45,7 @@ separated list of test numbers; the defa
'''
# A few useful constants
-SVN_VER_MINOR = 9
+SVN_VER_MINOR = 10
import os, re, subprocess, sys, imp, threading, traceback, exceptions
from datetime import datetime
Modified: subversion/branches/1.9.x/build/transform_sql.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/build/transform_sql.py?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/build/transform_sql.py (original)
+++ subversion/branches/1.9.x/build/transform_sql.py Sat Feb 28 10:37:27 2015
@@ -140,7 +140,7 @@ class Processor(object):
# '/'+1 == '0'
line = re.sub(
- r'IS_STRICT_DESCENDANT_OF[(]([A-Za-z_.]+), ([?][0-9]+)[)]',
+ r'IS_STRICT_DESCENDANT_OF[(]([?]?[A-Za-z0-9_.]+),
([?]?[A-Za-z0-9_.]+)[)]',
r"(((\1) > (CASE (\2) WHEN '' THEN '' ELSE (\2) || '/' END))" +
r" AND ((\1) < CASE (\2) WHEN '' THEN X'FFFF' ELSE (\2) || '0'
END))",
line)
@@ -194,14 +194,14 @@ class Processor(object):
line)
# Another preprocessing.
- for symbol, string in self.token_map.iteritems():
+ for symbol, string in self.token_map.items():
# ### This doesn't sql-escape 'string'
line = re.sub(r'\b%s\b' % re.escape(symbol), "'%s'" % string, line)
if line.strip():
handled = False
- for regex, handler in self._directives.iteritems():
+ for regex, handler in self._directives.items():
match = regex.match(line)
if match:
handler(match)
Modified: subversion/branches/1.9.x/configure.ac
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/configure.ac?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/configure.ac (original)
+++ subversion/branches/1.9.x/configure.ac Sat Feb 28 10:37:27 2015
@@ -1455,8 +1455,15 @@ if test "$do_javahl_build" = "yes"; then
# it.
AC_MSG_CHECKING([for additional flags to link C++ libraries])
if test "x$ac_compiler_gnu" = "xyes"; then
- LT_CXX_LIBADD="-lstdc++"
- AC_MSG_RESULT([$LT_CXX_LIBADD])
+ case "$host" in
+ *freebsd10*)
+ AC_MSG_RESULT([none needed])
+ ;;
+ *)
+ LT_CXX_LIBADD="-lstdc++"
+ AC_MSG_RESULT([$LT_CXX_LIBADD])
+ ;;
+ esac
else
AC_MSG_RESULT([none needed])
fi
Modified: subversion/branches/1.9.x/gen-make.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/gen-make.py?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/gen-make.py (original)
+++ subversion/branches/1.9.x/gen-make.py Sat Feb 28 10:37:27 2015
@@ -25,7 +25,9 @@
import os
+import traceback
import sys
+
import getopt
try:
my_getopt = getopt.gnu_getopt
@@ -266,8 +268,10 @@ if __name__ == '__main__':
])
if len(args) > 1:
_usage_exit("Too many arguments")
- except getopt.GetoptError, e:
- _usage_exit(str(e))
+ except getopt.GetoptError:
+ typ, val, tb = sys.exc_info()
+ msg = ''.join(traceback.format_exception_only(typ, val))
+ _usage_exit(msg)
conf = 'build.conf'
skip = 0
Modified:
subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.cpp
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.cpp?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.cpp
(original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.cpp
Sat Feb 28 10:37:27 2015
@@ -519,6 +519,7 @@ apr_hash_t *get_externals_to_pin(jobject
void SVNClient::copy(CopySources ©Sources, const char *destPath,
CommitMessage *message, bool copyAsChild,
bool makeParents, bool ignoreExternals,
+ bool metadataOnly,
bool pinExternals, jobject jexternalsToPin,
PropertyTable &revprops, CommitCallback *callback)
{
@@ -538,6 +539,7 @@ void SVNClient::copy(CopySources ©So
if (!JNIUtil::isJavaExceptionThrown())
SVN_JNI_ERR(svn_client_copy7(srcs, destinationPath.c_str(),
copyAsChild, makeParents, ignoreExternals,
+ metadataOnly,
pinExternals, pin_set,
revprops.hash(subPool),
CommitCallback::callback, callback,
Modified:
subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.h
(original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNClient.h Sat
Feb 28 10:37:27 2015
@@ -149,7 +149,7 @@ class SVNClient :public SVNBase
PropertyTable &revprops, CommitCallback *callback);
void copy(CopySources ©Sources, const char *destPath,
CommitMessage *message, bool copyAsChild, bool makeParents,
- bool ignoreExternals, bool pinExternals,
+ bool ignoreExternals, bool metaDataOnly, bool pinExternals,
jobject jexternalsToPin,
PropertyTable &revprops, CommitCallback *callback);
void commit(Targets &targets, CommitMessage *message, svn_depth_t depth,
Modified:
subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
(original)
+++
subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
Sat Feb 28 10:37:27 2015
@@ -559,7 +559,7 @@ JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_copy
(JNIEnv *env, jobject jthis, jobject jcopySources, jstring jdestPath,
jboolean jcopyAsChild, jboolean jmakeParents, jboolean jignoreExternals,
- jboolean jpinExternals, jobject jexternalsToPin,
+ jboolean jmetadataOnly, jboolean jpinExternals, jobject jexternalsToPin,
jobject jrevpropTable, jobject jmessage, jobject jcallback)
{
JNIEntry(SVNClient, copy);
@@ -593,7 +593,8 @@ Java_org_apache_subversion_javahl_SVNCli
CommitCallback callback(jcallback);
cl->copy(copySources, destPath, &message,
bool(jcopyAsChild), bool(jmakeParents),
- bool(jignoreExternals), bool(jpinExternals), jexternalsToPin,
+ bool(jignoreExternals), bool(jmetadataOnly),
+ bool(jpinExternals), jexternalsToPin,
revprops, jcallback ? &callback : NULL);
}
Modified:
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
(original)
+++
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
Sat Feb 28 10:37:27 2015
@@ -376,6 +376,7 @@ public interface ISVNClient
* @param makeParents Whether to create intermediate parents
* @param ignoreExternals Whether or not to process external definitions
* as part of this operation.
+ * @param metadataOnly Copy just the metadata and not the working
files/dirs
* @param pinExternals Whether or not to pin external definitions as part
* of this operation.
* @param externalsToPin The set of externals to pin.
@@ -401,7 +402,8 @@ public interface ISVNClient
*/
void copy(List<CopySource> sources, String destPath,
boolean copyAsChild, boolean makeParents,
- boolean ignoreExternals, boolean pinExternals,
+ boolean ignoreExternals, boolean metadataOnly,
+ boolean pinExternals,
Map<String, List<ExternalItem>> externalsToPin,
Map<String, String> revpropTable,
CommitMessageCallback handler, CommitCallback callback)
@@ -411,8 +413,9 @@ public interface ISVNClient
* Copy versioned paths with the history preserved.
* <p>
* Behaves like the 1.9 version with
- * <code>pinExternals<code> set to <code>false</code> and
- * <code>externalsToPin<code> set to <code>null</code>.
+ * <code>pinExternals</code> set to <code>false</code> and
+ * <code>externalsToPin</code> set to <code>null</code> and
+ * <code>metadataOnly</code> set to <code>false</code>.
*/
void copy(List<CopySource> sources, String destPath,
boolean copyAsChild, boolean makeParents,
Modified:
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
(original)
+++
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
Sat Feb 28 10:37:27 2015
@@ -142,10 +142,10 @@ public class NativeResources
private static final void init()
{
version = new Version();
- if (!version.isAtLeast(1, 9, 0))
+ if (!version.isAtLeast(1, 10, 0))
{
throw new LinkageError("Native library version must be at least " +
- "1.9.0, but is only " + version);
+ "1.10.0, but is only " + version);
}
runtimeVersion = new RuntimeVersion();
Modified:
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
(original)
+++
subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
Sat Feb 28 10:37:27 2015
@@ -240,7 +240,8 @@ public class SVNClient implements ISVNCl
public native void copy(List<CopySource> sources, String destPath,
boolean copyAsChild, boolean makeParents,
- boolean ignoreExternals, boolean pinExternals,
+ boolean ignoreExternals, boolean metadataOnly,
+ boolean pinExternals,
Map<String, List<ExternalItem>> externalsToPin,
Map<String, String> revpropTable,
CommitMessageCallback handler, CommitCallback
callback)
@@ -254,7 +255,7 @@ public class SVNClient implements ISVNCl
throws ClientException
{
copy(sources, destPath, copyAsChild, makeParents, ignoreExternals,
- false, null, revpropTable, handler, callback);
+ false, false, null, revpropTable, handler, callback);
}
public native void move(Set<String> srcPaths, String destPath,
Modified:
subversion/branches/1.9.x/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
(original)
+++
subversion/branches/1.9.x/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Sat Feb 28 10:37:27 2015
@@ -1060,7 +1060,7 @@ public class BasicTests extends SVNTests
}
client.copy(sources,
new File(thisTest.getWorkingCopy(), "A/B/F").getPath(),
- true, false, false, false, null, null, null, null);
+ true, false, false, false, false, null, null, null, null);
// Commit the changes, and check the state of the WC.
checkCommitRevision(thisTest,
@@ -1077,7 +1077,7 @@ public class BasicTests extends SVNTests
"A/B").getPath(), Revision.WORKING,
Revision.WORKING));
client.copy(wcSource, thisTest.getUrl() + "/parent/A/B",
- true, true, false, false, null, null,
+ true, true, false, false, false, null, null,
new ConstMsg("Copy WC to URL"), null);
// update the WC to get new folder and confirm the copy
@@ -1123,7 +1123,7 @@ public class BasicTests extends SVNTests
List<CopySource> sources = new ArrayList<CopySource>(1);
sources.add(new CopySource(thisTest.getWCPath() + "/A/B", null, null));
String target = thisTest.getWCPath() + "/A/Bcopy";
- client.copy(sources, target, true, false, false,
+ client.copy(sources, target, true, false, false, false,
true, // pinExternals
null, // externalsToPin
null, null, null);
@@ -1151,7 +1151,7 @@ public class BasicTests extends SVNTests
List<CopySource> sources = new ArrayList<CopySource>(1);
sources.add(new CopySource(thisTest.getWCPath() + "/A/B", null, null));
String target = thisTest.getUrl() + "/A/Bcopy";
- client.copy(sources, target, true, false, false,
+ client.copy(sources, target, true, false, false, false,
true, // pinExternals
null, // externalsToPin
null, new ConstMsg("Copy WC to REPO"), null);
@@ -1179,7 +1179,7 @@ public class BasicTests extends SVNTests
List<CopySource> sources = new ArrayList<CopySource>(1);
sources.add(new CopySource(thisTest.getUrl() + "/A/B", null, null));
String target = thisTest.getWCPath() + "/A/Bcopy";
- client.copy(sources, target, true, false, false,
+ client.copy(sources, target, true, false, false, false,
true, // pinExternals
null, // externalsToPin
null, null, null);
@@ -1207,7 +1207,7 @@ public class BasicTests extends SVNTests
List<CopySource> sources = new ArrayList<CopySource>(1);
sources.add(new CopySource(thisTest.getUrl() + "/A/B", null, null));
String target = thisTest.getUrl() + "/A/Bcopy";
- client.copy(sources, target, true, false, false,
+ client.copy(sources, target, true, false, false, false,
true, // pinExternals
null, // externalsToPin
null, new ConstMsg("Copy WC to REPO"), null);
@@ -1242,7 +1242,7 @@ public class BasicTests extends SVNTests
List<CopySource> sources = new ArrayList<CopySource>(1);
sources.add(new CopySource(sourceUrl, null, null));
String target = thisTest.getUrl() + "/A/Bcopy";
- client.copy(sources, target, true, false, false,
+ client.copy(sources, target, true, false, false, false,
true, // pinExternals
externalsToPin,
null, new ConstMsg("Copy WC to REPO"), null);
@@ -3175,7 +3175,7 @@ public class BasicTests extends SVNTests
srcs.add(new CopySource(thisTest.getUrl() + "/A", Revision.HEAD,
Revision.HEAD));
client.copy(srcs, thisTest.getUrl() + "/branches/A",
- true, false, false, false, null, null,
+ true, false, false, false, false, null, null,
new ConstMsg("create A branch"), null);
// update the WC (to r3) so that it has the branches folder
Modified:
subversion/branches/1.9.x/subversion/bindings/swig/include/svn_containers.swg
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/swig/include/svn_containers.swg?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/swig/include/svn_containers.swg
(original)
+++
subversion/branches/1.9.x/subversion/bindings/swig/include/svn_containers.swg
Sat Feb 28 10:37:27 2015
@@ -426,6 +426,25 @@
{
$1 = svn_swig_py_path_revs_hash_from_dict($input, _global_pool);
}
+%typemap(in) apr_hash_t *unlock_targets
+{
+ $1 = svn_swig_py_stringhash_from_dict($input, _global_pool);
+}
+%typemap(in) apr_hash_t *lock_targets
+ (apr_pool_t *_global_pool, PyObject *_global_pool = NULL)
+{
+ if (_global_pool == NULL)
+ {
+ if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
+ &_global_py_pool, &_global_pool))
+ SWIG_fail;
+ }
+ $1 = svn_swig_py_struct_ptr_hash_from_dict($input,
+ $descriptor(svn_fs_lock_target_t *), _global_pool);
+ if (PyErr_Occurred()) {
+ SWIG_fail;
+ }
+}
#endif
#ifdef SWIGPERL
Modified:
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
(original)
+++
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
Sat Feb 28 10:37:27 2015
@@ -459,6 +459,14 @@ static PyObject *make_ob_wc_adm_access(v
NULL);
}
+static PyObject *make_ob_error(svn_error_t *err)
+{
+ if (err)
+ return svn_swig_NewPointerObjString(err, "svn_error_t *", NULL);
+ else
+ return Py_None;
+}
+
/***/
@@ -2853,6 +2861,42 @@ svn_error_t *svn_swig_py_fs_get_locks_fu
return err;
}
+svn_error_t *svn_swig_py_fs_lock_callback(
+ void *baton,
+ const char *path,
+ const svn_lock_t *lock,
+ svn_error_t *fs_err,
+ apr_pool_t *pool)
+{
+ svn_error_t *err = SVN_NO_ERROR;
+ PyObject *py_callback = baton, *result;
+
+ if (py_callback == NULL || py_callback == Py_None)
+ return SVN_NO_ERROR;
+
+ svn_swig_py_acquire_py_lock();
+
+ if ((result = PyObject_CallFunction(py_callback,
+ (char *)"sO&O&O&",
+ path,
+ make_ob_lock, lock,
+ make_ob_error, fs_err,
+ make_ob_pool, pool)) == NULL)
+ {
+ err = callback_exception_error();
+ }
+ else if (result != Py_None)
+ {
+ err = callback_bad_return_error("Not None");
+ }
+
+ Py_XDECREF(result);
+
+ svn_swig_py_release_py_lock();
+ return err;
+}
+
+
svn_error_t *svn_swig_py_get_commit_log_func(const char **log_msg,
const char **tmp_file,
const apr_array_header_t *
@@ -4252,9 +4296,10 @@ svn_error_t *svn_swig_py_ra_lock_callbac
svn_swig_py_acquire_py_lock();
if ((result = PyObject_CallFunction(py_callback,
- (char *)"sbO&O&",
+ (char *)"sbO&O&O&",
path, do_lock,
make_ob_lock, lock,
+ make_ob_error, ra_err,
make_ob_pool, pool)) == NULL)
{
err = callback_exception_error();
Modified:
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
(original)
+++
subversion/branches/1.9.x/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
Sat Feb 28 10:37:27 2015
@@ -316,6 +316,13 @@ svn_error_t *svn_swig_py_fs_get_locks_fu
svn_lock_t *lock,
apr_pool_t *pool);
+svn_error_t *svn_swig_py_fs_lock_callback(
+ void *baton,
+ const char *path,
+ const svn_lock_t *lock,
+ svn_error_t *ra_err,
+ apr_pool_t *pool);
+
/* thunked commit log fetcher */
svn_error_t *svn_swig_py_get_commit_log_func(const char **log_msg,
const char **tmp_file,
Modified: subversion/branches/1.9.x/subversion/bindings/swig/python/tests/ra.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/swig/python/tests/ra.py?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/swig/python/tests/ra.py
(original)
+++ subversion/branches/1.9.x/subversion/bindings/swig/python/tests/ra.py Sat
Feb 28 10:37:27 2015
@@ -298,13 +298,53 @@ class SubversionRepositoryAccessTestCase
ra.get_file_revs(self.ra_ctx, "trunk/README.txt", 0, 10, rev_handler)
def test_lock(self):
- def callback(baton, path, do_lock, lock, ra_err, pool):
- pass
- # This test merely makes sure that the arguments can be wrapped
- # properly. svn.ra.lock() currently fails because it is not possible
- # to retrieve the username from the auth_baton yet.
- self.assertRaises(core.SubversionException,
- lambda: ra.lock(self.ra_ctx, {"": 0}, "sleutel", False, callback))
+
+ self.calls = 0
+ self.locks = 0
+ self.errors = 0
+ def callback(path, do_lock, lock, ra_err, pool):
+ self.calls += 1
+ self.assertEqual(path, "trunk/README2.txt")
+ if lock:
+ self.assertEqual(lock.owner, "jrandom")
+ self.locks += 1
+ if ra_err:
+ self.assert_(ra_err.apr_err == core.SVN_ERR_FS_PATH_ALREADY_LOCKED
+ or ra_err.apr_err == core.SVN_ERR_FS_NO_SUCH_LOCK)
+ self.errors += 1
+
+ providers = [core.svn_auth_get_username_provider()]
+ self.callbacks.auth_baton = core.svn_auth_open(providers)
+ core.svn_auth_set_parameter(self.callbacks.auth_baton,
+ core.SVN_AUTH_PARAM_DEFAULT_USERNAME,
+ "jrandom")
+ self.ra_ctx = ra.open2(self.repos_uri, self.callbacks, {})
+ rev = fs.youngest_rev(self.fs)
+ ra.lock(self.ra_ctx, {"trunk/README2.txt":rev}, "sleutel", False, callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 1)
+ self.assertEqual(self.errors, 0)
+
+ self.calls = 0
+ self.locks = 0
+ ra.lock(self.ra_ctx, {"trunk/README2.txt":rev}, "sleutel", False, callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 0)
+ self.assertEqual(self.errors, 1)
+
+ self.calls = 0
+ self.errors = 0
+ the_lock = fs.get_lock(self.fs, "/trunk/README2.txt")
+ ra.unlock(self.ra_ctx, {"trunk/README2.txt":the_lock.token}, False,
callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 0)
+ self.assertEqual(self.errors, 0)
+
+ self.calls = 0
+ ra.unlock(self.ra_ctx, {"trunk/README2.txt":the_lock.token}, False,
callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 0)
+ self.assertEqual(self.errors, 1)
def test_get_log2(self):
# Get an interesting commmit.
Modified:
subversion/branches/1.9.x/subversion/bindings/swig/python/tests/repository.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/swig/python/tests/repository.py?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
---
subversion/branches/1.9.x/subversion/bindings/swig/python/tests/repository.py
(original)
+++
subversion/branches/1.9.x/subversion/bindings/swig/python/tests/repository.py
Sat Feb 28 10:37:27 2015
@@ -311,6 +311,98 @@ class SubversionRepositoryTestCase(unitt
repos.freeze([self.repos_path], self.freeze_body)
self.assertEqual(self.freeze_invoked, 1)
+ def test_lock_unlock(self):
+ """Basic lock/unlock"""
+
+ access = fs.create_access('jrandom')
+ fs.set_access(self.fs, access)
+ fs.lock(self.fs, '/trunk/README.txt', None, None, 0, 0, self.rev, False)
+ try:
+ fs.lock(self.fs, '/trunk/README.txt', None, None, 0, 0, self.rev, False)
+ except core.SubversionException, exc:
+ self.assertEqual(exc.apr_err, core.SVN_ERR_FS_PATH_ALREADY_LOCKED)
+ fs.lock(self.fs, '/trunk/README.txt', None, None, 0, 0, self.rev, True)
+
+ self.calls = 0
+ self.errors = 0
+ def unlock_callback(path, lock, err, pool):
+ self.assertEqual(path, '/trunk/README.txt')
+ self.assertEqual(lock, None)
+ self.calls += 1
+ if err != None:
+ self.assertEqual(err.apr_err, core.SVN_ERR_FS_NO_SUCH_LOCK)
+ self.errors += 1
+
+ the_lock = fs.get_lock(self.fs, '/trunk/README.txt')
+ fs.unlock_many(self.fs, {'/trunk/README.txt':the_lock.token}, False,
+ unlock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.errors, 0)
+
+ self.calls = 0
+ fs.unlock_many(self.fs, {'/trunk/README.txt':the_lock.token}, False,
+ unlock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.errors, 1)
+
+ self.locks = 0
+ def lock_callback(path, lock, err, pool):
+ self.assertEqual(path, '/trunk/README.txt')
+ if lock != None:
+ self.assertEqual(lock.owner, 'jrandom')
+ self.locks += 1
+ self.calls += 1
+ if err != None:
+ self.assertEqual(err.apr_err, core.SVN_ERR_FS_PATH_ALREADY_LOCKED)
+ self.errors += 1
+
+ self.calls = 0
+ self.errors = 0
+ target = fs.lock_target_create(None, self.rev)
+ fs.lock_many(self.fs, {'trunk/README.txt':target},
+ None, False, 0, False, lock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 1)
+ self.assertEqual(self.errors, 0)
+
+ self.calls = 0
+ self.locks = 0
+ fs.lock_many(self.fs, {'trunk/README.txt':target},
+ None, False, 0, False, lock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 0)
+ self.assertEqual(self.errors, 1)
+
+ self.calls = 0
+ self.errors = 0
+ the_lock = fs.get_lock(self.fs, '/trunk/README.txt')
+ repos.fs_unlock_many(self.repos, {'trunk/README.txt':the_lock.token},
+ False, unlock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.errors, 0)
+
+ self.calls = 0
+ repos.fs_unlock_many(self.repos, {'trunk/README.txt':the_lock.token},
+ False, unlock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.errors, 1)
+
+ self.calls = 0
+ self.errors = 0
+ repos.fs_lock_many(self.repos, {'trunk/README.txt':target},
+ None, False, 0, False, lock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 1)
+ self.assertEqual(self.errors, 0)
+
+ self.calls = 0
+ self.locks = 0
+ repos.fs_lock_many(self.repos, {'trunk/README.txt':target},
+ None, False, 0, False, lock_callback)
+ self.assertEqual(self.calls, 1)
+ self.assertEqual(self.locks, 0)
+ self.assertEqual(self.errors, 1)
+
def suite():
return unittest.defaultTestLoader.loadTestsFromTestCase(
SubversionRepositoryTestCase)
Modified: subversion/branches/1.9.x/subversion/bindings/swig/svn_fs.i
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/swig/svn_fs.i?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/swig/svn_fs.i (original)
+++ subversion/branches/1.9.x/subversion/bindings/swig/svn_fs.i Sat Feb 28
10:37:27 2015
@@ -71,6 +71,14 @@
,
svn_swig_rb_fs_get_locks_callback)
#endif
+
+#ifdef SWIGPYTHON
+%callback_typemap(svn_fs_lock_callback_t lock_callback, void *lock_baton,
+ svn_swig_py_fs_lock_callback,
+ ,
+ )
+#endif
+
/* -----------------------------------------------------------------------
svn_fs_get_merge_info
*/
Modified: subversion/branches/1.9.x/subversion/include/private/svn_cache.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/private/svn_cache.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/1.9.x/subversion/include/private/svn_cache.h Sat Feb 28
10:37:27 2015
@@ -542,6 +542,15 @@ svn_cache__get_global_membuffer_cache(vo
svn_cache__info_t *
svn_cache__membuffer_get_global_info(apr_pool_t *pool);
+/**
+ * Remove all current contents from CACHE.
+ *
+ * NOTE: In a multi-threaded environment, new contents may have been put
+ * into the cache by the time this function returns.
+ */
+svn_error_t *
+svn_cache__membuffer_clear(svn_membuffer_t *cache);
+
/** @} */
Modified: subversion/branches/1.9.x/subversion/include/private/svn_sqlite.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/private/svn_sqlite.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/1.9.x/subversion/include/private/svn_sqlite.h Sat Feb
28 10:37:27 2015
@@ -63,7 +63,7 @@ typedef enum svn_sqlite__mode_e {
typedef svn_error_t *(*svn_sqlite__func_t)(svn_sqlite__context_t *sctx,
int argc,
svn_sqlite__value_t *values[],
- apr_pool_t *scatch_pool);
+ void *baton);
/* Step the given statement; if it returns SQLITE_DONE, reset the statement.
Modified:
subversion/branches/1.9.x/subversion/include/private/svn_string_private.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/private/svn_string_private.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/private/svn_string_private.h
(original)
+++ subversion/branches/1.9.x/subversion/include/private/svn_string_private.h
Sat Feb 28 10:37:27 2015
@@ -197,10 +197,17 @@ apr_uint64_t
svn__base36toui64(const char **next, const char *source);
/**
+ * The upper limit of the similarity range returned by
+ * svn_cstring__similarity() and svn_string__similarity().
+ */
+#define SVN_STRING__SIM_RANGE_MAX 1000000
+
+/**
* Computes the similarity score of STRA and STRB. Returns the ratio
* of the length of their longest common subsequence and the average
- * length of the strings, normalized to the range [0..1000].
- * The result is equivalent to Python's
+ * length of the strings, normalized to the range
+ * [0..SVN_STRING__SIM_RANGE_MAX]. The result is equivalent to
+ * Python's
*
* difflib.SequenceMatcher.ratio
*
@@ -225,7 +232,7 @@ svn__base36toui64(const char **next, con
* has O(strlen(STRA) * strlen(STRB)) worst-case performance,
* so do keep a rein on your enthusiasm.
*/
-unsigned int
+apr_size_t
svn_cstring__similarity(const char *stra, const char *strb,
svn_membuf_t *buffer, apr_size_t *rlcs);
@@ -233,7 +240,7 @@ svn_cstring__similarity(const char *stra
* Like svn_cstring__similarity, but accepts svn_string_t's instead
* of NUL-terminated character strings.
*/
-unsigned int
+apr_size_t
svn_string__similarity(const svn_string_t *stringa,
const svn_string_t *stringb,
svn_membuf_t *buffer, apr_size_t *rlcs);
Modified: subversion/branches/1.9.x/subversion/include/private/svn_wc_private.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/private/svn_wc_private.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/private/svn_wc_private.h
(original)
+++ subversion/branches/1.9.x/subversion/include/private/svn_wc_private.h Sat
Feb 28 10:37:27 2015
@@ -380,15 +380,13 @@ svn_wc__status2_from_3(svn_wc_status2_t
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-
/**
* Set @a *children to a new array of the immediate children of the working
* node at @a dir_abspath. The elements of @a *children are (const char *)
* absolute paths.
*
- * Include children that are scheduled for deletion. Iff @a show_hidden
- * is true, also include children that are 'excluded' or 'server-excluded' or
- * 'not-present'.
+ * Include children that are scheduled for deletion, but not those that
+ * are excluded, server-excluded or not-present.
*
* Return every path that refers to a child of the working node at
* @a dir_abspath. Do not include a path just because it was a child of a
@@ -402,24 +400,20 @@ svn_error_t *
svn_wc__node_get_children_of_working_node(const apr_array_header_t **children,
svn_wc_context_t *wc_ctx,
const char *dir_abspath,
- svn_boolean_t show_hidden,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
- * Like svn_wc__node_get_children_of_working_node(), except also include any
- * path that was a child of a deleted directory that existed at
- * @a dir_abspath, even if that directory is now scheduled to be replaced by
- * the working node at @a dir_abspath.
+ * Gets the immediate 'not-present' children of a node.
+ *
+ * #### Needed during 'svn cp WC URL' to handle mixed revision cases
*/
svn_error_t *
-svn_wc__node_get_children(const apr_array_header_t **children,
- svn_wc_context_t *wc_ctx,
- const char *dir_abspath,
- svn_boolean_t show_hidden,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
+svn_wc__node_get_not_present_children(const apr_array_header_t **children,
+ svn_wc_context_t *wc_ctx,
+ const char *dir_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/**
* Fetch the repository information for the working version
@@ -519,26 +513,6 @@ svn_wc__node_get_origin(svn_boolean_t *i
apr_pool_t *scratch_pool);
/**
- * Set @a *deleted_ancestor_abspath to the root of the delete operation
- * that deleted @a local_abspath. If @a local_abspath itself was deleted
- * and has no deleted ancestor, @a *deleted_ancestor_abspath will equal
- * @a local_abspath. If @a local_abspath was not deleted,
- * set @a *deleted_ancestor_abspath to @c NULL.
- *
- * A node is considered 'deleted' if it is deleted or moved-away, and is
- * not replaced.
- *
- * @a *deleted_ancestor_abspath is allocated in @a result_pool.
- * Use @a scratch_pool for all temporary allocations.
- */
-svn_error_t *
-svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/**
* Set @a *not_present to TRUE when @a local_abspath has status
* svn_wc__db_status_not_present. Set @a *user_excluded to TRUE when
* @a local_abspath has status svn_wc__db_status_excluded. Set
@@ -943,15 +917,17 @@ svn_wc__get_excluded_subtrees(apr_hash_t
/* Indicate in @a *is_modified whether the working copy has local
* modifications, using context @a wc_ctx.
- * Use @a scratch_pool for temporary allocations.
*
- * This function provides a subset of the functionality of
- * svn_wc_revision_status2() and is more efficient if the caller
- * doesn't need all information returned by svn_wc_revision_status2(). */
+ * If IGNORE_UNVERSIONED, unversioned paths inside the tree rooted by
+ * LOCAL_ABSPATH are not seen as a change, otherwise they are.
+ * (svn:ignored paths are always ignored)
+ *
+ * Use @a scratch_pool for temporary allocations. */
svn_error_t *
svn_wc__has_local_mods(svn_boolean_t *is_modified,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
+ svn_boolean_t ignore_unversioned,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
Modified: subversion/branches/1.9.x/subversion/include/svn_client.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_client.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_client.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_client.h Sat Feb 28
10:37:27 2015
@@ -4492,6 +4492,12 @@ typedef struct svn_client_copy_source_t
* If @a ignore_externals is set, don't process externals definitions
* as part of this operation.
*
+ * If @a metadata_only is @c TRUE and copying a file in a working copy,
+ * everything in the metadata is updated as if the node is moved, but the
+ * actual disk copy operation is not performed. This feature is useful for
+ * clients that want to keep the working copy in sync while the actual working
+ * copy is updated by some other task.
+ *
* If @a pin_externals is set, pin URLs in copied externals definitions
* to their current revision unless they were already pinned to a
* particular revision. A pinned external uses a URL which points at a
@@ -4547,6 +4553,7 @@ svn_client_copy7(const apr_array_header_
svn_boolean_t copy_as_child,
svn_boolean_t make_parents,
svn_boolean_t ignore_externals,
+ svn_boolean_t metadata_only,
svn_boolean_t pin_externals,
const apr_hash_t *externals_to_pin,
const apr_hash_t *revprop_table,
@@ -4556,7 +4563,9 @@ svn_client_copy7(const apr_array_header_
apr_pool_t *pool);
/**
- * Similar to svn_client_copy7(), but cannot pin externals.
+ * Similar to svn_client_copy7(), but doesn't support meta_data_only
+ * and cannot pin externals.
+ *
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
Modified: subversion/branches/1.9.x/subversion/include/svn_error.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_error.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_error.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_error.h Sat Feb 28
10:37:27 2015
@@ -173,6 +173,19 @@ svn_error_t *
svn_error_quick_wrap(svn_error_t *child,
const char *new_msg);
+/** A quick n' easy way to create a wrapped exception with your own
+ * printf-style error message produced by passing @a fmt, using
+ * apr_psprintf(), before throwing it up the stack. (It uses all of the
+ * @a child's fields.)
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_error_quick_wrapf(svn_error_t *child,
+ const char *fmt,
+ ...)
+ __attribute__((format(printf, 2, 3)));
+
/** Compose two errors, returning the composition as a brand new error
* and consuming the original errors. Either or both of @a err1 and
* @a err2 may be @c SVN_NO_ERROR. If both are not @c SVN_NO_ERROR,
@@ -256,6 +269,8 @@ svn_error__locate(const char *file,
(svn_error__locate(__FILE__,__LINE__), (svn_error_wrap_apr))
#define svn_error_quick_wrap \
(svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrap))
+#define svn_error_quick_wrapf \
+ (svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrapf))
#endif
Modified: subversion/branches/1.9.x/subversion/include/svn_fs.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_fs.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_fs.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_fs.h Sat Feb 28 10:37:27
2015
@@ -2661,7 +2661,7 @@ typedef svn_error_t *(*svn_fs_lock_callb
svn_error_t *fs_err,
apr_pool_t *pool);
-/** Lock the paths in @a targets in @a fs.
+/** Lock the paths in @a lock_targets in @a fs.
*
* @a fs must have a username associated with it (see
* #svn_fs_access_t), else return #SVN_ERR_FS_NO_USER. Set the
@@ -2675,7 +2675,7 @@ typedef svn_error_t *(*svn_fs_lock_callb
* to use it. If in doubt, pass 0.
*
* The paths to be locked are passed as the <tt>const char *</tt> keys
- * of the @a targets hash. The hash values are
+ * of the @a lock_targets hash. The hash values are
* <tt>svn_fs_lock_target_t *</tt> and provide the token and
* @a current_rev for each path. The token is a lock token such as can
* be generated using svn_fs_generate_lock_token() (indicating that
@@ -2697,7 +2697,7 @@ typedef svn_error_t *(*svn_fs_lock_callb
* If @a expiration_date is zero, then create a non-expiring lock.
* Else, the lock will expire at @a expiration_date.
*
- * For each path in @a targets @a lock_callback will be invoked
+ * For each path in @a lock_targets @a lock_callback will be invoked
* passing @a lock_baton and the lock and error that apply to path.
* @a lock_callback can be NULL in which case it is not called.
*
@@ -2713,7 +2713,7 @@ typedef svn_error_t *(*svn_fs_lock_callb
*/
svn_error_t *
svn_fs_lock_many(svn_fs_t *fs,
- apr_hash_t *targets,
+ apr_hash_t *lock_targets,
const char *comment,
svn_boolean_t is_dav_comment,
apr_time_t expiration_date,
@@ -2753,10 +2753,10 @@ svn_fs_generate_lock_token(const char **
apr_pool_t *pool);
-/** Remove the locks on the paths in @a targets in @a fs.
+/** Remove the locks on the paths in @a unlock_targets in @a fs.
*
* The paths to be unlocked are passed as <tt>const char *</tt> keys
- * of the @a targets hash with the corresponding lock tokens as
+ * of the @a unlock_targets hash with the corresponding lock tokens as
* <tt>const char *</tt> values. If the token doesn't point to a
* lock, yield an #SVN_ERR_FS_BAD_LOCK_TOKEN error for this path. If
* the token points to an expired lock, yield an
@@ -2770,7 +2770,7 @@ svn_fs_generate_lock_token(const char **
* however, don't return error; allow the lock to be "broken" in any
* case. In the latter case, the token shall be @c NULL.
*
- * For each path in @a targets @a lock_callback will be invoked
+ * For each path in @a unlock_targets @a lock_callback will be invoked
* passing @a lock_baton and error that apply to path. The @a lock
* passed to the callback will be NULL. @a lock_callback can be NULL
* in which case it is not called.
@@ -2785,7 +2785,7 @@ svn_fs_generate_lock_token(const char **
*/
svn_error_t *
svn_fs_unlock_many(svn_fs_t *fs,
- apr_hash_t *targets,
+ apr_hash_t *unlock_targets,
svn_boolean_t break_lock,
svn_fs_lock_callback_t lock_callback,
void *lock_baton,
Modified: subversion/branches/1.9.x/subversion/include/svn_repos.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_repos.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_repos.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_repos.h Sat Feb 28
10:37:27 2015
@@ -1522,7 +1522,8 @@ svn_repos_replay(svn_fs_root_t *root,
* If @a commit_callback is non-NULL, then before @c close_edit returns (but
* after the commit has succeeded) @c close_edit will invoke
* @a commit_callback with a filled-in #svn_commit_info_t *, @a commit_baton,
- * and @a pool or some subpool thereof as arguments. If @a commit_callback
+ * and @a pool or some subpool thereof as arguments. The @c repos_root field
+ * of the #svn_commit_info_t is null. If @a commit_callback
* returns an error, that error will be returned from @c close_edit,
* otherwise if there was a post-commit hook failure, then that error
* will be returned with code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED.
@@ -1534,7 +1535,7 @@ svn_repos_replay(svn_fs_root_t *root,
* NULL). Callers who supply their own transactions are responsible
* for cleaning them up (either by committing them, or aborting them).
*
- * @since New in 1.5.
+ * @since New in 1.5. Since 1.6, @a commit_callback can be null.
*
* @note Yes, @a repos_url_decoded is a <em>decoded</em> URL. We realize
* that's sorta wonky. Sorry about that.
@@ -2272,7 +2273,7 @@ svn_repos_fs_begin_txn_for_update(svn_fs
*/
svn_error_t *
svn_repos_fs_lock_many(svn_repos_t *repos,
- apr_hash_t *targets,
+ apr_hash_t *lock_targets,
const char *comment,
svn_boolean_t is_dav_comment,
apr_time_t expiration_date,
@@ -2324,7 +2325,7 @@ svn_repos_fs_lock(svn_lock_t **lock,
*/
svn_error_t *
svn_repos_fs_unlock_many(svn_repos_t *repos,
- apr_hash_t *targets,
+ apr_hash_t *unlock_targets,
svn_boolean_t break_lock,
svn_fs_lock_callback_t lock_callback,
void *lock_baton,
Modified: subversion/branches/1.9.x/subversion/include/svn_version.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_version.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_version.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_version.h Sat Feb 28
10:37:27 2015
@@ -61,7 +61,7 @@ extern "C" {
* Modify when new functionality is added or new interfaces are
* defined, but all changes are backward compatible.
*/
-#define SVN_VER_MINOR 9
+#define SVN_VER_MINOR 10
/**
* Patch number.
Modified: subversion/branches/1.9.x/subversion/include/svn_wc.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_wc.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_wc.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_wc.h Sat Feb 28 10:37:27
2015
@@ -3835,6 +3835,13 @@ typedef struct svn_wc_status3_t
* @since New in 1.8. */
svn_boolean_t file_external;
+
+ /** The actual kind of the node in the working copy. May differ from kind
+ * on obstructions, deletes, etc. svn_node_unknown if unavailable.
+ *
+ * @since New in 1.9 */
+ svn_node_kind_t actual_kind;
+
/* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */
} svn_wc_status3_t;
Modified: subversion/branches/1.9.x/subversion/libsvn_client/add.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_client/add.c?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_client/add.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_client/add.c Sat Feb 28
10:37:27 2015
@@ -768,59 +768,6 @@ svn_client__get_all_auto_props(apr_hash_
return SVN_NO_ERROR;
}
-svn_error_t *svn_client__get_inherited_ignores(apr_array_header_t **ignores,
- const char *path_or_url,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- svn_opt_revision_t rev;
- apr_hash_t *explicit_ignores;
- apr_array_header_t *inherited_ignores;
- svn_boolean_t target_is_url = svn_path_is_url(path_or_url);
- svn_string_t *explicit_prop;
- int i;
-
- if (target_is_url)
- rev.kind = svn_opt_revision_head;
- else
- rev.kind = svn_opt_revision_working;
-
- SVN_ERR(svn_client_propget5(&explicit_ignores, &inherited_ignores,
- SVN_PROP_INHERITABLE_IGNORES, path_or_url,
- &rev, &rev, NULL, svn_depth_empty, NULL, ctx,
- scratch_pool, scratch_pool));
-
- explicit_prop = svn_hash_gets(explicit_ignores, path_or_url);
-
- if (explicit_prop)
- {
- svn_prop_inherited_item_t *new_iprop =
- apr_palloc(scratch_pool, sizeof(*new_iprop));
- new_iprop->path_or_url = path_or_url;
- new_iprop->prop_hash = apr_hash_make(scratch_pool);
- svn_hash_sets(new_iprop->prop_hash, SVN_PROP_INHERITABLE_IGNORES,
- explicit_prop);
- APR_ARRAY_PUSH(inherited_ignores,
- svn_prop_inherited_item_t *) = new_iprop;
- }
-
- *ignores = apr_array_make(result_pool, 16, sizeof(const char *));
-
- for (i = 0; i < inherited_ignores->nelts; i++)
- {
- svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
- inherited_ignores, i, svn_prop_inherited_item_t *);
- svn_string_t *ignore_val = svn_hash_gets(elt->prop_hash,
- SVN_PROP_INHERITABLE_IGNORES);
- if (ignore_val)
- svn_cstring_split_append(*ignores, ignore_val->data, "\n\r\t\v ",
- FALSE, result_pool);
- }
-
- return SVN_NO_ERROR;
-}
-
/* The main logic of the public svn_client_add5.
*
* EXISTING_PARENT_ABSPATH is the absolute path to the first existing
Modified: subversion/branches/1.9.x/subversion/libsvn_client/blame.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_client/blame.c?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_client/blame.c Sat Feb 28
10:37:27 2015
@@ -34,6 +34,7 @@
#include "svn_dirent_uri.h"
#include "svn_path.h"
#include "svn_props.h"
+#include "svn_hash.h"
#include "svn_sorts.h"
#include "private/svn_wc_private.h"
@@ -76,6 +77,7 @@ struct diff_baton {
/* The baton used for a file revision. Lives the entire operation */
struct file_rev_baton {
svn_revnum_t start_rev, end_rev;
+ svn_boolean_t backwards;
const char *target;
svn_client_ctx_t *ctx;
const svn_diff_file_options_t *diff_options;
@@ -96,6 +98,14 @@ struct file_rev_baton {
/* pools for files which may need to persist for more than one rev. */
apr_pool_t *filepool;
apr_pool_t *prevfilepool;
+
+ svn_boolean_t check_mime_type;
+
+ /* When blaming backwards we have to use the changes
+ on the *next* revision, as the interesting change
+ happens when we move to the previous revision */
+ svn_revnum_t last_revnum;
+ apr_hash_t *last_props;
};
/* The baton used by the txdelta window handler. Allocated per revision */
@@ -431,6 +441,26 @@ file_rev_handler(void *baton, const char
/* Clear the current pool. */
svn_pool_clear(frb->currpool);
+ if (frb->check_mime_type)
+ {
+ apr_hash_t *props = svn_prop_array_to_hash(prop_diffs, frb->currpool);
+ const char *value;
+
+ frb->check_mime_type = FALSE; /* Only check first */
+
+ value = svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
+
+ if (value && svn_mime_type_is_binary(value))
+ {
+ return svn_error_createf(
+ SVN_ERR_CLIENT_IS_BINARY_FILE, NULL,
+ _("Cannot calculate blame information for binary file '%s'"),
+ (svn_path_is_url(frb->target)
+ ? frb->target
+ : svn_dirent_local_style(frb->target, pool)));
+ }
+ }
+
if (frb->ctx->notify_func2)
{
svn_wc_notify_t *notify
@@ -489,18 +519,24 @@ file_rev_handler(void *baton, const char
/* Create the rev structure. */
delta_baton->rev = apr_pcalloc(frb->mainpool, sizeof(struct rev));
- if (revnum < MIN(frb->start_rev, frb->end_rev))
+ if (frb->backwards)
{
- /* We shouldn't get more than one revision before the starting
- revision (unless of including merged revisions). */
- SVN_ERR_ASSERT((frb->last_filename == NULL)
- || frb->include_merged_revisions);
+ /* Use from last round...
+ SVN_INVALID_REVNUM on first, which is exactly
+ what we want */
+ delta_baton->rev->revision = frb->last_revnum;
+ delta_baton->rev->rev_props = frb->last_props;
- /* The file existed before start_rev; generate no blame info for
- lines from this revision (or before). */
- delta_baton->rev->revision = SVN_INVALID_REVNUM;
+ /* Store for next delta */
+ if (revnum >= MIN(frb->start_rev, frb->end_rev))
+ {
+ frb->last_revnum = revnum;
+ frb->last_props = svn_prop_hash_dup(rev_props, frb->mainpool);
+ }
+ /* Else: Not needed on last rev */
}
- else
+ else if (merged_revision
+ || (revnum >= MIN(frb->start_rev, frb->end_rev)))
{
/* 1+ for the "youngest to oldest" blame */
SVN_ERR_ASSERT(revnum <= 1 + MAX(frb->end_rev, frb->start_rev));
@@ -509,6 +545,20 @@ file_rev_handler(void *baton, const char
delta_baton->rev->revision = revnum;
delta_baton->rev->rev_props = svn_prop_hash_dup(rev_props,
frb->mainpool);
}
+ else
+ {
+ /* We shouldn't get more than one revision outside the
+ specified range (unless we alsoe receive merged revisions) */
+ SVN_ERR_ASSERT((frb->last_filename == NULL)
+ || frb->include_merged_revisions);
+
+ /* The file existed before start_rev; generate no blame info for
+ lines from this revision (or before).
+
+ This revision specifies the state as it was at the start revision */
+
+ delta_baton->rev->revision = SVN_INVALID_REVNUM;
+ }
if (frb->include_merged_revisions)
delta_baton->rev->path = apr_pstrdup(frb->mainpool, path);
@@ -626,7 +676,6 @@ svn_client_blame5(const char *target,
svn_stream_t *last_stream;
svn_stream_t *stream;
const char *target_abspath_or_url;
- svn_revnum_t youngest;
if (start->kind == svn_opt_revision_unspecified
|| end->kind == svn_opt_revision_unspecified)
@@ -669,28 +718,47 @@ svn_client_blame5(const char *target,
/* We check the mime-type of the yougest revision before getting all
the older revisions. */
- if (!ignore_mime_type)
+ if (!ignore_mime_type
+ && start_revnum < end_revnum)
{
apr_hash_t *props;
- apr_hash_index_t *hi;
+ const char *mime_type = NULL;
+
+ if (svn_path_is_url(target)
+ || start_revnum > end_revnum
+ || (end->kind != svn_opt_revision_working
+ && end->kind != svn_opt_revision_base))
+ {
+ SVN_ERR(svn_ra_get_file(ra_session, "", end_revnum, NULL, NULL,
+ &props, pool));
- SVN_ERR(svn_client_propget5(&props, NULL, SVN_PROP_MIME_TYPE,
- target_abspath_or_url, peg_revision,
- end, NULL, svn_depth_empty, NULL, ctx,
- pool, pool));
-
- /* props could be keyed on URLs or paths depending on the
- peg_revision and end values so avoid using the key. */
- hi = apr_hash_first(pool, props);
- if (hi)
+ mime_type = svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
+ }
+ else
{
- svn_string_t *value;
+ const svn_string_t *value;
+
+ if (end->kind == svn_opt_revision_working)
+ SVN_ERR(svn_wc_prop_get2(&value, ctx->wc_ctx,
+ target_abspath_or_url,
+ SVN_PROP_MIME_TYPE,
+ pool, pool));
+ else
+ {
+ SVN_ERR(svn_wc_get_pristine_props(&props, ctx->wc_ctx,
+ target_abspath_or_url,
+ pool, pool));
+
+ value = props ? svn_hash_gets(props, SVN_PROP_MIME_TYPE)
+ : NULL;
+ }
- /* Should only be one value */
- SVN_ERR_ASSERT(apr_hash_count(props) == 1);
+ mime_type = value ? value->data : NULL;
+ }
- value = apr_hash_this_val(hi);
- if (value && svn_mime_type_is_binary(value->data))
+ if (mime_type)
+ {
+ if (svn_mime_type_is_binary(mime_type))
return svn_error_createf
(SVN_ERR_CLIENT_IS_BINARY_FILE, 0,
_("Cannot calculate blame information for binary file '%s'"),
@@ -719,6 +787,10 @@ svn_client_blame5(const char *target,
frb.merged_chain->avail = NULL;
frb.merged_chain->pool = pool;
}
+ frb.backwards = (frb.start_rev > frb.end_rev);
+ frb.last_revnum = SVN_INVALID_REVNUM;
+ frb.last_props = NULL;
+ frb.check_mime_type = (frb.backwards && !ignore_mime_type);
SVN_ERR(svn_ra_get_repos_root2(ra_session, &frb.repos_root_url, pool));
@@ -738,12 +810,11 @@ svn_client_blame5(const char *target,
We need to ensure that we get one revision before the start_rev,
if available so that we can know what was actually changed in the start
revision. */
- SVN_ERR(svn_ra_get_latest_revnum(ra_session, &youngest, frb.currpool));
SVN_ERR(svn_ra_get_file_revs2(ra_session, "",
- start_revnum
- - (0 < start_revnum && start_revnum <=
end_revnum ? 1 : 0)
- + (youngest > start_revnum && start_revnum >
end_revnum ? 1 : 0),
- end_revnum, include_merged_revisions,
+ frb.backwards ? start_revnum
+ : MAX(0, start_revnum-1),
+ end_revnum,
+ include_merged_revisions,
file_rev_handler, &frb, pool));
if (end->kind == svn_opt_revision_working)
Modified: subversion/branches/1.9.x/subversion/libsvn_client/client.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_client/client.h?rev=1662916&r1=1662915&r2=1662916&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_client/client.h (original)
+++ subversion/branches/1.9.x/subversion/libsvn_client/client.h Sat Feb 28
10:37:27 2015
@@ -455,17 +455,6 @@ svn_error_t *svn_client__get_all_auto_pr
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Get a list of ignore patterns defined by the svn:global-ignores
- properties set on, or inherited by, PATH_OR_URL. Store the collected
- patterns as const char * elements in the array *IGNORES. Allocate
- *IGNORES and its contents in RESULT_POOL. Use SCRATCH_POOL for
- temporary allocations. */
-svn_error_t *svn_client__get_inherited_ignores(apr_array_header_t **ignores,
- const char *path_or_url,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
/* The main logic for client deletion from a working copy. Deletes PATH
from CTX->WC_CTX. If PATH (or any item below a directory PATH) is
modified the delete will fail and return an error unless FORCE or KEEP_LOCAL
@@ -959,11 +948,6 @@ svn_client__get_copy_committables(svn_cl
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* A qsort()-compatible sort routine for sorting an array of
- svn_client_commit_item_t *'s by their URL member. */
-int svn_client__sort_commit_item_urls(const void *a, const void *b);
-
-
/* Rewrite the COMMIT_ITEMS array to be sorted by URL. Also, discover
a common *BASE_URL for the items in the array, and rewrite those
items' URLs to be relative to that *BASE_URL.