You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/10 19:03:37 UTC
svn commit: r984122 [34/40] - in /subversion/branches/ignore-mergeinfo: ./
build/ build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ build/generator/util/ build/hudson/
build/hudson/jobs/ build/hudson/jobs/subversion-1.6...
Modified: subversion/branches/ignore-mergeinfo/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnlook/main.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnlook/main.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnlook/main.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* main.c: Subversion server inspection tool.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -530,13 +530,13 @@ print_dirs_changed_tree(svn_repos_node_t
/* Recursively handle the node's children. */
subpool = svn_pool_create(pool);
- full_path = svn_path_join(path, tmp_node->name, subpool);
+ full_path = svn_dirent_join(path, tmp_node->name, subpool);
SVN_ERR(print_dirs_changed_tree(tmp_node, full_path, subpool));
while (tmp_node->sibling)
{
svn_pool_clear(subpool);
tmp_node = tmp_node->sibling;
- full_path = svn_path_join(path, tmp_node->name, subpool);
+ full_path = svn_dirent_join(path, tmp_node->name, subpool);
SVN_ERR(print_dirs_changed_tree(tmp_node, full_path, subpool));
}
svn_pool_destroy(subpool);
@@ -609,13 +609,13 @@ print_changed_tree(svn_repos_node_t *nod
/* Recursively handle the node's children. */
subpool = svn_pool_create(pool);
- full_path = svn_path_join(path, node->name, subpool);
+ full_path = svn_dirent_join(path, node->name, subpool);
SVN_ERR(print_changed_tree(node, full_path, copy_info, subpool));
while (node->sibling)
{
svn_pool_clear(subpool);
node = node->sibling;
- full_path = svn_path_join(path, node->name, subpool);
+ full_path = svn_dirent_join(path, node->name, subpool);
SVN_ERR(print_changed_tree(node, full_path, copy_info, subpool));
}
svn_pool_destroy(subpool);
@@ -1125,16 +1125,16 @@ print_diff_tree(svn_fs_root_t *root,
/* Recursively handle the node's children. */
subpool = svn_pool_create(pool);
SVN_ERR(print_diff_tree(root, base_root, node,
- svn_path_join(path, node->name, subpool),
- svn_path_join(base_path, node->name, subpool),
+ svn_dirent_join(path, node->name, subpool),
+ svn_dirent_join(base_path, node->name, subpool),
c, tmpdir, subpool));
while (node->sibling)
{
svn_pool_clear(subpool);
node = node->sibling;
SVN_ERR(print_diff_tree(root, base_root, node,
- svn_path_join(path, node->name, subpool),
- svn_path_join(base_path, node->name, subpool),
+ svn_dirent_join(path, node->name, subpool),
+ svn_dirent_join(base_path, node->name, subpool),
c, tmpdir, subpool));
}
svn_pool_destroy(subpool);
Modified: subversion/branches/ignore-mergeinfo/subversion/svnlook/svnlook.1
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnlook/svnlook.1?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnlook/svnlook.1 (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnlook/svnlook.1 Tue Aug 10 17:03:06 2010
@@ -1,3 +1,23 @@
+.\"
+.\"
+.\" Licensed to the Apache Software Foundation (ASF) under one
+.\" or more contributor license agreements. See the NOTICE file
+.\" distributed with this work for additional information
+.\" regarding copyright ownership. The ASF licenses this file
+.\" to you under the Apache License, Version 2.0 (the
+.\" "License"); you may not use this file except in compliance
+.\" with the License. You may obtain a copy of the License at
+.\"
+.\" http://www.apache.org/licenses/LICENSE-2.0
+.\"
+.\" Unless required by applicable law or agreed to in writing,
+.\" software distributed under the License is distributed on an
+.\" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.\" KIND, either express or implied. See the License for the
+.\" specific language governing permissions and limitations
+.\" under the License.
+.\"
+.\"
.\" You can view this file with:
.\" nroff -man [filename]
.\"
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/cyrus_auth.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/cyrus_auth.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* sasl_auth.c : Functions for SASL-based authentication
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/log-escape.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/log-escape.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/log-escape.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/log-escape.c Tue Aug 10 17:03:06 2010
@@ -19,10 +19,10 @@
* limitations under the License.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/main.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/main.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/main.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* main.c : Main control function for svnserve
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -778,6 +778,20 @@ int main(int argc, const char *argv[])
return svn_cmdline_handle_exit_error(err, pool, "svnserve: ");
}
+ /* Enable TCP keep-alives on the socket so we time out when
+ * the connection breaks due to network-layer problems.
+ * If the peer has dropped the connection due to a network partition
+ * or a crash, or if the peer no longer considers the connection
+ * valid because we are behind a NAT and our public IP has changed,
+ * it will respond to the keep-alive probe with a RST instead of an
+ * acknowledgment segment, which will cause svn to abort the session
+ * even while it is currently blocked waiting for data from the peer. */
+ status = apr_socket_opt_set(usock, APR_SO_KEEPALIVE, 1);
+ if (status)
+ {
+ /* It's not a fatal error if we cannot enable keep-alives. */
+ }
+
conn = svn_ra_svn_create_conn(usock, NULL, NULL, connection_pool);
if (run_mode == run_mode_listen_once)
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/serve.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/serve.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/serve.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* serve.c : Functions for serving the Subversion protocol
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -1818,7 +1818,7 @@ static svn_error_t *log_receiver(void *b
SVN_ERR(svn_ra_svn_write_tuple(
conn, pool, "cw(?cr)(cbb)",
path,
- action,
+ action,
change->copyfrom_path,
change->copyfrom_rev,
svn_node_kind_to_word(change->node_kind),
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/server.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/server.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/server.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* svn_server.h : declarations for the svn server
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.8
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.8?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.8 (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.8 Tue Aug 10 17:03:06 2010
@@ -1,3 +1,23 @@
+.\"
+.\"
+.\" Licensed to the Apache Software Foundation (ASF) under one
+.\" or more contributor license agreements. See the NOTICE file
+.\" distributed with this work for additional information
+.\" regarding copyright ownership. The ASF licenses this file
+.\" to you under the Apache License, Version 2.0 (the
+.\" "License"); you may not use this file except in compliance
+.\" with the License. You may obtain a copy of the License at
+.\"
+.\" http://www.apache.org/licenses/LICENSE-2.0
+.\"
+.\" Unless required by applicable law or agreed to in writing,
+.\" software distributed under the License is distributed on an
+.\" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.\" KIND, either express or implied. See the License for the
+.\" specific language governing permissions and limitations
+.\" under the License.
+.\"
+.\"
.\" You can view this file with:
.\" nroff -man [filename]
.\"
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.conf.5
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.conf.5?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.conf.5 (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/svnserve.conf.5 Tue Aug 10 17:03:06 2010
@@ -1,3 +1,23 @@
+.\"
+.\"
+.\" Licensed to the Apache Software Foundation (ASF) under one
+.\" or more contributor license agreements. See the NOTICE file
+.\" distributed with this work for additional information
+.\" regarding copyright ownership. The ASF licenses this file
+.\" to you under the Apache License, Version 2.0 (the
+.\" "License"); you may not use this file except in compliance
+.\" with the License. You may obtain a copy of the License at
+.\"
+.\" http://www.apache.org/licenses/LICENSE-2.0
+.\"
+.\" Unless required by applicable law or agreed to in writing,
+.\" software distributed under the License is distributed on an
+.\" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.\" KIND, either express or implied. See the License for the
+.\" specific language governing permissions and limitations
+.\" under the License.
+.\"
+.\"
.\" You can view this file with:
.\" nroff -man [filename]
.\"
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* winservice.c : Implementation of Windows Service support
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnserve/winservice.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* winservice.h : Public definitions for Windows Service support
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnsync/main.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnsync/main.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnsync/main.c Tue Aug 10 17:03:06 2010
@@ -1,9 +1,9 @@
/*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -179,7 +179,7 @@ static const apr_getopt_option_t svnsync
" "
"For example:\n"
" "
- " servers:global:http-library=serf\n")},
+ " servers:global:http-library=serf")},
{"version", svnsync_opt_version, 0,
N_("show program version information")},
{"help", 'h', 0,
@@ -276,7 +276,8 @@ get_lock(svn_ra_session_t *session, apr_
subpool = svn_pool_create(pool);
- for (i = 0; i < 10; ++i)
+#define SVNSYNC_LOCK_RETRIES 10
+ for (i = 0; i < SVNSYNC_LOCK_RETRIES; ++i)
{
svn_pool_clear(subpool);
SVN_ERR(check_cancel(NULL));
@@ -299,8 +300,9 @@ get_lock(svn_ra_session_t *session, apr_
apr_sleep(apr_time_from_sec(1));
}
}
- else
+ else if (i < SVNSYNC_LOCK_RETRIES - 1)
{
+ /* Except in the very last iteration, try to set the lock. */
SVN_ERR(svn_ra_change_rev_prop(session, 0, SVNSYNC_PROP_LOCK,
mylocktoken, subpool));
}
@@ -749,7 +751,7 @@ do_initialize(svn_ra_session_t *to_sessi
consistent while allowing folks to see what the latest revision is. */
SVN_ERR(copy_revprops(from_session, to_session, latest, FALSE,
baton->quiet, &normalized_rev_props_count, pool));
-
+
SVN_ERR(log_properties_normalized(normalized_rev_props_count, 0, pool));
/* TODO: It would be nice if we could set the dest repos UUID to be
@@ -1651,7 +1653,7 @@ main(int argc, const char *argv[])
break;
case svnsync_opt_config_options:
if (!config_options)
- config_options =
+ config_options =
apr_array_make(pool, 1,
sizeof(svn_cmdline__config_argument_t*));
Modified: subversion/branches/ignore-mergeinfo/subversion/svnsync/svnsync.1
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnsync/svnsync.1?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnsync/svnsync.1 (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnsync/svnsync.1 Tue Aug 10 17:03:06 2010
@@ -1,3 +1,23 @@
+.\"
+.\"
+.\" Licensed to the Apache Software Foundation (ASF) under one
+.\" or more contributor license agreements. See the NOTICE file
+.\" distributed with this work for additional information
+.\" regarding copyright ownership. The ASF licenses this file
+.\" to you under the Apache License, Version 2.0 (the
+.\" "License"); you may not use this file except in compliance
+.\" with the License. You may obtain a copy of the License at
+.\"
+.\" http://www.apache.org/licenses/LICENSE-2.0
+.\"
+.\" Unless required by applicable law or agreed to in writing,
+.\" software distributed under the License is distributed on an
+.\" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.\" KIND, either express or implied. See the License for the
+.\" specific language governing permissions and limitations
+.\" under the License.
+.\"
+.\"
.\" You can view this file with:
.\" nroff -man [filename]
.\"
Modified: subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.c Tue Aug 10 17:03:06 2010
@@ -1,9 +1,9 @@
/*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnsync/sync.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* sync.h : The synchronization editor for svnsync.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnversion/main.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnversion/main.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnversion/main.c Tue Aug 10 17:03:06 2010
@@ -1,9 +1,9 @@
/*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/svnversion/svnversion.1
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svnversion/svnversion.1?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svnversion/svnversion.1 (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svnversion/svnversion.1 Tue Aug 10 17:03:06 2010
@@ -1,3 +1,23 @@
+.\"
+.\"
+.\" Licensed to the Apache Software Foundation (ASF) under one
+.\" or more contributor license agreements. See the NOTICE file
+.\" distributed with this work for additional information
+.\" regarding copyright ownership. The ASF licenses this file
+.\" to you under the Apache License, Version 2.0 (the
+.\" "License"); you may not use this file except in compliance
+.\" with the License. You may obtain a copy of the License at
+.\"
+.\" http://www.apache.org/licenses/LICENSE-2.0
+.\"
+.\" Unless required by applicable law or agreed to in writing,
+.\" software distributed under the License is distributed on an
+.\" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.\" KIND, either express or implied. See the License for the
+.\" specific language governing permissions and limitations
+.\" under the License.
+.\"
+.\"
.\" You can view this file with:
.\" nroff -man [filename]
.\"
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -866,29 +866,42 @@ def authz_access_required_at_repo_root(s
"authz issue #3242 - access required at repo root"
sbox.build(create_wc = False)
+ root_url = sbox.repo_url
- write_authz_file(sbox, {'/': '* =', '/A': 'jrandom = rw',
+ # Create a copy-level copy of A, just so we have something to work with.
+ svntest.main.run_svn(None, 'cp', '-m', 'logmsg',
+ root_url + '/A',
+ root_url + '/A-copy')
+
+ # Now we get all restrictive.
+ write_authz_file(sbox, {'/': '* =',
+ '/A': 'jrandom = rw',
'/A-copy': 'jrandom = rw'})
-
write_restrictive_svnserve_conf(sbox.repo_dir)
- root_url = sbox.repo_url
- A_url = root_url + '/A'
- A_copy_url = root_url + '/A-copy'
- B_url = root_url + '/A/B'
- B_copy_url = root_url + '/A/B-copy'
-
- # Should succeed
- svntest.main.run_svn(None, 'cp', A_url, A_copy_url, '-m', 'logmsg')
-
- # Should succeed
- svntest.main.run_svn(None, 'cp', B_url, B_copy_url, '-m', 'logmsg')
-
- # Should succeed
- svntest.main.run_svn(None, 'mv', A_url, A_copy_url, '-m', 'logmsg')
-
- # Should succeed
- svntest.main.run_svn(None, 'mv', B_url, B_copy_url, '-m', 'logmsg')
+ # Do some copies and moves where the common parents of the source(s)
+ # and destination(s) are unreadable. All we currently hope to support
+ # is the case where the sources are individually (and recursively)
+ # readable, and the destination tree is writable.
+
+ svntest.main.run_svn(None, 'cp',
+ '-m', 'copy in readable space',
+ root_url + '/A/B',
+ root_url + '/A/B-copy')
+ svntest.main.run_svn(None, 'cp',
+ '-m', 'copy across disjoint readable spaces',
+ root_url + '/A/B',
+ root_url + '/A-copy/B-copy')
+ svntest.main.run_svn(None, 'cp',
+ '-m', 'multi-copy across disjoint readable spaces',
+ root_url + '/A/B',
+ root_url + '/A/mu',
+ root_url + '/A-copy/C')
+ svntest.main.run_svn(None, 'cp',
+ '-m', 'copy from disjoint readable spaces',
+ root_url + '/A/B/E/alpha',
+ root_url + '/A-copy/B/E/beta',
+ root_url + '/A-copy/C')
########################################################################
# Run the tests
@@ -913,8 +926,8 @@ test_list = [ None,
svntest.main.is_ra_type_svn)),
XFail(Skip(authz_switch_to_directory,
svntest.main.is_ra_type_file)),
- XFail(Skip(authz_access_required_at_repo_root,
- svntest.main.is_ra_type_file)),
+ Skip(authz_access_required_at_repo_root,
+ svntest.main.is_ra_type_file),
]
if __name__ == '__main__':
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/autoprop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/autoprop_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/autoprop_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/autoprop_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -34,6 +34,7 @@ from svntest import wc
# (abbreviation)
Skip = svntest.testcase.Skip
XFail = svntest.testcase.XFail
+Wimp = svntest.testcase.Wimp
Item = wc.StateItem
######################################################################
@@ -198,9 +199,9 @@ def basic_update(sbox):
# path, are skipped and do not raise an error
xx_path = os.path.join(wc_dir, 'xx', 'xx')
exit_code, out, err = svntest.actions.run_and_verify_svn(
- "update xx/xx",
- ["Skipped '"+xx_path+"'\n",
- "Summary of conflicts:\n",
+ "update xx/xx",
+ ["Skipped '"+xx_path+"'\n",
+ "Summary of conflicts:\n",
" Skipped paths: 1\n"], [], 'update', xx_path)
exit_code, out, err = svntest.actions.run_and_verify_svn(
"update xx/xx", [], [],
@@ -210,7 +211,7 @@ def basic_update(sbox):
urls = ('http://localhost/a/b/c', 'http://localhost', 'svn://localhost')
for url in urls:
exit_code, out, err = svntest.actions.run_and_verify_svn(
- "update " + url,
+ "update " + url,
["Skipped '"+url+"'\n",
"Summary of conflicts:\n",
" Skipped paths: 1\n"], [],
@@ -325,6 +326,15 @@ def basic_mkdir_wc_with_parents(sbox):
svntest.actions.run_and_verify_svn("mkdir dir/subdir", None, [],
'mkdir', '--parents', Y_Z_path)
+ # Verify the WC status, because there was a regression in which parts of
+ # the WC were left locked.
+ expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+ expected_status.add({
+ 'Y' : Item(status='A ', wc_rev=0),
+ 'Y/Z' : Item(status='A ', wc_rev=0),
+ })
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
#----------------------------------------------------------------------
def basic_corruption(sbox):
@@ -1854,17 +1864,17 @@ def delete_keep_local(sbox):
def delete_keep_local_twice(sbox):
'delete file and directory with --keep-local twice'
-
+
sbox.build()
wc_dir = sbox.wc_dir
-
+
dir = os.path.join(wc_dir, 'dir')
-
+
svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', dir)
-
+
svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--keep-local', dir)
svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--keep-local', dir)
-
+
if not os.path.isdir(dir):
print('Directory was really deleted')
raise svntest.Failure
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/changelist_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/changelist_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/changelist_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/changelist_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -961,7 +961,7 @@ def tree_conflicts_and_changelists_on_co
expected_error,
wc_dir)
- # Now try to commit with a changelist, not letting the
+ # Now try to commit with a changelist, not letting the
# tree-conflict get in the way.
svntest.main.file_append(iota, "More stuff in iota")
svntest.main.run_svn(None, "changelist", "list", iota)
@@ -971,7 +971,7 @@ def tree_conflicts_and_changelists_on_co
})
expected_status.tweak('iota', wc_rev=3, status=' ')
-
+
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
@@ -1044,7 +1044,7 @@ def tree_conflicts_and_changelists_on_co
expected_error,
wc_dir)
- # Now try to commit with a changelist, not letting the
+ # Now try to commit with a changelist, not letting the
# tree-conflict get in the way.
svntest.main.file_append(iota, "More stuff in iota")
svntest.main.run_svn(None, "changelist", "list", iota)
@@ -1054,7 +1054,7 @@ def tree_conflicts_and_changelists_on_co
})
expected_status.tweak('iota', wc_rev=3, status=' ')
-
+
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
@@ -1120,7 +1120,7 @@ def move_added_keeps_changelist(sbox):
]
svntest.actions.run_and_verify_info(expected_infos, kappa2_path)
-
+
########################################################################
# Run the tests
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/checkout_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/checkout_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/checkout_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/checkout_tests.py Tue Aug 10 17:03:06 2010
@@ -7,10 +7,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/commit_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/commit_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -1404,13 +1404,13 @@ def commit_multiple_wc_nested(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
svntest.actions.run_and_verify_status(wc2_dir, expected_status2)
-# Same as commit_multiple_wc_nested except that the two WCs are not nested.
+# Same as commit_multiple_wc_nested except that the two WCs are not nested.
def commit_multiple_wc(sbox):
"commit from two working copies"
sbox.build()
wc_dir = sbox.wc_dir
-
+
# Cleanup original wc
svntest.sandbox._cleanup_test_path(wc_dir)
@@ -1465,7 +1465,7 @@ def commit_multiple_wc_multiple_repos(sb
# Create another repository
repo2, url2 = sbox.add_repo_path("repo2")
svntest.main.copy_repos(sbox.repo_dir, repo2, 1, 1)
-
+
# Cleanup original wc
svntest.sandbox._cleanup_test_path(wc_dir)
@@ -1504,7 +1504,7 @@ def commit_multiple_wc_multiple_repos(sb
# Verify status unchanged
svntest.actions.run_and_verify_status(wc1_dir, expected_status1)
svntest.actions.run_and_verify_status(wc2_dir, expected_status2)
-
+
#----------------------------------------------------------------------
def commit_nonrecursive(sbox):
@@ -2062,28 +2062,6 @@ def local_mods_are_not_commits(sbox):
os.path.join(wc_dir, 'A', 'mu'),
os.path.join(wc_dir, 'A', 'yu'))
-# Helper for hook tests: returns the "hook failed" line, with precise
-# wording that changed with Subversion 1.5.
-def hook_failure_message(hookname):
- if svntest.main.server_minor_version < 5:
- return "'%s' hook failed with error output:\n" % hookname
- else:
- if hookname in ["start-commit", "pre-commit"]:
- action = "Commit"
- elif hookname == "pre-revprop-change":
- action = "Revprop change"
- elif hookname == "pre-lock":
- action = "Lock"
- elif hookname == "pre-unlock":
- action = "Unlock"
- else:
- action = None
- if action is None:
- message = "%s hook failed (exit code 1)" % (hookname,)
- else:
- message = "%s blocked by %s hook (exit code 1)" % (action, hookname)
- return message + " with output:\n"
-
#----------------------------------------------------------------------
# Test if the post-commit error message is returned back to the svn
@@ -2098,8 +2076,10 @@ def post_commit_hook_test(sbox):
wc_dir = sbox.wc_dir
repo_dir = sbox.repo_dir
- # Disable commits
- svntest.actions.create_failing_post_commit_hook(repo_dir)
+ # Create a hook that outputs a message to stderr and returns exit code 1
+ # Include a non-XML-safe message to regression-test issue #3553.
+ error_msg = "Text with <angle brackets> & ampersand"
+ svntest.actions.create_failing_hook(repo_dir, "post-commit", error_msg)
# Modify iota just so there is something to commit.
iota_path = os.path.join(wc_dir, "iota")
@@ -2112,8 +2092,9 @@ def post_commit_hook_test(sbox):
"Transmitting file data .\n",
"Committed revision 2.\n",
"\n",
- "Warning: " + hook_failure_message('post-commit'),
- "Post-commit hook failed\n",
+ "Warning: " +
+ svntest.actions.hook_failure_message('post-commit'),
+ error_msg + "\n",
]
svntest.actions.run_and_verify_svn(None, expected_output, [],
@@ -2464,13 +2445,9 @@ def start_commit_hook_test(sbox):
repo_dir = sbox.repo_dir
# Create a hook that outputs a message to stderr and returns exit code 1
- hook_code = """import sys
-sys.stderr.write("Start-commit hook failed")
-sys.exit(1)"""
-
- # Setup the hook configs to log data to a file
- start_commit_hook = svntest.main.get_start_commit_hook_path(repo_dir)
- svntest.main.create_python_hook_script(start_commit_hook, hook_code)
+ # Include a non-XML-safe message to regression-test issue #3553.
+ error_msg = "Text with <angle brackets> & ampersand"
+ svntest.actions.create_failing_hook(repo_dir, "start-commit", error_msg)
# Modify iota just so there is something to commit.
iota_path = os.path.join(wc_dir, "iota")
@@ -2488,8 +2465,9 @@ sys.exit(1)"""
# contain source code file and line numbers.
if len(actual_stderr) > 2:
actual_stderr = actual_stderr[-2:]
- expected_stderr = [ "svn: " + hook_failure_message('start-commit'),
- "Start-commit hook failed\n"
+ expected_stderr = [ "svn: " +
+ svntest.actions.hook_failure_message('start-commit'),
+ error_msg + "\n",
]
svntest.verify.compare_and_display_lines('Start-commit hook test',
'STDERR',
@@ -2507,13 +2485,9 @@ def pre_commit_hook_test(sbox):
repo_dir = sbox.repo_dir
# Create a hook that outputs a message to stderr and returns exit code 1
- hook_code = """import sys
-sys.stderr.write("Pre-commit hook failed")
-sys.exit(1)"""
-
- # Setup the hook configs to log data to a file
- pre_commit_hook = svntest.main.get_pre_commit_hook_path(repo_dir)
- svntest.main.create_python_hook_script(pre_commit_hook, hook_code)
+ # Include a non-XML-safe message to regression-test issue #3553.
+ error_msg = "Text with <angle brackets> & ampersand"
+ svntest.actions.create_failing_hook(repo_dir, "pre-commit", error_msg)
# Modify iota just so there is something to commit.
iota_path = os.path.join(wc_dir, "iota")
@@ -2531,8 +2505,9 @@ sys.exit(1)"""
# contain source code file and line numbers.
if len(actual_stderr) > 2:
actual_stderr = actual_stderr[-2:]
- expected_stderr = [ "svn: " + hook_failure_message('pre-commit'),
- "Pre-commit hook failed\n"
+ expected_stderr = [ "svn: " +
+ svntest.actions.hook_failure_message('pre-commit'),
+ error_msg + "\n",
]
svntest.verify.compare_and_display_lines('Pre-commit hook test',
'STDERR',
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -4125,22 +4125,146 @@ def path_copy_in_repo_2475(sbox):
def commit_copy_depth_empty(sbox):
"copy a wcdir, then commit it with --depth empty"
sbox.build()
-
+
a = os.path.join(sbox.wc_dir, 'A')
new_a = os.path.join(sbox.wc_dir, 'new_A')
svntest.actions.run_and_verify_svn(None, None, [],
'cp', a, new_a)
- ### svn: Commit succeeded, but other errors follow:
- ### svn: Error bumping revisions post-commit (details follow):
- ### svn: Unable to lock '<snip>\new_A\B'
-
- # Then the working copy is locked and can't be unlocked with svn cleanup.
svntest.actions.run_and_verify_svn(None, None, [], 'ci',
new_a, '--depth', 'empty',
'-m', 'Copied directory')
+def copy_below_copy(sbox):
+ "copy a dir below a copied dir"
+ sbox.build()
+
+ A = os.path.join(sbox.wc_dir, 'A')
+ new_A = os.path.join(sbox.wc_dir, 'new_A')
+ new_A_D = os.path.join(new_A, 'D')
+ new_A_new_D = os.path.join(new_A, 'new_D')
+ new_A_mu = os.path.join(new_A, 'mu')
+ new_A_new_mu = os.path.join(new_A, 'new_mu')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'cp', A, new_A)
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'cp', new_A_D, new_A_new_D)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'cp', new_A_mu, new_A_new_mu)
+
+ expected_output = svntest.wc.State(sbox.wc_dir, {
+ 'new_A' : Item(verb='Adding'),
+ 'new_A/new_D' : Item(verb='Adding'),
+ 'new_A/new_mu' : Item(verb='Adding'),
+ })
+ expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+
+ expected_status.add({
+ 'new_A' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/gamma' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G/pi' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G/rho' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G/tau' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H/chi' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H/omega': Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H/psi' : Item(status=' ', wc_rev='2'),
+ 'new_A/D' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/H' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/H/chi' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/H/omega' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/H/psi' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/G' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/G/rho' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/G/pi' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/G/tau' : Item(status=' ', wc_rev='2'),
+ 'new_A/D/gamma' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_mu' : Item(status=' ', wc_rev='2'),
+ 'new_A/B' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/E' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/E/alpha' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/E/beta' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/F' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/lambda' : Item(status=' ', wc_rev='2'),
+ 'new_A/C' : Item(status=' ', wc_rev='2'),
+ 'new_A/mu' : Item(status=' ', wc_rev='2'),
+ })
+
+ svntest.actions.run_and_verify_commit(sbox.wc_dir,
+ expected_output,
+ expected_status,
+ None, sbox.wc_dir)
+
+def move_below_move(sbox):
+ "move a dir below a moved dir"
+ sbox.build()
+ "copy a dir below a copied dir"
+ sbox.build()
+
+ A = os.path.join(sbox.wc_dir, 'A')
+ new_A = os.path.join(sbox.wc_dir, 'new_A')
+ new_A_D = os.path.join(new_A, 'D')
+ new_A_new_D = os.path.join(new_A, 'new_D')
+ new_A_mu = os.path.join(new_A, 'mu')
+ new_A_new_mu = os.path.join(new_A, 'new_mu')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'cp', A, new_A)
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mv', new_A_D, new_A_new_D)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mv', new_A_mu, new_A_new_mu)
+
+ # ### It could be that we miss a Deleting here.
+ expected_output = svntest.wc.State(sbox.wc_dir, {
+ 'A' : Item(verb='Deleting'),
+ 'new_A' : Item(verb='Adding'),
+ 'new_A/new_D' : Item(verb='Adding'),
+ 'new_A/new_mu' : Item(verb='Adding'),
+ })
+ expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+
+ expected_status.add({
+ 'new_A' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/gamma' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G/pi' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G/rho' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/G/tau' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H/chi' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H/omega': Item(status=' ', wc_rev='2'),
+ 'new_A/new_D/H/psi' : Item(status=' ', wc_rev='2'),
+ 'new_A/new_mu' : Item(status=' ', wc_rev='2'),
+ 'new_A/B' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/E' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/E/alpha' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/E/beta' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/F' : Item(status=' ', wc_rev='2'),
+ 'new_A/B/lambda' : Item(status=' ', wc_rev='2'),
+ 'new_A/C' : Item(status=' ', wc_rev='2'),
+ })
+
+ # ### This remove block is untested, because the commit fails with an
+ # ### assertion on trunk (BH: 2009-11-01
+ expected_status.remove('A', 'A/D', 'A/D/gamma', 'A/D/G', 'A/D/G/pi',
+ 'A/D/G/rho', 'A/D/G/tau', 'A/D/H', 'A/D/H/chi',
+ 'A/D/H/omega', 'A/D/H/psi', 'A/B', 'A/B/E',
+ 'A/B/E/alpha', 'A/B/E/beta', 'A/B/F', 'A/B/lambda',
+ 'A/C', 'A/mu')
+
+ svntest.actions.run_and_verify_commit(sbox.wc_dir,
+ expected_output,
+ expected_status,
+ None, sbox.wc_dir)
+
########################################################################
# Run the tests
@@ -4226,7 +4350,9 @@ test_list = [ None,
find_copyfrom_information_upstairs,
path_move_and_copy_between_wcs_2475,
path_copy_in_repo_2475,
- XFail(commit_copy_depth_empty)
+ commit_copy_depth_empty,
+ copy_below_copy,
+ XFail(move_below_move)
]
if __name__ == '__main__':
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/davautocheck.sh?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/davautocheck.sh Tue Aug 10 17:03:06 2010
@@ -1,4 +1,24 @@
#!/bin/bash
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
# -*- mode: shell-script; -*-
# $Id$
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py Tue Aug 10 17:03:06 2010
@@ -8,10 +8,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -28,6 +28,7 @@
# General modules
import os
+import re
# Our testing module
import svntest
@@ -2056,6 +2057,7 @@ def excluded_path_update_operation(sbox)
B_path = os.path.join(A_path, 'B')
L_path = os.path.join(A_path, 'L')
E_path = os.path.join(B_path, 'E')
+ iota_path = os.path.join(wc_dir, 'iota')
# Simply exclude a subtree
expected_output = svntest.wc.State(wc_dir, {
@@ -2131,6 +2133,38 @@ def excluded_path_update_operation(sbox)
None, None, None, None,
B_path)
+ # Test issue #
+ # Exclude a file then set depth of WC to infinity, the file should return.
+ expected_output = svntest.wc.State(wc_dir, {
+ 'iota' : Item(status='D '),
+ })
+ expected_status.remove('iota');
+ expected_disk.remove('iota');
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None,
+ None, None, None, None,
+ '--set-depth', 'exclude', iota_path)
+
+ # Update the whole WC to depth=infinity.
+ expected_output = svntest.wc.State(wc_dir, {
+ 'iota' : Item(status='A '),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_disk = svntest.main.greek_state.copy()
+ # This update currently fails when iota is reported as added, but shows in
+ # status as unversioned. See issue #3544 'svn update does not restore
+ # excluded files'. This test is marked as XFail until that issue is fixed.
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None,
+ None, None, None, None,
+ '--set-depth', 'infinity', wc_dir)
+
def excluded_path_misc_operation(sbox):
"""make sure other subcommands handle exclude"""
@@ -2296,10 +2330,10 @@ def info_excluded(sbox):
# D A
# % svn info A
# A: (Not a versioned resource)
- #
+ #
# ..\..\..\subversion\svn\info-cmd.c:562: (apr_err=200000)
# svn: A problem occurred; see other errors for details
- #
+ #
# It should acknowledge the existence (in the repos) of ./A and print some
# info about it, like it does if '--set-depth empty' is used instead.
@@ -2309,7 +2343,6 @@ def info_excluded(sbox):
A_path = os.path.join(wc_dir, 'A')
svntest.main.run_svn(None, 'up', '--set-depth', 'exclude', A_path)
- import re
expected_info = {
'Path' : re.escape(A_path),
'Repository Root' : sbox.repo_url,
@@ -2469,6 +2502,161 @@ def tree_conflicts_resolved_depth_infini
svntest.actions.run_and_verify_resolved([m, B, g], '--depth=infinity', A)
+def update_excluded_path_sticky_depths(sbox):
+ """set-depth from excluded to all other depths"""
+
+ ign_a, ign_b, ign_c, wc_dir = set_up_depthy_working_copies(sbox,
+ infinity=True)
+ A_path = os.path.join(wc_dir, 'A')
+ B_path = os.path.join(A_path, 'B')
+
+ # Exclude the subtree 'A/B'
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B' : Item(status='D '),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.remove('A/B/lambda', 'A/B/E/alpha', 'A/B/E/beta', 'A/B/E',
+ 'A/B/F', 'A/B')
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.remove('A/B/lambda', 'A/B/E/alpha', 'A/B/E/beta', 'A/B/E',
+ 'A/B/F', 'A/B')
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None,
+ None, None, None, None,
+ '--set-depth', 'exclude', B_path)
+
+ # Update to depth 'empty' for the excluded path A/B
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B' : Item(status='A '),
+ })
+ expected_status.add({
+ 'A/B' : Item(status=' ', wc_rev=1)
+ })
+ expected_disk.add({
+ 'A/B' : Item(contents=None),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None,
+ None, None, None, None,
+ '--set-depth', 'empty', B_path)
+ verify_depth(None, "empty", B_path)
+ expected_info = {
+ 'Path' : re.escape(B_path),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : svntest.actions.get_wc_uuid(wc_dir),
+ 'Depth' : 'empty',
+ }
+ svntest.actions.run_and_verify_info([expected_info], B_path)
+
+ # Exclude A/B again
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'up', '--set-depth', 'exclude', B_path)
+
+ # Update to depth 'files' for the excluded path A/B
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B' : Item(status='A '),
+ 'A/B/lambda' : Item(status='A '),
+ })
+ expected_status.add({
+ 'A/B' : Item(status=' ', wc_rev=1),
+ 'A/B/lambda' : Item(status=' ', wc_rev=1),
+ })
+ expected_disk.add({
+ 'A/B' : Item(contents=None),
+ 'A/B/lambda' : Item(contents="This is the file 'lambda'.\n"),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None,
+ None, None, None, None,
+ '--set-depth', 'files', B_path)
+ verify_depth(None, "files", B_path)
+ expected_info = {
+ 'Path' : re.escape(B_path),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : svntest.actions.get_wc_uuid(wc_dir),
+ 'Depth' : 'files',
+ }
+ svntest.actions.run_and_verify_info([expected_info], B_path)
+
+ # Exclude A/B again
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'up', '--set-depth', 'exclude', B_path)
+
+ # Update to depth 'immediates' for the excluded path A/B
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B' : Item(status='A '),
+ 'A/B/lambda' : Item(status='A '),
+ 'A/B/E' : Item(status='A '),
+ 'A/B/F' : Item(status='A '),
+ })
+ expected_status.add({
+ 'A/B' : Item(status=' ', wc_rev=1),
+ 'A/B/lambda' : Item(status=' ', wc_rev=1),
+ 'A/B/E' : Item(status=' ', wc_rev=1),
+ 'A/B/F' : Item(status=' ', wc_rev=1),
+ })
+ expected_disk.add({
+ 'A/B' : Item(contents=None),
+ 'A/B/lambda' : Item(contents="This is the file 'lambda'.\n"),
+ 'A/B/E' : Item(contents=None),
+ 'A/B/F' : Item(contents=None),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None,
+ None, None, None, None,
+ '--set-depth', 'immediates', B_path)
+ verify_depth(None, "immediates", B_path)
+ expected_info = {
+ 'Path' : re.escape(B_path),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : svntest.actions.get_wc_uuid(wc_dir),
+ 'Depth' : 'immediates',
+ }
+ svntest.actions.run_and_verify_info([expected_info], B_path)
+
+ # Exclude A/B again
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'up', '--set-depth', 'exclude', B_path)
+
+ # Update to depth 'infinity' for the excluded path A/B
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B' : Item(status='A '),
+ 'A/B/lambda' : Item(status='A '),
+ 'A/B/E' : Item(status='A '),
+ 'A/B/E/beta' : Item(status='A '),
+ 'A/B/E/alpha' : Item(status='A '),
+ 'A/B/F' : Item(status='A '),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_disk = svntest.main.greek_state.copy()
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None,
+ None, None, None, None,
+ '--set-depth', 'infinity', B_path)
+ verify_depth(None, "infinity", B_path)
+ expected_info = {
+ 'Path' : re.escape(B_path),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : svntest.actions.get_wc_uuid(wc_dir),
+ # 'Depth' value is absent for 'infinity'
+ }
+ svntest.actions.run_and_verify_info([expected_info], B_path)
#----------------------------------------------------------------------
# list all tests here, starting with None:
@@ -2504,7 +2692,7 @@ test_list = [ None,
pull_in_tree_with_depth_option,
fold_tree_with_unversioned_modified_items,
depth_empty_update_on_file,
- excluded_path_update_operation,
+ XFail(excluded_path_update_operation),
excluded_path_misc_operation,
excluded_receive_remote_removal,
exclude_keeps_hidden_entries,
@@ -2513,6 +2701,7 @@ test_list = [ None,
tree_conflicts_resolved_depth_files,
tree_conflicts_resolved_depth_immediates,
tree_conflicts_resolved_depth_infinity,
+ update_excluded_path_sticky_depths,
]
if __name__ == "__main__":
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py Tue Aug 10 17:03:06 2010
@@ -7,10 +7,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -1476,7 +1476,7 @@ def diff_renamed_file(sbox):
'M') :
raise svntest.Failure
- # Repos->WC diff of the file ignoring copyfrom
+ # Repos->WC diff of the file showing copies as adds
exit_code, diff_output, err_output = svntest.main.run_svn(
None, 'diff', '-r', '1',
'--show-copies-as-adds', pi2_path)
@@ -1487,7 +1487,7 @@ def diff_renamed_file(sbox):
svntest.main.file_append(pi2_path, "new pi")
- # Repos->WC of the directory
+ # Repos->WC of the containing directory
exit_code, diff_output, err_output = svntest.main.run_svn(
None, 'diff', '-r', '1', os.path.join('A', 'D'))
@@ -1501,15 +1501,15 @@ def diff_renamed_file(sbox):
'M') :
raise svntest.Failure
- # Repos->WC of the directory ignoring copyfrom
+ # Repos->WC of the containing directory showing copies as adds
exit_code, diff_output, err_output = svntest.main.run_svn(
None, 'diff', '-r', '1', '--show-copies-as-adds', os.path.join('A', 'D'))
-
+
if check_diff_output(diff_output,
pi_path,
'D') :
raise svntest.Failure
-
+
if check_diff_output(diff_output,
pi2_path,
'A') :
@@ -1523,7 +1523,7 @@ def diff_renamed_file(sbox):
'M') :
raise svntest.Failure
- # WC->WC of the file ignoring copyfrom
+ # WC->WC of the file showing copies as adds
exit_code, diff_output, err_output = svntest.main.run_svn(
None, 'diff',
'--show-copies-as-adds', pi2_path)
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries-dump.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries-dump.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* db-test.c : test the wc_db subsystem
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -41,7 +41,7 @@ str_value(const char *name, const char *
else
printf("e.%s = '%s'\n", name, value);
}
-
+
static void
int_value(const char *name, long int value)
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -251,7 +251,7 @@ def deletion_details(sbox):
validate(entries['alpha'], schedule=SCHEDULE_DELETE)
validate(entries['chi'], schedule=SCHEDULE_NORMAL, copied=True)
-
+
########################################################################
Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Licensed to the Subversion Corporation (SVN Corp.) under one
+# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
-# regarding copyright ownership. The SVN Corp. licenses this file
+# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@@ -399,11 +399,90 @@ def export_HEADplus1_fails(sbox):
"export -r {HEAD+1} fails"
sbox.build(create_wc = False, read_only = True)
-
+
svntest.actions.run_and_verify_svn(None, None, '.*No such revision.*',
'export', sbox.repo_url, sbox.wc_dir,
'-r', 38956)
+def export_to_explicit_cwd(sbox):
+ "export a single file to '.'"
+ sbox.build(create_wc = False, read_only = True)
+
+ svntest.main.safe_rmtree(sbox.wc_dir)
+ expected_output = svntest.tree.build_generic_tree([
+ Item(status='A ').as_node_tuple('iota'),
+ ]).as_state()
+ expected_disk = svntest.tree.build_generic_tree([
+ Item(contents="This is the file 'iota'.\n").as_node_tuple('iota'),
+ ]).as_state()
+
+ os.mkdir(sbox.wc_dir)
+ os.chdir(sbox.wc_dir)
+ svntest.actions.run_and_verify_export(sbox.repo_url + '/iota',
+ '.', expected_output,
+ expected_disk)
+
+def export_ignoring_keyword_translation(sbox):
+ "export ignoring keyword translation"
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+
+ # Add a keyword to A/mu and set the svn:keywords property
+ # appropriately to make sure it's not translated during
+ # the export operation
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+ svntest.main.file_append(mu_path, '$LastChangedRevision$')
+ svntest.main.run_svn(None, 'ps', 'svn:keywords',
+ 'LastChangedRevision', mu_path)
+ svntest.main.run_svn(None, 'ci',
+ '-m', 'Added keyword to mu', mu_path)
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.tweak('A/mu',
+ contents=expected_disk.desc['A/mu'].contents +
+ '$LastChangedRevision$')
+
+ export_target = sbox.add_wc_path('export')
+
+ expected_output = svntest.main.greek_state.copy()
+ expected_output.wc_dir = export_target
+ expected_output.desc[''] = Item()
+ expected_output.tweak(contents=None, status='A ')
+
+ svntest.actions.run_and_verify_export(sbox.repo_url,
+ export_target,
+ expected_output,
+ expected_disk,
+ "--ignore-keywords")
+
+def export_working_copy_ignoring_keyword_translation(sbox):
+ "export working copy ignoring keyword translation"
+ sbox.build(read_only = True)
+
+ wc_dir = sbox.wc_dir
+
+ # Add a keyword to A/mu and set the svn:keywords property
+ # appropriately to make sure it's not translated during
+ # the export operation
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+ svntest.main.file_append(mu_path, '$LastChangedRevision$')
+ svntest.main.run_svn(None, 'ps', 'svn:keywords',
+ 'LastChangedRevision', mu_path)
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.tweak('A/mu',
+ contents=expected_disk.desc['A/mu'].contents +
+ '$LastChangedRevision$')
+
+ export_target = sbox.add_wc_path('export')
+
+ svntest.actions.run_and_verify_export(wc_dir,
+ export_target,
+ svntest.wc.State(sbox.wc_dir, {}),
+ expected_disk,
+ "--ignore-keywords")
+
########################################################################
# Run the tests
@@ -427,6 +506,9 @@ test_list = [ None,
export_with_state_deleted,
export_creates_intermediate_folders,
export_HEADplus1_fails,
+ export_to_explicit_cwd,
+ export_ignoring_keyword_translation,
+ export_working_copy_ignoring_keyword_translation,
]
if __name__ == '__main__':