You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/29 22:58:21 UTC
svn commit: r1655874 - in /subversion/branches/pin-externals: ./
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/bindings/javahl/t...
Author: stsp
Date: Thu Jan 29 21:58:20 2015
New Revision: 1655874
URL: http://svn.apache.org/r1655874
Log:
On the pin-externals branch, merge outstanding changes from trunk.
Modified:
subversion/branches/pin-externals/ (props changed)
subversion/branches/pin-externals/subversion/bindings/javahl/native/CommitMessage.cpp
subversion/branches/pin-externals/subversion/bindings/javahl/native/CreateJ.cpp
subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.cpp
subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.h
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
subversion/branches/pin-externals/subversion/bindings/swig/ruby/test/test_client.rb
subversion/branches/pin-externals/subversion/libsvn_client/client.h
subversion/branches/pin-externals/subversion/libsvn_client/copy.c
subversion/branches/pin-externals/subversion/libsvn_client/externals.c
subversion/branches/pin-externals/subversion/libsvn_client/import.c
subversion/branches/pin-externals/subversion/libsvn_client/util.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c
subversion/branches/pin-externals/subversion/tests/cmdline/redirect_tests.py
subversion/branches/pin-externals/subversion/tests/libsvn_fs/fs-test.c
Propchange: subversion/branches/pin-externals/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 29 21:58:20 2015
@@ -85,4 +85,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1643755-1655673
+/subversion/trunk:1643755-1655873
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/native/CommitMessage.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/CommitMessage.cpp?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/native/CommitMessage.cpp (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/native/CommitMessage.cpp Thu Jan 29 21:58:20 2015
@@ -65,6 +65,7 @@ CommitMessage::getCommitMessage(const ch
const apr_array_header_t *commit_items,
apr_pool_t *pool)
{
+ *log_msg = NULL;
*tmp_file = NULL;
JNIEnv *env = JNIUtil::getEnv();
@@ -93,6 +94,9 @@ CommitMessage::getCommitMessage(const ch
jobject jitem = CreateJ::CommitItem(item);
+ if (!jitem)
+ return SVN_NO_ERROR; /* Exception thrown */
+
// store the Java object into the array
jitems.push_back(jitem);
}
@@ -102,7 +106,7 @@ CommitMessage::getCommitMessage(const ch
midCallback,
CreateJ::Set(jitems));
if (JNIUtil::isJavaExceptionThrown())
- return SVN_NO_ERROR;
+ POP_AND_RETURN(SVN_NO_ERROR);
if (jmessage != NULL)
{
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/CreateJ.cpp?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/native/CreateJ.cpp Thu Jan 29 21:58:20 2015
@@ -71,7 +71,8 @@ CreateJ::ConflictDescriptor(const svn_wc
"Ljava/lang/String;Ljava/lang/String;"
"Ljava/lang/String;Ljava/lang/String;"
"L"JAVA_PACKAGE"/types/ConflictVersion;"
- "L"JAVA_PACKAGE"/types/ConflictVersion;)V");
+ "L"JAVA_PACKAGE"/types/ConflictVersion;"
+ "Ljava/lang/String;[B[B[B[B)V");
if (JNIUtil::isJavaExceptionThrown() || ctor == 0)
POP_AND_RETURN_NULL;
}
@@ -118,6 +119,33 @@ CreateJ::ConflictDescriptor(const svn_wc
jobject joperation = EnumMapper::mapOperation(desc->operation);
if (JNIUtil::isJavaExceptionThrown())
POP_AND_RETURN_NULL;
+ jstring jpropRejectAbspath = JNIUtil::makeJString(desc->prop_reject_abspath);
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN_NULL;
+ jbyteArray jpropValueBase = (
+ !desc->prop_value_base ? NULL
+ :JNIUtil::makeJByteArray(desc->prop_value_base->data,
+ int(desc->prop_value_base->len)));
+ if (JNIUtil::isExceptionThrown())
+ POP_AND_RETURN_NULL;
+ jbyteArray jpropValueWorking = (
+ !desc->prop_value_working ? NULL
+ :JNIUtil::makeJByteArray(desc->prop_value_working->data,
+ int(desc->prop_value_working->len)));
+ if (JNIUtil::isExceptionThrown())
+ POP_AND_RETURN_NULL;
+ jbyteArray jpropValueIncomingOld = (
+ !desc->prop_value_incoming_old ? NULL
+ :JNIUtil::makeJByteArray(desc->prop_value_incoming_old->data,
+ int(desc->prop_value_incoming_old->len)));
+ if (JNIUtil::isExceptionThrown())
+ POP_AND_RETURN_NULL;
+ jbyteArray jpropValueIncomingNew = (
+ !desc->prop_value_incoming_new ? NULL
+ :JNIUtil::makeJByteArray(desc->prop_value_incoming_new->data,
+ int(desc->prop_value_incoming_new->len)));
+ if (JNIUtil::isExceptionThrown())
+ POP_AND_RETURN_NULL;
// Instantiate the conflict descriptor.
jobject jdesc = env->NewObject(clazz, ctor, jpath, jconflictKind,
@@ -125,7 +153,10 @@ CreateJ::ConflictDescriptor(const svn_wc
(jboolean) desc->is_binary, jmimeType,
jconflictAction, jconflictReason, joperation,
jbasePath, jreposPath, juserPath,
- jmergedPath, jsrcLeft, jsrcRight);
+ jmergedPath, jsrcLeft, jsrcRight,
+ jpropRejectAbspath, jpropValueBase,
+ jpropValueWorking, jpropValueIncomingOld,
+ jpropValueIncomingNew);
if (JNIUtil::isJavaExceptionThrown())
POP_AND_RETURN_NULL;
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.cpp?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.cpp (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.cpp Thu Jan 29 21:58:20 2015
@@ -32,32 +32,6 @@
#include "JNIStringHolder.h"
#include "../include/org_apache_subversion_javahl_CommitItemStateFlags.h"
-/**
- * Map a C commit state flag constant to the Java constant.
- * @param state the C commit state flage constant
- * @returns the Java constant
- */
-jint EnumMapper::mapCommitMessageStateFlags(apr_byte_t flags)
-{
- jint jstateFlags = 0;
- if (flags & SVN_CLIENT_COMMIT_ITEM_ADD)
- jstateFlags |=
- org_apache_subversion_javahl_CommitItemStateFlags_Add;
- if (flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
- jstateFlags |=
- org_apache_subversion_javahl_CommitItemStateFlags_Delete;
- if (flags & SVN_CLIENT_COMMIT_ITEM_TEXT_MODS)
- jstateFlags |=
- org_apache_subversion_javahl_CommitItemStateFlags_TextMods;
- if (flags & SVN_CLIENT_COMMIT_ITEM_PROP_MODS)
- jstateFlags |=
- org_apache_subversion_javahl_CommitItemStateFlags_PropMods;
- if (flags & SVN_CLIENT_COMMIT_ITEM_IS_COPY)
- jstateFlags |=
- org_apache_subversion_javahl_CommitItemStateFlags_IsCopy;
- return jstateFlags;
-}
-
jobject EnumMapper::mapChangePathAction(const char action)
{
switch (action)
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.h?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.h (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/native/EnumMapper.h Thu Jan 29 21:58:20 2015
@@ -55,7 +55,6 @@ class EnumMapper
toMergeinfoInheritance(jobject jInheritance);
/* Converting from C enum's */
- static jint mapCommitMessageStateFlags(apr_byte_t flags);
static jobject mapChangePathAction(const char action);
static jobject mapNotifyState(svn_wc_notify_state_t state);
static jobject mapNotifyAction(svn_wc_notify_action_t action);
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java Thu Jan 29 21:58:20 2015
@@ -71,13 +71,26 @@ public class ConflictDescriptor
*/
private ConflictVersion srcRightVersion;
- /** This constructor should only be called from JNI code. */
- public ConflictDescriptor(String path, Kind conflictKind, NodeKind nodeKind,
+ // Information about property conflicts. New in 1.9
+ private String propRejectAbspath;
+ private byte[] propValueBase;
+ private byte[] propValueWorking;
+ private byte[] propValueIncomingOld;
+ private byte[] propValueIncomingNew;
+
+
+ // Private constructor, only called from the JNI code.
+ private ConflictDescriptor(String path, Kind conflictKind, NodeKind nodeKind,
String propertyName, boolean isBinary, String mimeType,
Action action, Reason reason, Operation operation,
String basePath, String theirPath,
String myPath, String mergedPath,
- ConflictVersion srcLeft, ConflictVersion srcRight)
+ ConflictVersion srcLeft, ConflictVersion srcRight,
+ String propRejectAbspath, byte[] propValueBase,
+ byte[] propValueWorking,
+ byte[] propValueIncomingOld,
+ byte[] propValueIncomingNew)
+
{
this.path = path;
this.conflictKind = conflictKind;
@@ -94,6 +107,28 @@ public class ConflictDescriptor
this.operation = operation;
this.srcLeftVersion = srcLeft;
this.srcRightVersion = srcRight;
+ this.propRejectAbspath = propRejectAbspath;
+ this.propValueBase = propValueBase;
+ this.propValueWorking = propValueWorking;
+ this.propValueIncomingOld = propValueIncomingOld;
+ this.propValueIncomingNew = propValueIncomingNew;
+ }
+
+ /**
+ * This constructor should only be called from JNI code.
+ * @deprecated
+ */
+ @Deprecated
+ public ConflictDescriptor(String path, Kind conflictKind, NodeKind nodeKind,
+ String propertyName, boolean isBinary, String mimeType,
+ Action action, Reason reason, Operation operation,
+ String basePath, String theirPath,
+ String myPath, String mergedPath,
+ ConflictVersion srcLeft, ConflictVersion srcRight)
+ {
+ this(path, conflictKind, nodeKind, propertyName, isBinary, mimeType,
+ action, reason, operation, basePath, theirPath, myPath, mergedPath,
+ srcLeft, srcRight, null, null, null, null, null);
}
public String getPath()
@@ -171,6 +206,32 @@ public class ConflictDescriptor
return srcRightVersion;
}
+ public String getPropRejectAbspath()
+ {
+ return propRejectAbspath;
+ }
+
+ public byte[] getPropValueBase()
+ {
+ return propValueBase;
+ }
+
+ public byte[] getPropValueWorking()
+ {
+ return propValueWorking;
+ }
+
+ public byte[] getPropValueIncomingOld()
+ {
+ return propValueIncomingOld;
+ }
+
+ public byte[] getPropValueIncomingNew()
+ {
+ return propValueIncomingNew;
+ }
+
+
/**
* Rich man's enum for <code>svn_wc_conflict_kind_t</code>.
*/
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Thu Jan 29 21:58:20 2015
@@ -259,7 +259,7 @@ public class BasicTests extends SVNTests
tempclient.dispose();
// create Y and Y/Z directories in the repository
- addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", NodeKind.none,
+ addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", NodeKind.dir,
CommitItemStateFlags.Add);
Set<String> urls = new HashSet<String>(1);
urls.add(thisTest.getUrl() + "/Y");
@@ -1004,9 +1004,9 @@ public class BasicTests extends SVNTests
OneTest thisTest = new OneTest();
// create Y and Y/Z directories in the repository
- addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", NodeKind.none,
+ addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", NodeKind.dir,
CommitItemStateFlags.Add);
- addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y/Z", NodeKind.none,
+ addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y/Z", NodeKind.dir,
CommitItemStateFlags.Add);
Set<String> urls = new HashSet<String>(2);
urls.add(thisTest.getUrl() + "/Y");
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java Thu Jan 29 21:58:20 2015
@@ -257,10 +257,11 @@ class SVNTests extends TestCase
greekRepos = new File(localTmp, "repos");
greekDump = new File(localTmp, "greek_dump");
admin.create(greekRepos, true,false, null, this.fsType);
- addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null,
- NodeKind.none, CommitItemStateFlags.Add);
+ addExpectedCommitItem(greekFiles.getAbsolutePath(),
+ makeReposUrl(greekRepos).toString(), null,
+ NodeKind.dir, CommitItemStateFlags.Add);
client.doImport(greekFiles.getAbsolutePath(),
- makeReposUrl(greekRepos).toString(),
+ makeReposUrl(greekRepos).toString(),
Depth.infinity, false, false, null,
new MyCommitMessage(), null);
admin.dump(greekRepos, new FileOutputStream(greekDump),
Modified: subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java (original)
+++ subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java Thu Jan 29 21:58:20 2015
@@ -232,8 +232,9 @@ class SVNTests extends TestCase
greekDump = new File(localTmp, "greek_dump");
admin.create(greekRepos.getAbsolutePath(), true,false, null,
this.fsType);
- addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null,
- NodeKind.none, CommitItemStateFlags.Add);
+ addExpectedCommitItem(greekFiles.getAbsolutePath(),
+ makeReposUrl(greekRepos).toString(), null,
+ NodeKind.dir, CommitItemStateFlags.Add);
client.doImport(greekFiles.getAbsolutePath(), makeReposUrl(greekRepos),
null, true );
admin.dump(greekRepos.getAbsolutePath(), new FileOutputer(greekDump),
Modified: subversion/branches/pin-externals/subversion/bindings/swig/ruby/test/test_client.rb
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/ruby/test/test_client.rb?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/ruby/test/test_client.rb (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/ruby/test/test_client.rb Thu Jan 29 21:58:20 2015
@@ -2243,8 +2243,8 @@ class SvnClientTest < Test::Unit::TestCa
items = nil
ctx.cp(path, repos_uri2)
- assert_equal([nil], items.collect {|item| item.wcprop_changes})
- assert_equal([nil], items.collect {|item| item.incoming_prop_changes})
+ assert_equal([[]], items.collect {|item| item.wcprop_changes})
+ assert_equal([[]], items.collect {|item| item.incoming_prop_changes})
assert_equal([nil], items.collect {|item| item.outgoing_prop_changes})
end
end
Modified: subversion/branches/pin-externals/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/client.h?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/client.h (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/client.h Thu Jan 29 21:58:20 2015
@@ -1181,9 +1181,10 @@ svn_client__arbitrary_nodes_diff(const c
/* Helper for the remote case of svn_client_propget.
*
- * If PROPS is not null, then get the value of property PROPNAME in REVNUM,
- * using RA_LIB and SESSION. Store the value ('svn_string_t *') in PROPS,
- * under the path key "TARGET_PREFIX/TARGET_RELATIVE" ('const char *').
+ * If PROPS is not null, then get the value of property PROPNAME in
+ * REVNUM, using RA_SESSION. Store the value ('svn_string_t *') in
+ * PROPS, under the path key "TARGET_PREFIX/TARGET_RELATIVE"
+ * ('const char *').
*
* If INHERITED_PROPS is not null, then set *INHERITED_PROPS to a
* depth-first ordered array of svn_prop_inherited_item_t * structures
Modified: subversion/branches/pin-externals/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/copy.c?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/copy.c Thu Jan 29 21:58:20 2015
@@ -1809,54 +1809,6 @@ wc_to_repos_copy(const apr_array_header_
}
}
- if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
- {
- /* Produce a list of new paths to add, and provide it to the
- mechanism used to acquire a log message. */
- svn_client_commit_item3_t *item;
- const char *tmp_file;
- commit_items = apr_array_make(scratch_pool, copy_pairs->nelts,
- sizeof(item));
-
- /* Add any intermediate directories to the message */
- if (make_parents)
- {
- for (i = 0; i < new_dirs->nelts; i++)
- {
- const char *url = APR_ARRAY_IDX(new_dirs, i, const char *);
-
- item = svn_client_commit_item3_create(scratch_pool);
- item->url = url;
- item->kind = svn_node_dir;
- item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
- APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
- }
- }
-
- for (i = 0; i < copy_pairs->nelts; i++)
- {
- svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
- svn_client__copy_pair_t *);
-
- item = svn_client_commit_item3_create(scratch_pool);
- item->url = pair->dst_abspath_or_url;
- item->kind = pair->src_kind;
- item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
- APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
- }
-
- SVN_ERR(svn_client__get_log_msg(&message, &tmp_file, commit_items,
- ctx, scratch_pool));
- if (! message)
- {
- svn_pool_destroy(iterpool);
- svn_pool_destroy(session_pool);
- return SVN_NO_ERROR;
- }
- }
- else
- message = "";
-
cukb.session = ra_session;
SVN_ERR(svn_ra_get_repos_root2(ra_session, &cukb.repos_root_url, session_pool));
cukb.should_reparent = FALSE;
@@ -1915,8 +1867,6 @@ wc_to_repos_copy(const apr_array_header_
/* Set the mergeinfo for the destination to the combined merge
info known to the WC and the repository. */
- item->outgoing_prop_changes = apr_array_make(scratch_pool, 1,
- sizeof(svn_prop_t *));
/* Repository mergeinfo (or NULL if it's locally added)... */
if (src_origin)
SVN_ERR(svn_client__get_repos_mergeinfo(
@@ -1933,18 +1883,24 @@ wc_to_repos_copy(const apr_array_header_
iterpool));
else if (! mergeinfo)
mergeinfo = wc_mergeinfo;
+
if (mergeinfo)
{
/* Push a mergeinfo prop representing MERGEINFO onto the
* OUTGOING_PROP_CHANGES array. */
svn_prop_t *mergeinfo_prop
- = apr_palloc(item->outgoing_prop_changes->pool,
- sizeof(svn_prop_t));
+ = apr_palloc(scratch_pool, sizeof(*mergeinfo_prop));
svn_string_t *prop_value;
SVN_ERR(svn_mergeinfo_to_string(&prop_value, mergeinfo,
- item->outgoing_prop_changes->pool));
+ scratch_pool));
+
+ if (!item->outgoing_prop_changes)
+ {
+ item->outgoing_prop_changes = apr_array_make(scratch_pool, 1,
+ sizeof(svn_prop_t *));
+ }
mergeinfo_prop->name = SVN_PROP_MERGEINFO;
mergeinfo_prop->value = prop_value;
@@ -1989,6 +1945,22 @@ wc_to_repos_copy(const apr_array_header_
}
}
+ if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
+ {
+ const char *tmp_file;
+
+ SVN_ERR(svn_client__get_log_msg(&message, &tmp_file, commit_items,
+ ctx, scratch_pool));
+ if (! message)
+ {
+ svn_pool_destroy(iterpool);
+ svn_pool_destroy(session_pool);
+ return SVN_NO_ERROR;
+ }
+ }
+ else
+ message = "";
+
/* Sort and condense our COMMIT_ITEMS. */
SVN_ERR(svn_client__condense_commit_items(&top_dst_url,
commit_items, scratch_pool));
@@ -2568,7 +2540,7 @@ try_copy(svn_boolean_t *timestamp_sleep,
{
svn_client_copy_source_t *source = APR_ARRAY_IDX(sources, i,
svn_client_copy_source_t *);
- svn_client__copy_pair_t *pair = apr_palloc(pool, sizeof(*pair));
+ svn_client__copy_pair_t *pair = apr_pcalloc(pool, sizeof(*pair));
const char *src_basename;
svn_boolean_t src_is_url = svn_path_is_url(source->path);
@@ -2590,6 +2562,7 @@ try_copy(svn_boolean_t *timestamp_sleep,
pair->src_op_revision = *source->revision;
pair->src_peg_revision = *source->peg_revision;
+ pair->src_kind = svn_node_unknown;
SVN_ERR(svn_opt_resolve_revisions(&pair->src_peg_revision,
&pair->src_op_revision,
@@ -2618,7 +2591,7 @@ try_copy(svn_boolean_t *timestamp_sleep,
else
{
/* Only one source path. */
- svn_client__copy_pair_t *pair = apr_palloc(pool, sizeof(*pair));
+ svn_client__copy_pair_t *pair = apr_pcalloc(pool, sizeof(*pair));
svn_client_copy_source_t *source =
APR_ARRAY_IDX(sources, 0, svn_client_copy_source_t *);
svn_boolean_t src_is_url = svn_path_is_url(source->path);
@@ -2630,6 +2603,7 @@ try_copy(svn_boolean_t *timestamp_sleep,
source->path, pool));
pair->src_op_revision = *source->revision;
pair->src_peg_revision = *source->peg_revision;
+ pair->src_kind = svn_node_unknown;
SVN_ERR(svn_opt_resolve_revisions(&pair->src_peg_revision,
&pair->src_op_revision,
Modified: subversion/branches/pin-externals/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/externals.c?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/externals.c Thu Jan 29 21:58:20 2015
@@ -146,6 +146,7 @@ relegate_dir_external(svn_wc_context_t *
static svn_error_t *
switch_dir_external(const char *local_abspath,
const char *url,
+ const char *url_from_externals_definition,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
const char *defining_abspath,
@@ -197,7 +198,16 @@ switch_dir_external(const char *local_ab
SVN_ERR(svn_wc__get_wcroot(&defining_wcroot_abspath, ctx->wc_ctx,
defining_abspath, pool, pool));
if (strcmp(wcroot_abspath, defining_wcroot_abspath) == 0)
- return svn_error_create(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL, NULL);
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("The external '%s' defined in %s at '%s' "
+ "cannot be checked out because '%s' is "
+ "already a versioned path."),
+ url_from_externals_definition,
+ SVN_PROP_EXTERNALS,
+ svn_dirent_local_style(defining_abspath,
+ pool),
+ svn_dirent_local_style(local_abspath,
+ pool));
}
/* If path is a directory, try to update/switch to the correct URL
@@ -792,6 +802,7 @@ handle_external_item_change(svn_client_c
{
case svn_node_dir:
SVN_ERR(switch_dir_external(local_abspath, new_loc->url,
+ new_item->url,
&(new_item->peg_revision),
&(new_item->revision),
parent_dir_abspath,
Modified: subversion/branches/pin-externals/subversion/libsvn_client/import.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/import.c?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/import.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/import.c Thu Jan 29 21:58:20 2015
@@ -832,6 +832,8 @@ svn_client_import5(const char *path,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
+ SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
+
/* Create a new commit item and add it to the array. */
if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
{
@@ -845,6 +847,8 @@ svn_client_import5(const char *path,
item = svn_client_commit_item3_create(scratch_pool);
item->path = local_abspath;
+ item->url = url;
+ item->kind = kind;
item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
@@ -860,8 +864,6 @@ svn_client_import5(const char *path,
}
}
- SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
-
SVN_ERR(svn_client_open_ra_session2(&ra_session, url, NULL,
ctx, scratch_pool, iterpool));
Modified: subversion/branches/pin-externals/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/util.c?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/util.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/util.c Thu Jan 29 21:58:20 2015
@@ -142,6 +142,7 @@ svn_client_commit_item3_create(apr_pool_
item->revision = SVN_INVALID_REVNUM;
item->copyfrom_rev = SVN_INVALID_REVNUM;
+ item->kind = svn_node_unknown;
return item;
}
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c Thu Jan 29 21:58:20 2015
@@ -555,8 +555,9 @@ svn_ra_serf__exchange_capabilities(svn_r
&& opt_ctx->handler->sline.code < 399)
{
return svn_error_createf(SVN_ERR_RA_SESSION_URL_MISMATCH, NULL,
- _("The repository reports that it was moved "
- "to '%s'"),
+ (opt_ctx->handler->sline.code == 301
+ ? _("Repository moved permanently to '%s'")
+ : _("Repository moved temporarily to '%s'")),
opt_ctx->handler->location);
}
Modified: subversion/branches/pin-externals/subversion/tests/cmdline/redirect_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/cmdline/redirect_tests.py?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/cmdline/redirect_tests.py (original)
+++ subversion/branches/pin-externals/subversion/tests/cmdline/redirect_tests.py Thu Jan 29 21:58:20 2015
@@ -212,7 +212,7 @@ def redirected_copy(sbox):
sbox.build(create_wc=False)
# E170011 = SVN_ERR_RA_SESSION_URL_MISMATCH
- expected_error = "svn: E170011: The repository.*moved"
+ expected_error = "svn: E170011: Repository moved permanently"
# This tests the actual copy handling
svntest.actions.run_and_verify_svn(None, None, expected_error,
@@ -226,6 +226,20 @@ def redirected_copy(sbox):
sbox.redirected_root_url() + '/A',
'^/copy-of-A')
+ # E170011 = SVN_ERR_RA_SESSION_URL_MISMATCH
+ expected_error = "svn: E170011: Repository moved temporarily"
+
+ # This tests the actual copy handling
+ svntest.actions.run_and_verify_svn(None, None, expected_error,
+ 'cp', '-m', 'failed copy',
+ sbox.redirected_root_url(temporary=True) + '/A',
+ sbox.redirected_root_url(temporary=True) + '/A_copied')
+
+ # This tests the cmdline handling of '^/copy-of-A'
+ svntest.actions.run_and_verify_svn(None, None, expected_error,
+ 'cp', '-m', 'failed copy',
+ sbox.redirected_root_url(temporary=True) + '/A',
+ '^/copy-of-A')
#----------------------------------------------------------------------
########################################################################
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_fs/fs-test.c?rev=1655874&r1=1655873&r2=1655874&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_fs/fs-test.c Thu Jan 29 21:58:20 2015
@@ -6696,6 +6696,56 @@ test_modify_txn_being_written(const svn_
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_prop_and_text_rep_sharing_collision(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ /* Regression test for issue 4554: Wrong file length with PLAIN
+ * representations in FSFS. */
+ svn_fs_t *fs;
+ svn_fs_txn_t *txn;
+ svn_fs_root_t *txn_root;
+ svn_fs_root_t *rev_root;
+ svn_revnum_t new_rev;
+ svn_filesize_t length;
+ const char *testdir = "test-prop-and-text-rep-sharing-collision";
+
+ /* Create a new repo. */
+ SVN_ERR(svn_test__create_fs(&fs, testdir, opts, pool));
+
+ SVN_ERR(svn_fs_begin_txn(&txn, fs, 0, pool));
+ SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+ /* Set node property for the root. */
+ SVN_ERR(svn_fs_change_node_prop(txn_root, "/", "prop",
+ svn_string_create("value", pool),
+ pool));
+
+ /* Commit revision r1. */
+ SVN_ERR(test_commit_txn(&new_rev, txn, NULL, pool));
+
+ SVN_ERR(svn_fs_begin_txn(&txn, fs, 1, pool));
+ SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+
+ /* Create file with same contents as property representation. */
+ SVN_ERR(svn_fs_make_file(txn_root, "/foo", pool));
+ SVN_ERR(svn_test__set_file_contents(txn_root, "/foo",
+ "K 4\n"
+ "prop\n"
+ "V 5\n"
+ "value\n"
+ "END\n", pool));
+
+ /* Commit revision r2. */
+ SVN_ERR(test_commit_txn(&new_rev, txn, NULL, pool));
+
+ /* Check that FS reports correct length for the file (23). */
+ SVN_ERR(svn_fs_revision_root(&rev_root, fs, 2, pool));
+ SVN_ERR(svn_fs_file_length(&length, rev_root, "/foo", pool));
+
+ SVN_TEST_ASSERT(length == 23);
+ return SVN_NO_ERROR;
+}
+
/* ------------------------------------------------------------------------ */
/* The test table. */
@@ -6825,6 +6875,8 @@ static struct svn_test_descriptor_t test
"test pool lifetime dependencies with txn roots"),
SVN_TEST_OPTS_PASS(test_modify_txn_being_written,
"test modify txn being written in FSFS"),
+ SVN_TEST_OPTS_PASS(test_prop_and_text_rep_sharing_collision,
+ "test property and text rep-sharing collision"),
SVN_TEST_NULL
};