You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/10/02 11:47:26 UTC
svn commit: r1392818 [1/2] - in /subversion/branches/1.7.x-issue4153: ./
build/ build/generator/ build/generator/templates/
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/tests...
Author: rhuijben
Date: Tue Oct 2 09:47:23 2012
New Revision: 1392818
URL: http://svn.apache.org/viewvc?rev=1392818&view=rev
Log:
On the 1.7.x-issue4153 branch: Sync with ^/subversion/branches/1.7.x@1392816
Modified:
subversion/branches/1.7.x-issue4153/ (props changed)
subversion/branches/1.7.x-issue4153/CHANGES (contents, props changed)
subversion/branches/1.7.x-issue4153/STATUS
subversion/branches/1.7.x-issue4153/build.conf
subversion/branches/1.7.x-issue4153/build/generator/gen_make.py
subversion/branches/1.7.x-issue4153/build/generator/templates/makefile.ezt
subversion/branches/1.7.x-issue4153/build/run_tests.py
subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/native/Targets.cpp
subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java
subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
subversion/branches/1.7.x-issue4153/subversion/bindings/swig/perl/native/Makefile.PL.in
subversion/branches/1.7.x-issue4153/subversion/include/private/svn_wc_private.h
subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h
subversion/branches/1.7.x-issue4153/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/cleanup.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/deprecated.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/info.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/diff_file.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/parse-diff.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/lock.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_ra/ra_loader.h
subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/options.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/serf.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/util.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/xml.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/replay.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/auth.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/cache-memcache.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/dirent_uri.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/opt.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/sqlite.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/adm_ops.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/lock.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/merge.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/node.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/props.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/status.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/tree_conflicts.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/upgrade.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/wc-queries.sql
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/wc_db.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/wc_db.h
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/wc_db_util.c
subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/wc_db_wcroot.c
subversion/branches/1.7.x-issue4153/subversion/mod_authz_svn/mod_authz_svn.c
subversion/branches/1.7.x-issue4153/subversion/mod_dav_svn/repos.c
subversion/branches/1.7.x-issue4153/subversion/po/zh_CN.po
subversion/branches/1.7.x-issue4153/subversion/svn/main.c
subversion/branches/1.7.x-issue4153/subversion/svn/propget-cmd.c
subversion/branches/1.7.x-issue4153/subversion/svn/props.c
subversion/branches/1.7.x-issue4153/subversion/svndumpfilter/main.c
subversion/branches/1.7.x-issue4153/subversion/svnlook/main.c
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/README
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/depth_tests.py
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/patch_tests.py
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/prop_tests.py
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/stat_tests.py
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/svndumpfilter_tests.py
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/svnsync_tests.py
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/svntest/sandbox.py
subversion/branches/1.7.x-issue4153/subversion/tests/libsvn_subr/dirent_uri-test.c
subversion/branches/1.7.x-issue4153/subversion/tests/libsvn_wc/op-depth-test.c
Propchange: subversion/branches/1.7.x-issue4153/
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-serf-server-root-segfaults:r1383952-1392726
Merged /subversion/branches/1.7.x-r1365554:r1365558-1367850
Merged /subversion/branches/1.7.x-r1375052:r1376643-1380970
Merged /subversion/branches/1.7.x:r1338667-1392816
Merged /subversion/branches/1.7.x-r1341012:r1341013-1355629
Merged /subversion/branches/1.7.x-r1361007:r1361110-1367853
Merged /subversion/trunk:r1174342,1293945,1293972,1293976,1293998,1294134,1294136,1294147,1294236,1294586,1307177,1337441,1338810,1339164,1340556,1341012,1341031,1341034,1341076,1342984,1345482,1346765,1348822,1349215,1349367,1349371,1349380,1349778,1351772,1352068,1353572,1354626,1354652,1354876,1354907,1355340,1361007,1361019,1361341,1362508,1365519,1365549,1365554,1365556,1365592,1367498,1368065,1368128,1368197-1368198,1371282,1374198,1374800,1374802,1375052,1375089,1376414,1378847,1380295,1380697,1383029,1383483,1387226,1387943,1389364,1389499,1389658,1389928,1390965,1391020,1391022,1391641,1391935
Merged /subversion/branches/1.7.x-r1352068:r1352087-1364232
Merged /subversion/branches/1.7.x-r1348822:r1348878-1355700
Merged /subversion/branches/1.7.x-r1383483:r1383601-1383951
Merged /subversion/branches/1.7.x-r1389928:r1390384-1391747
Merged /subversion/branches/1.7.x-r1361341:r1361342-1367855
Modified: subversion/branches/1.7.x-issue4153/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/CHANGES?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/CHANGES (original)
+++ subversion/branches/1.7.x-issue4153/CHANGES Tue Oct 2 09:47:23 2012
@@ -1,3 +1,49 @@
+Version 1.7.6
+(15 Aug 2012, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.6
+
+ User-visible changes:
+ - Client- and server-side bugfixes:
+
+ - Client-side bugfixes:
+ * Fix "svn status -u --depth empty FILE" (r1348822, r1349215)
+ * Fix example output of 'svn help status' (issue #3962)
+ * svn propset of svn:eol-style might not notice related text changes (r1353572)
+ * sort output of 'svn propget -R' (r1355699)
+ * sort output of 'svn proplist' (r1355698)
+ * sort output of 'svn status' (r1341012)
+ * avoid a filestat per working copy find operation (r1340556)
+ * optimize 'svn upgrade' performance on large working copies (r1342984)
+ * allow 'file:///C:\repos' style arguments on Windows, like 1.6 (r1346765)
+ * fix ra_serf against Subversion 1.2 servers (r1349367)
+ * fix 'svn upgrade' on working copies with certain tree conflicts (r1345482)
+ * avoid workqueue references to system temp dir (r1367854)
+ * allow non-existant canonical paths (r1367853)
+ * fix 'svn revert --depth files' to operate on files (r1365554)
+ * fix ra_serf XML namespace handling against malicious server (r1337441)
+ * fix relocate with server-relative externals (issue 4216)
+ * change two asserts into errors for TortoiseSVN (r1368128, r1368065)
+ * don't attempt to anchor an operation outside a wc root (r1361341)
+
+ - Server-side bugfixes:
+ * partial sync drops properties when converting to adds (issue #4184)
+ * replaying a copy and delete of an unreadable child fails (issue #4121)
+ * allow svnlook to operate on r0 (r1362508)
+ * make FSFS revision files independent of APR hash order (r1367498)
+
+ - Other tool improvements and bugfixes:
+ * move mod_dontdothat to install-tools (r1307177)
+
+ Developer-visible changes:
+ - General:
+ * fix running tests against httpd 2.4 (r1291594)
+ * use constant struct initialisers for C89 compatibility (r1352068)
+
+ - Bindings:
+ * JavaHL: Don't assert on some invalid input (r1354626, r1354652)
+ * JavaHL: Add missing new in 1.7 notifications (r1351772)
+
+
Version 1.7.5
(17 May 2012, from /branches/1.7.x)
http://svn.apache.org/repos/asf/subversion/tags/1.7.5
Propchange: subversion/branches/1.7.x-issue4153/CHANGES
------------------------------------------------------------------------------
Merged /subversion/trunk/CHANGES:r1336830-1370776
Merged /subversion/branches/1.7.x/CHANGES:r1338667-1392816
Modified: subversion/branches/1.7.x-issue4153/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/STATUS?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/STATUS (original)
+++ subversion/branches/1.7.x-issue4153/STATUS Tue Oct 2 09:47:23 2012
@@ -10,45 +10,89 @@ See http://subversion.apache.org/docs/co
for details on how release lines and voting work, what kinds of bugs can
delay a release, etc.
-Status of 1.7.6:
+Status of 1.7.7:
Candidate changes:
==================
- * r1293945, r1293972, r1293976, r1293998, r1294136, r1294236;
- r1294134, r1294147, r1294586
- Two interdependent changes:
- Fix issue #4121: copy followed by delete of unreadable child.
- Fix svn:// authz in Python tests.
+ * r1242759, r1242770, r1242794, r1380175, r1392599
+ Fix various issues with GNOME and KDE keyring providers, especially
+ as regards how their interact with --non-interactive mode. Fixes
+ issues #4110 ("kwallet not used with --non-interactive") and #4112
+ ("gnome keyring --non-interactive fail with password on disk").
Justification:
- User resorted to patching the commit editor to work around this.
- Tests are broken.
+ Fixes user-reported problem which significantly limits
+ usabilility in certain environments.
+ Branch:
+ ^/subversion/branches/1.7.x-r1242759
+ Votes:
+ +1: philip (without r1392599), cmpilato (without r1392599), breser
+
+ * r1306275, and too many other revisions to list here
+ New diff support code for added/deleted files and directories.
+ Fixes issue #4153, "svn log --diff" on moved file gives "not found",
+ and other problems.
+ Justification:
+ The current code (introduced in 1.7.x in the r1207351 backport commit)
+ produces inconsistent paths in diff output (see
+ http://svn.haxx.se/dev/archive-2012-03/0385.shtml), and it also breaks
+ with the paradigm that the target of an editor drive may never have more
+ than one path component (which according to cmpilato is an API violation).
Notes:
- r1293945,r1293972,r1293976 are cosmetics.
- r1293998 is the fix.
- r1294136 is a test.
- r1294236 fixes an uninitialized variable.
+ Please read the branch and related trunk log messages for detailed notes
+ about these changes.
+ Branch:
+ ^/subversion/branches/1.7.x-issue4153
+ Votes:
+ +1: stsp
+
+ * ^/subversion/branches/1.7.x-commit-performance
+ r1337118, r1337281, r1337374, r1337377, r1337392, r1337394, r1337485
+ Use the working copy status walker as a first filter to find committable
+ nodes.
+ Justification:
+ Huge performance boost. Especially on NFS.
Notes:
- r1294134 extends a test to demonstrate its brokenness.
- r1294147 fixes said brokenness.
- r1294586 fixes r1294147 for Windows.
+ Backports the status walker framework. Many other parts are backportable
+ too, but this branch delivers the plumbing.
+ [JAF] We might want to include some of the subsequent updates to this
+ code, such as: r1337403, r1337475, r1337736, r1338059, r1338338.
Votes:
- +1: danielsh, stsp
+ +0: rhuijben (I would like to see some test results before backporting)
- * r1307177
- Move mod_dontdothat to install-tools.
+ * r1341060
+ Sort output of 'svn import'
+ Notes: Needs a backport branch, noted here for completeness.
+ Votes:
+ +0: stsp (pending a proper conflict-free backport)
+ -0: julianfoad (Nice behaviour enhancement but what's the justification
+ for back-porting this on its own without similar for other
+ commands? The log msg says it was done to maintain stable output
+ with APR 1.4.6 random hash order, but it wasn't stable before
+ that because the order the directory entries were read into the
+ hash, and so the order of multiple keys in one bucket, was not
+ controlled.)
+
+ * r1389851
+ Fix commit from multiple working copies nested within a parent WC.
Justification:
- Undo compatibility break of 'make install' in 1.7.3.
+ Prevents error when trying commit from multiple nested WCs.
+ Fixes a test failure on 1.7.x when run within a format 30 WC.
+ Branch:
+ ^/subversion/branches/1.7.x-r1389851
Votes:
- +1: danielsh, gstein
+ +1: stsp, breser
- * r1337441
- Fix XML namespace expansion in ra_serf
+ * r1389878
+ Fix working copy access via symlink to WC nested within a format 30 WC.
Justification:
- Avoids segfaults caused by a malicious server sending unknown prefixes
- to ra_serf. (and corrects the semantics for a bonus win)
+ Fixes two test failures on 1.7.x when run within a format 30 WC.
+ Notes:
+ Depends on r1389499 backport for passing tests.
+ Branch:
+ ^/subversion/branches/1.7.x-r1389878
Votes:
- +1: gstein, rhuijben
+ +1: stsp, breser
Veto-blocked changes:
@@ -56,3 +100,12 @@ Veto-blocked changes:
Approved changes:
=================
+
+ * r1344864, r1344865, r1344869
+ Sort list of deleted paths in dump file output. See issue #4134.
+ Justification:
+ Reproducible output with APR 1.4.6.
+ Notes:
+ Merge with --accept=tc.
+ Votes:
+ +1: stsp, cmpilato, breser
Modified: subversion/branches/1.7.x-issue4153/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/build.conf?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/build.conf (original)
+++ subversion/branches/1.7.x-issue4153/build.conf Tue Oct 2 09:47:23 2012
@@ -367,6 +367,10 @@ type = apache-mod
path = tools/server-side/mod_dontdothat
nonlibs = mod_dav_svn apr aprutil
libs = libsvn_subr xml
+# This will cause mod_dontdothat to be installed with the other apache
+# modules instead of with the tools. While this is not quite right,
+# the build generator currently cannot exclude this module from the
+# build based on its install type
install = apache-mod
msvc-libs = libhttpd.lib
Modified: subversion/branches/1.7.x-issue4153/build/generator/gen_make.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/build/generator/gen_make.py?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/build/generator/gen_make.py (original)
+++ subversion/branches/1.7.x-issue4153/build/generator/gen_make.py Tue Oct 2 09:47:23 2012
@@ -369,18 +369,21 @@ class Generator(gen_base.GeneratorBase):
# get the output files for these targets, sorted in dependency order
files = gen_base._sorted_files(self.graph, area)
- ezt_area = _eztdata(type=area, files=[ ], extra_install=None)
+ ezt_area = _eztdata(type=area, files=[ ], apache_files=[ ],
+ extra_install=None)
- if area == 'apache-mod':
- data.areas.append(ezt_area)
-
- for file in files:
+ def apache_file_to_eztdata(file):
# cd to dirname before install to work around libtool 1.4.2 bug.
dirname, fname = build_path_splitfile(file)
base, ext = os.path.splitext(fname)
name = base.replace('mod_', '')
- ezt_area.files.append(_eztdata(fullname=file, dirname=dirname,
- name=name, filename=fname))
+ return _eztdata(fullname=file, dirname=dirname,
+ name=name, filename=fname)
+ if area == 'apache-mod':
+ data.areas.append(ezt_area)
+
+ for file in files:
+ ezt_area.files.append(apache_file_to_eztdata(file))
elif area != 'test' and area != 'bdb-test':
data.areas.append(ezt_area)
@@ -390,6 +393,14 @@ class Generator(gen_base.GeneratorBase):
ezt_area.varname = area_var
ezt_area.uppervar = upper_var
+ # ### TODO: This is a hack. See discussion here:
+ # ### http://mid.gmane.org/20120316191639.GA28451@daniel3.local
+ apache_files = [t.filename for t in inst_targets
+ if isinstance(t, gen_base.TargetApacheMod)]
+
+ files = [f for f in files if f not in apache_files]
+ for file in apache_files:
+ ezt_area.apache_files.append(apache_file_to_eztdata(file))
for file in files:
# cd to dirname before install to work around libtool 1.4.2 bug.
dirname, fname = build_path_splitfile(file)
Modified: subversion/branches/1.7.x-issue4153/build/generator/templates/makefile.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/build/generator/templates/makefile.ezt?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/build/generator/templates/makefile.ezt (original)
+++ subversion/branches/1.7.x-issue4153/build/generator/templates/makefile.ezt Tue Oct 2 09:47:23 2012
@@ -126,11 +126,12 @@ $([target.varname]_OBJECTS): $([target.v
[for areas]
[is areas.type "apache-mod"]install-mods-shared:[for areas.files] [areas.files.fullname][end][for areas.files]
cd [areas.files.dirname] ; $(MKDIR) "$(APACHE_LIBEXECDIR)" ; $(INSTALL_MOD_SHARED) -n [areas.files.name] [areas.files.filename][end]
-[else]install-[areas.type]: [for areas.files][if-index areas.files first][else] [end][areas.files.fullname][end]
+[else]install-[areas.type]: [for areas.files][if-index areas.files first][else] [end][areas.files.fullname][end] [for areas.apache_files] [areas.apache_files.fullname][end]
$(MKDIR) $(DESTDIR)$([areas.varname]dir)[for areas.files][is areas.type "locale"]
$(MKDIR) [areas.files.installdir]
cd [areas.files.dirname] ; $(INSTALL_[areas.uppervar]) [areas.files.filename] [areas.files.installdir]/$(PACKAGE_NAME)[areas.files.objext][else]
- cd [areas.files.dirname] ; $(INSTALL_[areas.uppervar]) [areas.files.filename] $(DESTDIR)[areas.files.install_fname][end][end]
+ cd [areas.files.dirname] ; $(INSTALL_[areas.uppervar]) [areas.files.filename] $(DESTDIR)[areas.files.install_fname][end][end][for areas.apache_files]
+ cd [areas.apache_files.dirname] ; $(MKDIR) "$(APACHE_LIBEXECDIR)" ; $(INSTALL_MOD_SHARED) -n [areas.apache_files.name] [areas.apache_files.filename][end]
[if-any areas.extra_install] $(INSTALL_EXTRA_[areas.uppervar])
[end][end][end]
Modified: subversion/branches/1.7.x-issue4153/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/build/run_tests.py?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/build/run_tests.py (original)
+++ subversion/branches/1.7.x-issue4153/build/run_tests.py Tue Oct 2 09:47:23 2012
@@ -271,6 +271,12 @@ class TestHarness:
print("WARNING: no failures, but '%s' exists from a previous run."
% self.faillogfile)
+ # Summary.
+ if failed or xpassed or failed_list:
+ print("SUMMARY: Some tests failed.\n")
+ else:
+ print("SUMMARY: All tests successful.\n")
+
self._close_log()
return failed
Modified: subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/native/Targets.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/native/Targets.cpp?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/native/Targets.cpp (original)
+++ subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/native/Targets.cpp Tue Oct 2 09:47:23 2012
@@ -86,7 +86,7 @@ const apr_array_header_t *Targets::array
m_error_occured = err;
break;
}
- APR_ARRAY_PUSH(apr_targets, const char *) = *it;
+ APR_ARRAY_PUSH(apr_targets, const char *) = target;
}
return apr_targets;
Modified: subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java (original)
+++ subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java Tue Oct 2 09:47:23 2012
@@ -204,7 +204,12 @@ public class ConflictDescriptor
/**
* Attempting to delete object.
*/
- delete;
+ delete,
+
+ /**
+ * Attempting to replace object.
+ */
+ replace;
}
/**
@@ -240,7 +245,12 @@ public class ConflictDescriptor
/**
* Object is already added or schedule-add.
*/
- added;
+ added,
+
+ /**
+ * Object is already replaced.
+ */
+ replaced;
}
public enum Operation
Modified: subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Tue Oct 2 09:47:23 2012
@@ -1982,6 +1982,11 @@ public class BasicTests extends SVNTests
assertEquals("wrong date with getTimeMillis()",
lm[0].getDate(),
new java.util.Date(lm[0].getTimeMillis()));
+
+ // Ensure that targets get canonicalized
+ String non_canonical = thisTest.getUrl().toString() + "/";
+ LogMessage lm2[] = collectLogMessages(non_canonical, null,
+ ranges, false, true, false, 0);
}
/**
Modified: subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/1.7.x-issue4153/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java Tue Oct 2 09:47:23 2012
@@ -1963,6 +1963,11 @@ public class BasicTests extends SVNTests
assertEquals("wrong date with getTimeMillis()",
lm[0].getDate(),
new java.util.Date(lm[0].getTimeMillis()));
+
+ // Ensure that targets get canonicalized
+ String non_canonical = thisTest.getUrl().toString() + "/";
+ LogMessage lm2[] = client.logMessages(non_canonical, null,
+ null, false, true);
}
/**
Modified: subversion/branches/1.7.x-issue4153/subversion/bindings/swig/perl/native/Makefile.PL.in
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/bindings/swig/perl/native/Makefile.PL.in?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/bindings/swig/perl/native/Makefile.PL.in (original)
+++ subversion/branches/1.7.x-issue4153/subversion/bindings/swig/perl/native/Makefile.PL.in Tue Oct 2 09:47:23 2012
@@ -50,6 +50,11 @@ my $cflags = '@CFLAGS@';
my $apr_cflags = '@SVN_APR_INCLUDES@';
my $apu_cflags = '@SVN_APRUTIL_INCLUDES@';
+# Avoid this bug in SWIG:
+# https://sourceforge.net/tracker/?func=detail&aid=3571361&group_id=1645&atid=101645
+# SWIG is using C++ style comments in an extern "C" code.
+$cflags =~ s/-ansi\s+//g;
+
# According to the log of r7937, the flags guarded by the conditional break
# the build on FreeBSD if not conditionalized.
my $apr_ldflags = '@SVN_APR_LIBS@'
Modified: subversion/branches/1.7.x-issue4153/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/include/private/svn_wc_private.h?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/1.7.x-issue4153/subversion/include/private/svn_wc_private.h Tue Oct 2 09:47:23 2012
@@ -1112,6 +1112,21 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
void *cancel_baton,
apr_pool_t *scratch_pool);
+/* During an upgrade to wc-ng, supply known details about an existing
+ * external. The working copy will suck in and store the information supplied
+ * about the existing external at @a local_abspath. */
+svn_error_t *
+svn_wc__upgrade_add_external_info(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_node_kind_t kind,
+ const char *def_local_abspath,
+ const char *repos_relpath,
+ const char *repos_root_url,
+ const char *repos_uuid,
+ svn_revnum_t def_peg_revision,
+ svn_revnum_t def_revision,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h (original)
+++ subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h Tue Oct 2 09:47:23 2012
@@ -71,7 +71,7 @@ extern "C" {
*
* @since New in 1.1.
*/
-#define SVN_VER_PATCH 6
+#define SVN_VER_PATCH 7
/** @deprecated Provided for backward compatibility with the 1.0 API. */
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Tue Oct 2 09:47:23 2012
@@ -457,12 +457,14 @@ simple_gnome_keyring_save_creds(svn_bool
pool);
}
+#if GLIB_CHECK_VERSION(2,6,0)
static void
log_noop(const gchar *log_domain, GLogLevelFlags log_level,
const gchar *message, gpointer user_data)
{
/* do nothing */
}
+#endif
static void
init_gnome_keyring(void)
@@ -478,7 +480,9 @@ init_gnome_keyring(void)
suppress stderr spam for not only libgnome-keyring, but for
anything else the app is linked to that uses glib logging and
doesn't specify a log_domain. */
+#if GLIB_CHECK_VERSION(2,6,0)
g_log_set_default_handler(log_noop, NULL);
+#endif
}
static const svn_auth_provider_t gnome_keyring_simple_provider = {
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/cleanup.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/cleanup.c Tue Oct 2 09:47:23 2012
@@ -171,7 +171,12 @@ svn_client_upgrade(const char *path,
svn_wc_external_item2_t *item;
const char *external_abspath;
const char *external_path;
+ const char *repos_relpath;
+ const char *repos_root_url;
+ const char *repos_uuid;
svn_node_kind_t kind;
+ svn_revnum_t peg_revision;
+ svn_revnum_t revision;
svn_error_t *err;
item = APR_ARRAY_IDX(externals_p, i, svn_wc_external_item2_t*);
@@ -180,8 +185,10 @@ svn_client_upgrade(const char *path,
external_path = svn_dirent_join(externals_parent, item->target_dir,
iterpool2);
- SVN_ERR(svn_dirent_get_absolute(&external_abspath, external_path,
- iterpool2));
+ err = svn_dirent_get_absolute(&external_abspath, external_path,
+ iterpool2);
+ if (err)
+ goto handle_error;
/* This is hack. We can only send dirs to svn_wc_upgrade(). This
way we will get an exception saying that the wc must be
@@ -195,10 +202,106 @@ svn_client_upgrade(const char *path,
{
svn_error_clear(err);
- SVN_ERR(svn_client_upgrade(external_abspath, ctx, iterpool2));
+ err = svn_client_upgrade(external_abspath, ctx, iterpool2);
+ }
+
+ if (err)
+ goto handle_error;
+
+ /* The upgrade of any dir should be done now, get the (supposedly
+ * now reliable) kind. */
+ err = svn_wc_read_kind(&kind, ctx->wc_ctx, external_abspath,
+ FALSE, iterpool2);
+ if (err)
+ goto handle_error;
+
+ /* Update the EXTERNALS table according to the root URL,
+ * relpath and uuid known in the upgraded external WC. */
+
+ /* We should probably have a function that provides all three
+ * of root URL, repos relpath and uuid at once, but here goes... */
+
+ /* First get the relpath, as that returns SVN_ERR_WC_PATH_NOT_FOUND
+ * when the node is not present in the file system.
+ * (svn_wc__node_get_repos_info() would try to derive the URL). */
+ err = svn_wc__node_get_repos_relpath(&repos_relpath,
+ ctx->wc_ctx,
+ external_abspath,
+ iterpool2, iterpool2);
+ if (! err)
+ {
+ /* We got a repos relpath from a WC. So also get the root. */
+ err = svn_wc__node_get_repos_info(&repos_root_url,
+ &repos_uuid,
+ ctx->wc_ctx,
+ external_abspath,
+ iterpool2, iterpool2);
+ }
+ else if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ /* The external is not currently checked out. Try to figure out
+ * the URL parts via the defined URL and fetch_repos_info(). */
+ svn_error_clear(err);
+
+ /* The repos root / uuid from above get_repos_info() call, if it
+ * was successful, has returned the URL as derived from the WC's
+ * parent path, which is not what we want for the external. Only
+ * makes sense for added/deleted/not-present files. So make sure
+ * those values are not used. */
+ repos_root_url = NULL;
+ repos_relpath = NULL;
+
+ err = fetch_repos_info(&repos_root_url,
+ &repos_uuid,
+ &info_baton,
+ item->url,
+ scratch_pool, scratch_pool);
+ if (err)
+ goto handle_error;
+
+
+ repos_relpath = svn_uri_skip_ancestor(repos_root_url, item->url,
+ iterpool2);
+
+ /* There's just this URL, no idea what kind it is. */
+ kind = svn_node_unknown;
+ }
+
+ if (err)
+ goto handle_error;
+
+ peg_revision = (item->peg_revision.kind == svn_opt_revision_number
+ ? item->peg_revision.value.number
+ : SVN_INVALID_REVNUM);
+
+ revision = (item->revision.kind == svn_opt_revision_number
+ ? item->revision.value.number
+ : SVN_INVALID_REVNUM);
+
+ err = svn_wc__upgrade_add_external_info(ctx->wc_ctx,
+ external_abspath,
+ kind,
+ externals_parent,
+ repos_relpath,
+ repos_root_url,
+ repos_uuid,
+ peg_revision,
+ revision,
+ iterpool2);
+handle_error:
+ if (err)
+ {
+ svn_wc_notify_t *notify =
+ svn_wc_create_notify(external_abspath,
+ svn_wc_notify_failed_external,
+ scratch_pool);
+ notify->err = err;
+
+ ctx->notify_func2(ctx->notify_baton2,
+ notify, scratch_pool);
+
+ svn_error_clear(err);
}
- else
- SVN_ERR(err);
}
}
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/deprecated.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/deprecated.c Tue Oct 2 09:47:23 2012
@@ -1551,7 +1551,9 @@ svn_client_propset3(svn_commit_info_t **
{
if (svn_path_is_url(target))
{
- struct capture_baton_t cb = { commit_info_p, pool };
+ struct capture_baton_t cb;
+ cb.info = commit_info_p;
+ cb.pool = pool;
SVN_ERR(svn_client_propset_remote(propname, propval, target, skip_checks,
base_revision_for_url, revprop_table,
@@ -1864,8 +1866,10 @@ svn_client_status4(svn_revnum_t *result_
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- struct status4_wrapper_baton swb = { ctx->wc_ctx, status_func,
- status_baton };
+ struct status4_wrapper_baton swb;
+ swb.wc_ctx = ctx->wc_ctx;
+ swb.old_func = status_func;
+ swb.old_baton = status_baton;
return svn_client_status5(result_rev, ctx, path, revision, depth, get_all,
update, no_ignore, ignore_externals, TRUE,
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c Tue Oct 2 09:47:23 2012
@@ -1018,6 +1018,9 @@ diff_content_changed(const char *path,
tmpfile1, tmpfile2,
&exitcode, diff_cmd_baton->outfile, errfile,
diff_cmd_baton->diff_cmd, subpool));
+
+ /* We have a printed a diff for this path, mark it as visited. */
+ mark_path_as_visited(diff_cmd_baton, path);
}
else /* use libsvn_diff to generate the diff */
{
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c Tue Oct 2 09:47:23 2012
@@ -180,31 +180,45 @@ switch_dir_external(const char *local_ab
return SVN_NO_ERROR;
}
+ /* We'd really prefer not to have to do a brute-force
+ relegation -- blowing away the current external working
+ copy and checking it out anew -- so we'll first see if we
+ can get away with a generally cheaper relocation (if
+ required) and switch-style update.
+
+ To do so, we need to know the repository root URL of the
+ external working copy as it currently sits. */
SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url, &repos_uuid,
ctx->wc_ctx, local_abspath,
pool, subpool));
if (repos_root_url)
{
- /* URLs don't match. Try to relocate (if necessary) and then
- switch. */
+ /* If the new external target URL is not obviously a
+ child of the external working copy's current
+ repository root URL... */
if (! svn_uri__is_ancestor(repos_root_url, url))
{
const char *repos_root;
svn_ra_session_t *ra_session;
- /* Get the repos root of the new URL. */
- SVN_ERR(svn_client__open_ra_session_internal
- (&ra_session, NULL, url, NULL, NULL,
- FALSE, TRUE, ctx, subpool));
+ /* ... then figure out precisely which repository
+ root URL that target URL *is* a child of ... */
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session,
+ NULL, url, NULL,
+ NULL, FALSE,
+ TRUE, ctx,
+ subpool));
SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root,
subpool));
+ /* ... and use that to try to relocate the external
+ working copy to the target location. */
err = svn_client_relocate2(local_abspath, repos_root_url,
- repos_root,
- FALSE, ctx, subpool);
- /* If the relocation failed because the new URL points
- to another repository, then we need to relegate and
- check out a new WC. */
+ repos_root, FALSE, ctx, subpool);
+
+ /* If the relocation failed because the new URL
+ points to a totally different repository, we've
+ no choice but to relegate and check out a new WC. */
if (err
&& (err->apr_err == SVN_ERR_WC_INVALID_RELOCATION
|| (err->apr_err
@@ -215,6 +229,10 @@ switch_dir_external(const char *local_ab
}
else if (err)
return svn_error_trace(err);
+
+ /* If the relocation went without a hitch, we should
+ have a new repository root URL. */
+ repos_root_url = repos_root;
}
SVN_ERR(svn_client__switch_internal(NULL, local_abspath, url,
@@ -453,7 +471,8 @@ switch_file_external(const char *local_a
peg_revision, revision,
ctx, subpool));
- SVN_ERR(svn_ra_reparent(ra_session, url, subpool));
+ SVN_ERR(svn_ra_reparent(ra_session, svn_uri_dirname(url, subpool),
+ subpool));
SVN_ERR(svn_ra_get_uuid2(ra_session, &repos_uuid, subpool));
SVN_ERR(svn_wc__get_file_external_editor(&switch_editor, &switch_baton,
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/info.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/info.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/info.c Tue Oct 2 09:47:23 2012
@@ -293,7 +293,9 @@ svn_client_info3(const char *abspath_or_
|| peg_revision->kind == svn_opt_revision_unspecified))
{
/* Do all digging in the working copy. */
- wc_info_receiver_baton_t b = { receiver, receiver_baton };
+ wc_info_receiver_baton_t b;
+ b.client_receiver_func = receiver;
+ b.client_receiver_baton = receiver_baton;
return svn_error_trace(
svn_wc__get_info(ctx->wc_ctx, abspath_or_url, depth,
fetch_excluded, fetch_actual_only, changelists,
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c Tue Oct 2 09:47:23 2012
@@ -299,7 +299,12 @@ svn_client_status5(svn_revnum_t *result_
target_basename = svn_dirent_basename(target_abspath, NULL);
dir = svn_dirent_dirname(path, pool);
- if (kind != svn_node_file)
+ if (kind == svn_node_file)
+ {
+ if (depth == svn_depth_empty)
+ depth = svn_depth_files;
+ }
+ else
{
err = svn_wc_read_kind(&kind, ctx->wc_ctx, dir_abspath, FALSE,
pool);
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c Tue Oct 2 09:47:23 2012
@@ -213,6 +213,9 @@ update_internal(svn_revnum_t *result_rev
SVN_CONFIG_CATEGORY_CONFIG,
APR_HASH_KEY_STRING) : NULL;
+ if (result_rev)
+ *result_rev = SVN_INVALID_REVNUM;
+
/* An unknown depth can't be sticky. */
if (depth == svn_depth_unknown)
depth_is_sticky = FALSE;
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/diff_file.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/diff_file.c Tue Oct 2 09:47:23 2012
@@ -1168,10 +1168,13 @@ svn_diff_file_options_parse(svn_diff_fil
apr_pool_t *pool)
{
apr_getopt_t *os;
- struct opt_parsing_error_baton_t opt_parsing_error_baton = { NULL, pool };
+ struct opt_parsing_error_baton_t opt_parsing_error_baton;
/* Make room for each option (starting at index 1) plus trailing NULL. */
const char **argv = apr_palloc(pool, sizeof(char*) * (args->nelts + 2));
+ opt_parsing_error_baton.err = NULL;
+ opt_parsing_error_baton.pool = pool;
+
argv[0] = "";
memcpy((void *) (argv + 1), args->elts, sizeof(char*) * args->nelts);
argv[args->nelts + 1] = NULL;
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/parse-diff.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_diff/parse-diff.c Tue Oct 2 09:47:23 2012
@@ -1377,8 +1377,7 @@ svn_diff_parse_next_patch(svn_patch_t **
/* Run the state machine. */
for (i = 0; i < (sizeof(transitions) / sizeof(transitions[0])); i++)
{
- if (line->len > strlen(transitions[i].expected_input)
- && starts_with(line->data, transitions[i].expected_input)
+ if (starts_with(line->data, transitions[i].expected_input)
&& state == transitions[i].required_state)
{
SVN_ERR(transitions[i].fn(&state, line->data, *patch,
@@ -1395,19 +1394,24 @@ svn_diff_parse_next_patch(svn_patch_t **
}
else if (state == state_git_tree_seen && line_after_tree_header_read)
{
- /* We have a valid diff header for a patch with only tree changes.
- * Rewind to the start of the line just read, so subsequent calls
- * to this function don't end up skipping the line -- it may
- * contain a patch. */
- SVN_ERR(svn_io_file_seek(patch_file->apr_file, APR_SET, &last_line,
- scratch_pool));
- break;
+ /* git patches can contain an index line after the file mode line */
+ if (!starts_with(line->data, "index "))
+ {
+ /* We have a valid diff header for a patch with only tree changes.
+ * Rewind to the start of the line just read, so subsequent calls
+ * to this function don't end up skipping the line -- it may
+ * contain a patch. */
+ SVN_ERR(svn_io_file_seek(patch_file->apr_file, APR_SET, &last_line,
+ scratch_pool));
+ break;
+ }
}
else if (state == state_git_tree_seen)
{
line_after_tree_header_read = TRUE;
}
- else if (! valid_header_line && state != state_start)
+ else if (! valid_header_line && state != state_start
+ && !starts_with(line->data, "index "))
{
/* We've encountered an invalid diff header.
*
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/fs_fs.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/fs_fs.c Tue Oct 2 09:47:23 2012
@@ -3382,7 +3382,9 @@ set_cached_window(svn_txdelta_window_t *
if (rs->window_cache)
{
/* store the window and the first offset _past_ it */
- svn_fs_fs__txdelta_cached_window_t cached_window = { window, rs->off };
+ svn_fs_fs__txdelta_cached_window_t cached_window;
+ cached_window.window = window;
+ cached_window.end_offset = rs->off;
/* but key it with the start offset because that is the known state
* when we will look it up */
@@ -5254,7 +5256,9 @@ svn_fs_fs__set_entry(svn_fs_t *fs,
/* build parameters: (name, new entry) pair */
const char *key =
svn_fs_fs__id_unparse(parent_noderev->id, subpool)->data;
- replace_baton_t baton = {name, NULL};
+ replace_baton_t baton;
+ baton.name = name;
+ baton.new_entry = NULL;
if (id)
{
@@ -5988,16 +5992,23 @@ write_final_rev(const svn_fs_id_t **new_
{
apr_pool_t *subpool;
apr_hash_t *entries, *str_entries;
- apr_hash_index_t *hi;
+ apr_array_header_t *sorted_entries;
+ int i;
/* This is a directory. Write out all the children first. */
subpool = svn_pool_create(pool);
SVN_ERR(svn_fs_fs__rep_contents_dir(&entries, fs, noderev, pool));
-
- for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
+ /* For the sake of the repository administrator sort the entries
+ so that the final file is deterministic and repeatable,
+ however the rest of the FSFS code doesn't require any
+ particular order here. */
+ sorted_entries = svn_sort__hash(entries, svn_sort_compare_items_lexically,
+ pool);
+ for (i = 0; i < sorted_entries->nelts; ++i)
{
- svn_fs_dirent_t *dirent = svn__apr_hash_index_val(hi);
+ svn_fs_dirent_t *dirent = APR_ARRAY_IDX(sorted_entries, i,
+ svn_sort__item_t).value;
svn_pool_clear(subpool);
SVN_ERR(write_final_rev(&new_id, file, rev, fs, dirent->id,
@@ -6136,19 +6147,25 @@ write_final_changed_path_info(apr_off_t
{
apr_hash_t *changed_paths;
apr_off_t offset;
- apr_hash_index_t *hi;
apr_pool_t *iterpool = svn_pool_create(pool);
fs_fs_data_t *ffd = fs->fsap_data;
svn_boolean_t include_node_kinds =
ffd->format >= SVN_FS_FS__MIN_KIND_IN_CHANGED_FORMAT;
+ apr_array_header_t *sorted_changed_paths;
+ int i;
SVN_ERR(get_file_offset(&offset, file, pool));
SVN_ERR(svn_fs_fs__txn_changes_fetch(&changed_paths, fs, txn_id, pool));
+ /* For the sake of the repository administrator sort the changes so
+ that the final file is deterministic and repeatable, however the
+ rest of the FSFS code doesn't require any particular order here. */
+ sorted_changed_paths = svn_sort__hash(changed_paths,
+ svn_sort_compare_items_lexically, pool);
/* Iterate through the changed paths one at a time, and convert the
temporary node-id into a permanent one for each change entry. */
- for (hi = apr_hash_first(pool, changed_paths); hi; hi = apr_hash_next(hi))
+ for (i = 0; i < sorted_changed_paths->nelts; ++i)
{
node_revision_t *noderev;
const svn_fs_id_t *id;
@@ -6157,8 +6174,8 @@ write_final_changed_path_info(apr_off_t
svn_pool_clear(iterpool);
- change = svn__apr_hash_index_val(hi);
- path = svn__apr_hash_index_key(hi);
+ change = APR_ARRAY_IDX(sorted_changed_paths, i, svn_sort__item_t).value;
+ path = APR_ARRAY_IDX(sorted_changed_paths, i, svn_sort__item_t).key;
id = change->node_rev_id;
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/lock.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/lock.c Tue Oct 2 09:47:23 2012
@@ -648,7 +648,11 @@ walk_locks(svn_fs_t *fs,
svn_boolean_t have_write_lock,
apr_pool_t *pool)
{
- struct walk_locks_baton wlb = { get_locks_func, get_locks_baton, fs };
+ struct walk_locks_baton wlb;
+
+ wlb.get_locks_func = get_locks_func;
+ wlb.get_locks_baton = get_locks_baton;
+ wlb.fs = fs;
SVN_ERR(walk_digest_files(fs->path, digest_path, locks_walker, &wlb,
have_write_lock, pool));
return SVN_NO_ERROR;
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra/ra_loader.h?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra/ra_loader.h Tue Oct 2 09:47:23 2012
@@ -56,7 +56,7 @@ typedef struct svn_ra__vtable_t {
time this is called. SESSION->priv may be set by this function. */
svn_error_t *(*open_session)(svn_ra_session_t *session,
const char **corrected_url,
- const char *repos_URL,
+ const char *session_URL,
const svn_ra_callbacks2_t *callbacks,
void *callback_baton,
apr_hash_t *config,
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/options.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/options.c Tue Oct 2 09:47:23 2012
@@ -332,7 +332,8 @@ capabilities_headers_iterator_callback(v
if (svn_cstring_casecmp(key, SVN_DAV_ROOT_URI_HEADER) == 0)
{
orc->session->repos_root = orc->session->session_url;
- orc->session->repos_root.path = apr_pstrdup(orc->session->pool, val);
+ orc->session->repos_root.path =
+ (char *)svn_fspath__canonicalize(val, orc->session->pool);
orc->session->repos_root_str =
svn_urlpath__canonicalize(
apr_uri_unparse(orc->session->pool,
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/serf.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/serf.c Tue Oct 2 09:47:23 2012
@@ -338,7 +338,7 @@ svn_ra_serf__progress(void *progress_bat
static svn_error_t *
svn_ra_serf__open(svn_ra_session_t *session,
const char **corrected_url,
- const char *repos_URL,
+ const char *session_URL,
const svn_ra_callbacks2_t *callbacks,
void *callback_baton,
apr_hash_t *config,
@@ -368,23 +368,25 @@ svn_ra_serf__open(svn_ra_session_t *sess
serf_sess->pool));
- status = apr_uri_parse(serf_sess->pool, repos_URL, &url);
+ status = apr_uri_parse(serf_sess->pool, session_URL, &url);
if (status)
{
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
- _("Illegal repository URL '%s'"),
- repos_URL);
+ _("Illegal URL '%s'"),
+ session_URL);
}
- /* Contrary to what the comment for apr_uri_t.path says in apr-util 1.2.12 and
- older, for root paths url.path will be "", where serf requires "/". */
+ /* Depending the version of apr-util in use, for root paths url.path
+ will be NULL or "", where serf requires "/". */
if (url.path == NULL || url.path[0] == '\0')
- url.path = apr_pstrdup(serf_sess->pool, "/");
+ {
+ url.path = apr_pstrdup(serf_sess->pool, "/");
+ }
if (!url.port)
{
url.port = apr_uri_port_of_scheme(url.scheme);
}
serf_sess->session_url = url;
- serf_sess->session_url_str = apr_pstrdup(serf_sess->pool, repos_URL);
+ serf_sess->session_url_str = apr_pstrdup(serf_sess->pool, session_URL);
serf_sess->using_ssl = (svn_cstring_casecmp(url.scheme, "https") == 0);
serf_sess->supports_deadprop_count = svn_tristate_unknown;
@@ -470,14 +472,25 @@ svn_ra_serf__reparent(svn_ra_session_t *
"URL '%s'"), url, session->repos_root_str);
}
- status = apr_uri_parse(session->pool, url, &new_url);
+ status = apr_uri_parse(pool, url, &new_url);
if (status)
{
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
_("Illegal repository URL '%s'"), url);
}
- session->session_url.path = new_url.path;
+ /* Depending the version of apr-util in use, for root paths url.path
+ will be NULL or "", where serf requires "/". */
+ /* ### Maybe we should use a string buffer for these strings so we
+ ### don't allocate memory in the session on every reparent? */
+ if (new_url.path == NULL || new_url.path[0] == '\0')
+ {
+ session->session_url.path = apr_pstrdup(session->pool, "/");
+ }
+ else
+ {
+ session->session_url.path = apr_pstrdup(session->pool, new_url.path);
+ }
session->session_url_str = apr_pstrdup(session->pool, url);
return SVN_NO_ERROR;
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c Tue Oct 2 09:47:23 2012
@@ -1772,6 +1772,14 @@ start_report(svn_ra_serf__xml_parser_t *
info->prop_val = NULL;
info->prop_val_len = 0;
}
+ else if (strcmp(name.name, "txdelta") == 0)
+ {
+ /* Pre 1.2, mod_dav_svn was using <txdelta> tags (in
+ addition to <fetch-file>s and such) when *not* in
+ "send-all" mode. As a client, we're smart enough to know
+ that's wrong, so we'll just ignore these tags. */
+ ;
+ }
else
{
return svn_error_createf(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/util.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/util.c Tue Oct 2 09:47:23 2012
@@ -2160,7 +2160,8 @@ svn_ra_serf__discover_vcc(const char **v
/* Now recreate the root_url. */
session->repos_root = session->session_url;
- session->repos_root.path = apr_pstrdup(session->pool, url_buf->data);
+ session->repos_root.path =
+ (char *)svn_fspath__canonicalize(url_buf->data, session->pool);
session->repos_root_str =
svn_urlpath__canonicalize(apr_uri_unparse(session->pool,
&session->repos_root, 0),
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/xml.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/xml.c Tue Oct 2 09:47:23 2012
@@ -91,37 +91,27 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_
const char *name)
{
const char *colon;
- svn_ra_serf__dav_props_t prop_name;
colon = strchr(name, ':');
if (colon)
{
svn_ra_serf__ns_t *ns;
- prop_name.namespace = NULL;
-
for (ns = ns_list; ns; ns = ns->next)
{
if (strncmp(ns->namespace, name, colon - name) == 0)
{
- prop_name.namespace = ns->url;
- break;
+ returned_prop_name->namespace = ns->url;
+ returned_prop_name->name = colon + 1;
+ return;
}
}
-
- SVN_ERR_ASSERT_NO_RETURN(prop_name.namespace);
-
- prop_name.name = colon + 1;
- }
- else
- {
- /* use default namespace for now */
- prop_name.namespace = "";
- prop_name.name = name;
}
- *returned_prop_name = prop_name;
- return;
+ /* If there is no prefix, or if the prefix is not found, then the
+ name is NOT within a namespace. */
+ returned_prop_name->namespace = "";
+ returned_prop_name->name = name;
}
void
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/replay.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/replay.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/replay.c Tue Oct 2 09:47:23 2012
@@ -352,6 +352,116 @@ is_within_base_path(const char *path, co
return FALSE;
}
+/* Given PATH deleted under ROOT, return in READABLE whether the path was
+ readable prior to the deletion. Consult COPIES (a stack of 'struct
+ copy_info') and AUTHZ_READ_FUNC. */
+static svn_error_t *
+was_readable(svn_boolean_t *readable,
+ svn_fs_root_t *root,
+ const char *path,
+ apr_array_header_t *copies,
+ svn_repos_authz_func_t authz_read_func,
+ void *authz_read_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_fs_root_t *inquire_root;
+ const char *inquire_path;
+ struct copy_info *info = NULL;
+ const char *relpath;
+
+ /* Short circuit. */
+ if (! authz_read_func)
+ {
+ *readable = TRUE;
+ return SVN_NO_ERROR;
+ }
+
+ if (copies->nelts != 0)
+ info = &APR_ARRAY_IDX(copies, copies->nelts - 1, struct copy_info);
+
+ /* Are we under a copy? */
+ if (info && (relpath = svn_relpath_skip_ancestor(info->path, path)))
+ {
+ SVN_ERR(svn_fs_revision_root(&inquire_root, svn_fs_root_fs(root),
+ info->copyfrom_rev, scratch_pool));
+ inquire_path = svn_fspath__join(info->copyfrom_path, relpath,
+ scratch_pool);
+ }
+ else
+ {
+ /* Compute the revision that ROOT is based on. (Note that ROOT is not
+ r0's root, since this function is only called for deletions.)
+ ### Need a more succinct way to express this */
+ svn_revnum_t inquire_rev = SVN_INVALID_REVNUM;
+ if (svn_fs_is_txn_root(root))
+ inquire_rev = svn_fs_txn_root_base_revision(root);
+ if (svn_fs_is_revision_root(root))
+ inquire_rev = svn_fs_revision_root_revision(root)-1;
+ SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(inquire_rev));
+
+ SVN_ERR(svn_fs_revision_root(&inquire_root, svn_fs_root_fs(root),
+ inquire_rev, scratch_pool));
+ inquire_path = path;
+ }
+
+ SVN_ERR(authz_read_func(readable, inquire_root, inquire_path,
+ authz_read_baton, result_pool));
+
+ return SVN_NO_ERROR;
+}
+
+/* Initialize COPYFROM_ROOT, COPYFROM_PATH, and COPYFROM_REV with the
+ revision root, fspath, and revnum of the copyfrom of CHANGE, which
+ corresponds to PATH under ROOT. If the copyfrom info is valid
+ (i.e., is not (NULL, SVN_INVALID_REVNUM)), then initialize SRC_READABLE
+ too, consulting AUTHZ_READ_FUNC and AUTHZ_READ_BATON if provided. */
+static svn_error_t *
+fill_copyfrom(svn_fs_root_t **copyfrom_root,
+ const char **copyfrom_path,
+ svn_revnum_t *copyfrom_rev,
+ svn_boolean_t *src_readable,
+ svn_fs_root_t *root,
+ svn_fs_path_change2_t *change,
+ svn_repos_authz_func_t authz_read_func,
+ void *authz_read_baton,
+ const char *path,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ if (! change->copyfrom_known)
+ {
+ SVN_ERR(svn_fs_copied_from(&(change->copyfrom_rev),
+ &(change->copyfrom_path),
+ root, path, result_pool));
+ change->copyfrom_known = TRUE;
+ }
+ *copyfrom_rev = change->copyfrom_rev;
+ *copyfrom_path = change->copyfrom_path;
+
+ if (*copyfrom_path && SVN_IS_VALID_REVNUM(*copyfrom_rev))
+ {
+ SVN_ERR(svn_fs_revision_root(copyfrom_root,
+ svn_fs_root_fs(root),
+ *copyfrom_rev, result_pool));
+
+ if (authz_read_func)
+ {
+ SVN_ERR(authz_read_func(src_readable, *copyfrom_root,
+ *copyfrom_path,
+ authz_read_baton, result_pool));
+ }
+ else
+ *src_readable = TRUE;
+ }
+ else
+ {
+ *copyfrom_root = NULL;
+ /* SRC_READABLE left uninitialized */
+ }
+ return SVN_NO_ERROR;
+}
+
static svn_error_t *
path_driver_cb_func(void **dir_baton,
void *parent_baton,
@@ -368,7 +478,6 @@ path_driver_cb_func(void **dir_baton,
void *file_baton = NULL;
svn_revnum_t copyfrom_rev;
const char *copyfrom_path;
- svn_boolean_t src_readable = TRUE;
svn_fs_root_t *source_root = cb->compare_root;
const char *source_fspath = NULL;
const char *base_path = cb->base_path;
@@ -419,8 +528,18 @@ path_driver_cb_func(void **dir_baton,
/* Handle any deletions. */
if (do_delete)
- SVN_ERR(editor->delete_entry(edit_path, SVN_INVALID_REVNUM,
- parent_baton, pool));
+ {
+ svn_boolean_t readable;
+
+ /* Issue #4121: delete under under a copy, of a path that was unreadable
+ at its pre-copy location. */
+ SVN_ERR(was_readable(&readable, root, edit_path, cb->copies,
+ cb->authz_read_func, cb->authz_read_baton,
+ pool, pool));
+ if (readable)
+ SVN_ERR(editor->delete_entry(edit_path, SVN_INVALID_REVNUM,
+ parent_baton, pool));
+ }
/* Fetch the node kind if it makes sense to do so. */
if (! do_delete || do_add)
@@ -437,31 +556,14 @@ path_driver_cb_func(void **dir_baton,
/* Handle any adds/opens. */
if (do_add)
{
- svn_fs_root_t *copyfrom_root = NULL;
- /* Was this node copied? */
- if (! change->copyfrom_known)
- {
- SVN_ERR(svn_fs_copied_from(&(change->copyfrom_rev),
- &(change->copyfrom_path),
- root, edit_path, pool));
- change->copyfrom_known = TRUE;
- }
- copyfrom_rev = change->copyfrom_rev;
- copyfrom_path = change->copyfrom_path;
+ svn_boolean_t src_readable;
+ svn_fs_root_t *copyfrom_root;
- if (copyfrom_path && SVN_IS_VALID_REVNUM(copyfrom_rev))
- {
- SVN_ERR(svn_fs_revision_root(©from_root,
- svn_fs_root_fs(root),
- copyfrom_rev, pool));
-
- if (cb->authz_read_func)
- {
- SVN_ERR(cb->authz_read_func(&src_readable, copyfrom_root,
- copyfrom_path,
- cb->authz_read_baton, pool));
- }
- }
+ /* Was this node copied? */
+ SVN_ERR(fill_copyfrom(©from_root, ©from_path, ©from_rev,
+ &src_readable, root, change,
+ cb->authz_read_func, cb->authz_read_baton,
+ edit_path, pool, pool));
/* If we have a copyfrom path, and we can't read it or we're just
ignoring it, or the copyfrom rev is prior to the low water mark
@@ -591,10 +693,18 @@ path_driver_cb_func(void **dir_baton,
}
}
- /* Handle property modifications. */
if (! do_delete || do_add)
{
- if (change->prop_mod)
+ /* Is this a copy that was downgraded to a raw add? (If so,
+ we'll need to transmit properties and file contents and such
+ for it regardless of what the CHANGE structure's text_mod
+ and prop_mod flags say.) */
+ svn_boolean_t downgraded_copy = (change->copyfrom_known
+ && change->copyfrom_path
+ && (! copyfrom_path));
+
+ /* Handle property modifications. */
+ if (change->prop_mod || downgraded_copy)
{
if (cb->compare_root)
{
@@ -638,14 +748,9 @@ path_driver_cb_func(void **dir_baton,
}
}
- /* Handle textual modifications.
-
- Note that this needs to happen in the "copy from a file we
- aren't allowed to see" case since otherwise the caller will
- have no way to actually get the new file's contents, which
- they are apparently allowed to see. */
+ /* Handle textual modifications. */
if (change->node_kind == svn_node_file
- && (change->text_mod || (change->copyfrom_path && ! copyfrom_path)))
+ && (change->text_mod || downgraded_copy))
{
svn_txdelta_window_handler_t delta_handler;
void *delta_handler_baton;
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/auth.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/auth.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/auth.c Tue Oct 2 09:47:23 2012
@@ -418,11 +418,12 @@ svn_auth_get_platform_specific_provider
{
svn_version_func_t version_function
= version_function_symbol;
- const svn_version_checklist_t check_list[] =
- {
- { library_label, version_function },
- { NULL, NULL }
- };
+ svn_version_checklist_t check_list[2];
+
+ check_list[0].label = library_label;
+ check_list[0].version_query = version_function;
+ check_list[1].label = NULL;
+ check_list[1].version_query = NULL;
SVN_ERR(svn_ver_check_list(svn_subr_version(), check_list));
}
if (apr_dso_sym(&provider_function_symbol,
@@ -493,30 +494,26 @@ svn_auth_get_platform_specific_client_pr
apr_array_header_t *password_stores;
int i;
- if (config)
- {
- svn_config_get(config,
- &password_stores_config_option,
- SVN_CONFIG_SECTION_AUTH,
- SVN_CONFIG_OPTION_PASSWORD_STORES,
- "gnome-keyring,kwallet,keychain,windows-cryptoapi");
- }
- else
- {
- password_stores_config_option = "gnome-keyring,kwallet,keychain,windows-cryptoapi";
- }
+#define SVN__MAYBE_ADD_PROVIDER(list, p) \
+ { if (p) APR_ARRAY_PUSH(list, svn_auth_provider_object_t *) = p; }
*providers = apr_array_make(pool, 12, sizeof(svn_auth_provider_object_t *));
- password_stores
- = svn_cstring_split(password_stores_config_option, " ,", TRUE, pool);
+ /* Fetch the configured list of password stores, and split them into
+ an array. */
+ svn_config_get(config,
+ &password_stores_config_option,
+ SVN_CONFIG_SECTION_AUTH,
+ SVN_CONFIG_OPTION_PASSWORD_STORES,
+ "gnome-keyring,kwallet,keychain,windows-cryptoapi");
+ password_stores = svn_cstring_split(password_stores_config_option,
+ " ,", TRUE, pool);
for (i = 0; i < password_stores->nelts; i++)
{
const char *password_store = APR_ARRAY_IDX(password_stores, i,
const char *);
-
/* GNOME Keyring */
if (apr_strnatcmp(password_store, "gnome-keyring") == 0)
{
@@ -524,90 +521,59 @@ svn_auth_get_platform_specific_client_pr
"gnome_keyring",
"simple",
pool));
-
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
SVN_ERR(svn_auth_get_platform_specific_provider(&provider,
"gnome_keyring",
"ssl_client_cert_pw",
pool));
-
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
-
- continue;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
}
-
/* KWallet */
- if (apr_strnatcmp(password_store, "kwallet") == 0)
+ else if (apr_strnatcmp(password_store, "kwallet") == 0)
{
SVN_ERR(svn_auth_get_platform_specific_provider(&provider,
"kwallet",
"simple",
pool));
-
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
SVN_ERR(svn_auth_get_platform_specific_provider(&provider,
"kwallet",
"ssl_client_cert_pw",
pool));
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
-
- continue;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
}
-
/* Keychain */
- if (apr_strnatcmp(password_store, "keychain") == 0)
+ else if (apr_strnatcmp(password_store, "keychain") == 0)
{
SVN_ERR(svn_auth_get_platform_specific_provider(&provider,
"keychain",
"simple",
pool));
-
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
SVN_ERR(svn_auth_get_platform_specific_provider(&provider,
"keychain",
"ssl_client_cert_pw",
pool));
-
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
-
- continue;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
}
-
/* Windows */
- if (apr_strnatcmp(password_store, "windows-cryptoapi") == 0)
+ else if (apr_strnatcmp(password_store, "windows-cryptoapi") == 0)
{
SVN_ERR(svn_auth_get_platform_specific_provider(&provider,
"windows",
"simple",
pool));
-
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
SVN_ERR(svn_auth_get_platform_specific_provider(&provider,
"windows",
"ssl_client_cert_pw",
pool));
-
- if (provider)
- APR_ARRAY_PUSH(*providers, svn_auth_provider_object_t *) = provider;
-
- continue;
+ SVN__MAYBE_ADD_PROVIDER(*providers, provider);
}
-
- return svn_error_createf(SVN_ERR_BAD_CONFIG_VALUE, NULL,
- _("Invalid config: unknown password store "
- "'%s'"),
- password_store);
}
return SVN_NO_ERROR;
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/cache-memcache.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/cache-memcache.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/cache-memcache.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/cache-memcache.c Tue Oct 2 09:47:23 2012
@@ -459,7 +459,8 @@ add_memcache_server(const char *name,
0, /* min connections */
5, /* soft max connections */
10, /* hard max connections */
- 50, /* connection time to live (secs) */
+ /* time to live (in microseconds) */
+ apr_time_from_sec(50),
&server);
if (apr_err != APR_SUCCESS)
{
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/dirent_uri.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/dirent_uri.c Tue Oct 2 09:47:23 2012
@@ -1437,7 +1437,7 @@ svn_dirent_skip_ancestor(const char *par
apr_size_t len = strlen(parent_dirent);
apr_size_t root_len;
- if (0 != memcmp(parent_dirent, child_dirent, len))
+ if (0 != strncmp(parent_dirent, child_dirent, len))
return NULL; /* parent_dirent is no ancestor of child_dirent */
if (child_dirent[len] == 0)
@@ -1495,7 +1495,7 @@ svn_relpath_skip_ancestor(const char *pa
if (len == 0)
return child_relpath;
- if (0 != memcmp(parent_relpath, child_relpath, len))
+ if (0 != strncmp(parent_relpath, child_relpath, len))
return NULL; /* parent_relpath is no ancestor of child_relpath */
if (child_relpath[len] == 0)
@@ -1518,7 +1518,7 @@ uri_skip_ancestor(const char *parent_uri
assert(svn_uri_is_canonical(parent_uri, NULL));
assert(svn_uri_is_canonical(child_uri, NULL));
- if (0 != memcmp(parent_uri, child_uri, len))
+ if (0 != strncmp(parent_uri, child_uri, len))
return NULL; /* parent_uri is no ancestor of child_uri */
if (child_uri[len] == 0)
@@ -1604,10 +1604,32 @@ svn_dirent_get_absolute(const char **pab
APR_FILEPATH_NOTRELATIVE,
pool);
if (apr_err)
- return svn_error_createf(SVN_ERR_BAD_FILENAME,
- svn_error_create(apr_err, NULL, NULL),
- _("Couldn't determine absolute path of '%s'"),
- svn_dirent_local_style(relative, pool));
+ {
+ /* In some cases when the passed path or its ancestor(s) do not exist
+ or no longer exist apr returns an error.
+
+ In many of these cases we would like to return a path anyway, when the
+ passed path was already a safe absolute path. So check for that now to
+ avoid an error.
+
+ svn_dirent_is_absolute() doesn't perform the necessary checks to see
+ if the path doesn't need post processing to be in the canonical absolute
+ format.
+ */
+
+ if (svn_dirent_is_absolute(relative)
+ && svn_dirent_is_canonical(relative, pool)
+ && !svn_path_is_backpath_present(relative))
+ {
+ *pabsolute = apr_pstrdup(pool, relative);
+ return SVN_NO_ERROR;
+ }
+
+ return svn_error_createf(SVN_ERR_BAD_FILENAME,
+ svn_error_create(apr_err, NULL, NULL),
+ _("Couldn't determine absolute path of '%s'"),
+ svn_dirent_local_style(relative, pool));
+ }
SVN_ERR(svn_path_cstring_to_utf8(pabsolute, buffer, pool));
*pabsolute = svn_dirent_canonicalize(*pabsolute, pool);
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/opt.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/opt.c Tue Oct 2 09:47:23 2012
@@ -1015,6 +1015,20 @@ svn_opt__arg_canonicalize_url(const char
/* Auto-escape some ASCII characters. */
target = svn_path_uri_autoescape(target, pool);
+#if '/' != SVN_PATH_LOCAL_SEPARATOR
+ /* Allow using file:///C:\users\me/repos on Windows, like we did in 1.6 */
+ if (strchr(target, SVN_PATH_LOCAL_SEPARATOR))
+ {
+ char *p = apr_pstrdup(pool, target);
+ target = p;
+
+ /* Convert all local-style separators to the canonical ones. */
+ for (; *p != '\0'; ++p)
+ if (*p == SVN_PATH_LOCAL_SEPARATOR)
+ *p = '/';
+ }
+#endif
+
/* Verify that no backpaths are present in the URL. */
if (svn_path_is_backpath_present(target))
return svn_error_createf(SVN_ERR_BAD_URL, 0,
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/sqlite.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/sqlite.c Tue Oct 2 09:47:23 2012
@@ -1205,13 +1205,15 @@ wrapped_func(sqlite3_context *context,
sqlite3_value *values[])
{
struct function_wrapper_baton_t *fwb = sqlite3_user_data(context);
- svn_sqlite__context_t sctx = { context };
+ svn_sqlite__context_t sctx;
svn_sqlite__value_t **local_vals =
apr_palloc(fwb->scratch_pool,
sizeof(svn_sqlite__value_t *) * argc);
svn_error_t *err;
int i;
+ sctx.context = context;
+
for (i = 0; i < argc; i++)
{
local_vals[i] = apr_palloc(fwb->scratch_pool, sizeof(*local_vals[i]));
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/adm_ops.c?rev=1392818&r1=1392817&r2=1392818&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/adm_ops.c Tue Oct 2 09:47:23 2012
@@ -1935,7 +1935,7 @@ new_revert_partial(svn_wc__db_t *db,
{
svn_wc__db_kind_t kind;
- SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, TRUE,
+ SVN_ERR(svn_wc__db_read_kind(&kind, db, child_abspath, TRUE,
iterpool));
if (kind != svn_wc__db_kind_file)
continue;
@@ -2447,8 +2447,11 @@ svn_wc_get_changelists(svn_wc_context_t
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- struct get_cl_fn_baton gnb = { wc_ctx->db, NULL,
- callback_func, callback_baton };
+ struct get_cl_fn_baton gnb;
+ gnb.db = wc_ctx->db;
+ gnb.clhash = NULL;
+ gnb.callback_func = callback_func;
+ gnb.callback_baton = callback_baton;
if (changelist_filter)
SVN_ERR(svn_hash_from_cstring_keys(&gnb.clhash, changelist_filter,