You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2010/03/16 19:03:41 UTC
svn commit: r923910 [8/9] - in /subversion/branches/1.6.x-issue3432: ./
build/ build/ac-macros/ build/generator/ contrib/cgi/
contrib/client-side/emacs/ contrib/client-side/svn_load_dirs/
contrib/hook-scripts/ contrib/server-side/ doc/user/ notes/ pack...
Modified: subversion/branches/1.6.x-issue3432/subversion/po/zh_CN.po
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/po/zh_CN.po?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/po/zh_CN.po [UTF-8] (original)
+++ subversion/branches/1.6.x-issue3432/subversion/po/zh_CN.po [UTF-8] Tue Mar 16 18:03:37 2010
@@ -37,8 +37,8 @@ msgid ""
msgstr ""
"Project-Id-Version: subversion 1.6\n"
"Report-Msgid-Bugs-To: dev@subversion.tigris.org\n"
-"POT-Creation-Date: 2009-06-18 11:25+0800\n"
-"PO-Revision-Date: 2009-06-18 11:27+0800\n"
+"POT-Creation-Date: 2009-12-07 10:00+0800\n"
+"PO-Revision-Date: 2009-12-07 10:04+0800\n"
"Last-Translator: Subversion Developers <de...@subversion.tigris.org>\n"
"Language-Team: Simplified Chinese <de...@subversion.tigris.org>\n"
"MIME-Version: 1.0\n"
@@ -847,6 +847,9 @@ msgstr "没有外部合并工具可用"
msgid "Assertion failure"
msgstr "断言失败"
+msgid "GNOME Keyring is locked and we are non-interactive"
+msgstr "GNOME Keyring 被锁定,并且我们处于非交互方式"
+
#, c-format
msgid "Can't close directory '%s'"
msgstr "无法关闭目录 “%s”"
@@ -1498,6 +1501,12 @@ msgstr "URL “%s” 不是版本库根
msgid "Compression of svndiff data failed"
msgstr "压缩 svndiff 数据失败"
+msgid "Decompression of svndiff data failed: no size"
+msgstr "解压 svndiff 数据失败: 没有长度"
+
+msgid "Decompression of svndiff data failed: size too large"
+msgstr "解压 svndiff 数据失败: 长度太大"
+
msgid "Decompression of svndiff data failed"
msgstr "解压 svndiff 数据失败"
@@ -1509,8 +1518,8 @@ msgid "Invalid diff stream: insn %d cann
msgstr "无效的差异流: insn %d 不能解码"
#, c-format
-msgid "Invalid diff stream: insn %d has non-positive length"
-msgstr "无效的差异流: insn %d 出现非正长度"
+msgid "Invalid diff stream: insn %d has length zero"
+msgstr "无效的差异流: insn %d 出现 0 长度"
#, c-format
msgid "Invalid diff stream: insn %d overflows the target view"
@@ -1538,6 +1547,9 @@ msgstr "Delta 没有包含足够新数� msgid "Svndiff has invalid header"
msgstr "Svndiff 数据包含无效头"
+msgid "Svndiff contains a too-large window"
+msgstr "Svndiff 数据包含太大的窗口"
+
msgid "Svndiff contains corrupt window header"
msgstr "Svndiff 数据包含无效窗口"
@@ -3219,6 +3231,9 @@ msgstr "服务器不支持重放范围� msgid "Expected 'revprops', found '%s'"
msgstr "期望“revprops”,发现“%s”"
+msgid "Error while replaying commit"
+msgstr "重演提交操作错误"
+
msgid "'get-deleted-rev' not implemented"
msgstr "未实现 “get-deleted-rev”"
@@ -4228,7 +4243,7 @@ msgstr "空合并信息\n"
#, c-format
msgid "Can't convert string to UCS-2: '%s'"
-msgstr "不能把字符串转换为UCS-2: “%s”。"
+msgstr "不能把字符串转换为 UCS-2: “%s”。"
msgid "Can't get module file name"
msgstr "无法获取模块文件名"
@@ -4259,6 +4274,10 @@ msgid "'%s' is not a valid Subversion pr
msgstr "“%s”不是有效的 Subversion 属性名称"
#, c-format
+msgid "'%s' is just a peg revision. Maybe try '%s@' instead?"
+msgstr "“%s” 是 peg 版本。或许你应该使用 “%s@” ?"
+
+#, c-format
msgid "URL '%s' is not properly URI-encoded"
msgstr "URL“%s”不是正确的URI编码"
@@ -4381,6 +4400,7 @@ msgstr "保存未加密的密码(yes/no)
#, c-format
msgid ""
+"\n"
"-----------------------------------------------------------------------\n"
"ATTENTION! Your password for authentication realm:\n"
"\n"
@@ -4395,6 +4415,7 @@ msgid ""
"'%s'.\n"
"-----------------------------------------------------------------------\n"
msgstr ""
+"\n"
"-----------------------------------------------------------------------\n"
"注意! 你的密码,对于认证域:\n"
"\n"
@@ -4412,6 +4433,7 @@ msgstr "保存未加密的密码(yes/no)
#, c-format
msgid ""
+"\n"
"-----------------------------------------------------------------------\n"
"ATTENTION! Your passphrase for client certificate:\n"
"\n"
@@ -4426,6 +4448,7 @@ msgid ""
"'no' in '%s'.\n"
"-----------------------------------------------------------------------\n"
msgstr ""
+"\n"
"-----------------------------------------------------------------------\n"
"注意! 你的客户端证书密码:\n"
"\n"
@@ -4659,6 +4682,11 @@ msgid "Invalid 'conflict_result' argumen
msgstr "无效的 “conflict_result” 参数"
#, c-format
+msgid ""
+"Tree conflicts can only be resolved to 'working' state; '%s' not resolved"
+msgstr "树冲突只能解决为 “working” 状态;“%s” 还没有解决"
+
+#, c-format
msgid "'%s' is a directory, and thus cannot be a member of a changelist"
msgstr "“%s” 是目录,因此不能是修改列表的成员"
@@ -5131,21 +5159,27 @@ msgstr "无效属性 %s 位于 “%s”:
#, c-format
msgid ""
+"The path '%s' appears to be part of a Subversion 1.7 or greater\n"
+"working copy rooted at '%s'.\n"
+"Please upgrade your Subversion client to use this working copy."
+msgstr ""
+"路径 '%s' 好像是 Subversion 1.7 或更高版本的工作副本,根路径是 '%s'。\n"
+"请升级你的 Subversion 客户端,以使用此工作副本。"
+
+#, c-format
+msgid ""
"Working copy format of '%s' is too old (%d); please check out your working "
"copy again"
msgstr "“%s”的工作副本格式太旧(%d);请重新取出工作副本"
#, c-format
msgid ""
-"This client is too old to work with working copy '%s'. You need\n"
-"to get a newer Subversion client, or to downgrade this working copy.\n"
-"See http://subversion.tigris.org/faq.html#working-copy-format-change\n"
-"for details."
-msgstr ""
-"此客户端对于工作副本 “%s” 太旧。你需要取得更新的 Subversion 客户端,或者降级\n"
-"工作副本。参见 http://subversion.tigris.org/faq.html#working-copy-format-"
-"change\n"
-"以获得更详细的信息。"
+"The path '%s' appears to be part of a Subversion 1.7 or greater\n"
+"working copy. Please upgrade your Subversion client to use this\n"
+"working copy."
+msgstr ""
+"路径 '%s' 好像是 Subversion 1.7 或更高版本的工作副本。请升级你的 Subversion\n"
+"客户端,以使用此工作副本。"
#, c-format
msgid ""
@@ -5178,8 +5212,9 @@ msgstr "树冲突描述中有非法的 � msgid "Error parsing tree conflict skel"
msgstr "解析树冲突骨架出错"
-msgid "Attempt to add tree conflict that already exists"
-msgstr "试图增加已经存在的树冲突"
+#, c-format
+msgid "Attempt to add tree conflict that already exists at '%s'"
+msgstr "试图增加已经位于“%s”的树冲突"
#, c-format
msgid "No '.' entry in: '%s'"
@@ -7116,9 +7151,7 @@ msgid ""
" are applied to the obstructing path.\n"
"\n"
" Use the --set-depth option to set a new working copy depth on the\n"
-" targets of this operation. Currently, the depth of a working copy\n"
-" directory can only be increased (telescoped more deeply); you cannot\n"
-" make a directory more shallow.\n"
+" targets of this operation.\n"
"\n"
" 2. Rewrite working copy URL metadata to reflect a syntactic change only.\n"
" This is used when repository's root URL changes (such as a scheme\n"
@@ -7143,8 +7176,7 @@ msgstr ""
"同,\n"
" 将视为工作副本发生本地修改。版本库中的所有属性都应用于障碍路径。\n"
"\n"
-" 使用 “--set-depth” 选项设置此操作目标的工作副本之新深度。目前工作副本的\n"
-" 深度只能增加(嵌入更深);你不能让目录收缩。\n"
+" 使用 “--set-depth” 选项设置此操作目标的工作副本之新深度。\n"
"\n"
" 2、重写工作副本的 URL 元数据,以反映单纯的 URL 改变。当版本库的根 URL 改\n"
" 变(比如方案或者主机名称变动),但是工作副本仍旧对应同一版本库的同一目录\n"
@@ -7198,9 +7230,7 @@ msgid ""
" in the first column with code 'E'.\n"
"\n"
" Use the --set-depth option to set a new working copy depth on the\n"
-" targets of this operation. Currently, the depth of a working copy\n"
-" directory can only be increased (telescoped more deeply); you cannot\n"
-" make a directory more shallow.\n"
+" targets of this operation.\n"
msgstr ""
"将版本库的修改合并到工作副本中。\n"
"用法: update [PATH...]\n"
@@ -7227,8 +7257,7 @@ msgstr ""
" 不同,将视为工作副本发生本地修改。版本库中的所有属性都应用于障碍路径。\n"
" 用第一列字符 “E” 来报告障碍路径。\n"
"\n"
-" 使用“--set-depth”选项设置此操作目标的工作副本之新深度。目前工作副本的\n"
-" 深度只能增加(嵌入更深);你不能让目录收缩。\n"
+" 使用“--set-depth”选项设置此操作目标的工作副本之新深度。\n"
msgid "Caught signal"
msgstr "捕捉到信号"
@@ -7740,7 +7769,7 @@ msgid "obstruction"
msgstr "阻塞"
msgid "missing"
-msgstr "丢失"
+msgstr "失踪"
msgid "unversioned"
msgstr "未版本控制"
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/add-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/add-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/add-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/add-cmd.c Tue Mar 16 18:03:37 2010
@@ -29,6 +29,9 @@
#include "svn_pools.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
/*** Code. ***/
@@ -59,6 +62,8 @@ svn_cl__add(apr_getopt_t *os,
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_infinity;
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
subpool = svn_pool_create(pool);
for (i = 0; i < targets->nelts; i++)
{
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/changelist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/changelist-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/changelist-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/changelist-cmd.c Tue Mar 16 18:03:37 2010
@@ -23,6 +23,10 @@
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -92,6 +96,8 @@ svn_cl__changelist(apr_getopt_t *os,
if (depth == svn_depth_unknown)
depth = svn_depth_empty;
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
if (changelist_name)
{
return svn_cl__try
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/cleanup-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/cleanup-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/cleanup-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/cleanup-cmd.c Tue Mar 16 18:03:37 2010
@@ -27,6 +27,9 @@
#include "svn_error.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
/*** Code. ***/
@@ -50,6 +53,8 @@ svn_cl__cleanup(apr_getopt_t *os,
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target(targets, pool);
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
subpool = svn_pool_create(pool);
for (i = 0; i < targets->nelts; i++)
{
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/commit-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/commit-cmd.c Tue Mar 16 18:03:37 2010
@@ -33,6 +33,9 @@
#include "svn_config.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
/* This implements the `svn_opt_subcommand_t' interface. */
@@ -69,6 +72,8 @@ svn_cl__commit(apr_getopt_t *os,
/* Add "." if user passed 0 arguments. */
svn_opt_push_implicit_dot_target(targets, pool);
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
/* Condense the targets (like commit does)... */
SVN_ERR(svn_path_condense_targets(&base_dir,
&condensed_targets,
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/delete-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/delete-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/delete-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/delete-cmd.c Tue Mar 16 18:03:37 2010
@@ -27,6 +27,10 @@
#include "svn_path.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -72,6 +76,8 @@ svn_cl__delete(apr_getopt_t *os,
NULL, ctx->config, pool));
}
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
err = svn_client_delete3(&commit_info, targets, opt_state->force,
opt_state->keep_local, opt_state->revprop_table,
ctx, pool);
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/lock-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/lock-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/lock-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/lock-cmd.c Tue Mar 16 18:03:37 2010
@@ -30,6 +30,11 @@
#include "svn_error.h"
#include "svn_cmdline.h"
#include "cl.h"
+
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -99,5 +104,7 @@ svn_cl__lock(apr_getopt_t *os,
svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, FALSE,
FALSE, FALSE, pool);
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
return svn_client_lock(targets, comment, opt_state->force, ctx, pool);
}
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/main.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/main.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/main.c Tue Mar 16 18:03:37 2010
@@ -927,9 +927,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" are applied to the obstructing path.\n"
"\n"
" Use the --set-depth option to set a new working copy depth on the\n"
- " targets of this operation. Currently, the depth of a working copy\n"
- " directory can only be increased (telescoped more deeply); you cannot\n"
- " make a directory more shallow.\n"
+ " targets of this operation.\n"
"\n"
" 2. Rewrite working copy URL metadata to reflect a syntactic change only.\n"
" This is used when repository's root URL changes (such as a scheme\n"
@@ -983,9 +981,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" in the first column with code 'E'.\n"
"\n"
" Use the --set-depth option to set a new working copy depth on the\n"
- " targets of this operation. Currently, the depth of a working copy\n"
- " directory can only be increased (telescoped more deeply); you cannot\n"
- " make a directory more shallow.\n"),
+ " targets of this operation.\n"),
{'r', 'N', opt_depth, opt_set_depth, 'q', opt_merge_cmd, opt_force,
opt_ignore_externals, opt_changelist, opt_editor_cmd, opt_accept} },
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/mkdir-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/mkdir-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/mkdir-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/mkdir-cmd.c Tue Mar 16 18:03:37 2010
@@ -28,6 +28,10 @@
#include "svn_path.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -73,6 +77,8 @@ svn_cl__mkdir(apr_getopt_t *os,
NULL, ctx->config, pool));
}
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
err = svn_client_mkdir3(&commit_info, targets, opt_state->parents,
opt_state->revprop_table, ctx, pool);
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/move-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/move-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/move-cmd.c Tue Mar 16 18:03:37 2010
@@ -27,6 +27,10 @@
#include "svn_path.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -82,6 +86,8 @@ svn_cl__move(apr_getopt_t *os,
SVN_ERR(svn_cl__make_log_msg_baton(&(ctx->log_msg_baton3), opt_state,
NULL, ctx->config, pool));
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
err = svn_client_move5(&commit_info, targets, dst_path, opt_state->force,
TRUE, opt_state->parents, opt_state->revprop_table,
ctx, pool);
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/propdel-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/propdel-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/propdel-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/propdel-cmd.c Tue Mar 16 18:03:37 2010
@@ -31,6 +31,10 @@
#include "svn_path.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -92,6 +96,8 @@ svn_cl__propdel(apr_getopt_t *os,
ctx->notify_baton2 = &nwb;
}
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
if (opt_state->revprop) /* operate on a revprop */
{
svn_revnum_t rev;
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/propedit-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/propedit-cmd.c Tue Mar 16 18:03:37 2010
@@ -33,6 +33,10 @@
#include "svn_props.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -168,6 +172,8 @@ svn_cl__propedit(apr_getopt_t *os,
_("Explicit target argument required"));
}
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
/* For each target, edit the property PNAME. */
for (i = 0; i < targets->nelts; i++)
{
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/propset-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/propset-cmd.c Tue Mar 16 18:03:37 2010
@@ -33,6 +33,10 @@
#include "svn_props.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -104,6 +108,8 @@ svn_cl__propset(apr_getopt_t *os,
if (opt_state->revprop)
svn_opt_push_implicit_dot_target(targets, pool);
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
if (opt_state->revprop) /* operate on a revprop */
{
svn_revnum_t rev;
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/resolve-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/resolve-cmd.c Tue Mar 16 18:03:37 2010
@@ -29,6 +29,10 @@
#include "svn_pools.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -91,6 +95,8 @@ svn_cl__resolve(apr_getopt_t *os,
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_empty;
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
for (i = 0; i < targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/resolved-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/resolved-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/resolved-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/resolved-cmd.c Tue Mar 16 18:03:37 2010
@@ -29,6 +29,10 @@
#include "svn_pools.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -62,6 +66,8 @@ svn_cl__resolved(apr_getopt_t *os,
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_empty;
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
for (i = 0; i < targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/revert-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/revert-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/revert-cmd.c Tue Mar 16 18:03:37 2010
@@ -27,6 +27,10 @@
#include "svn_error.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -60,6 +64,8 @@ svn_cl__revert(apr_getopt_t *os,
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_empty;
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
err = svn_client_revert2(targets, opt_state->depth,
opt_state->changelists, ctx, pool);
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/status-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/status-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/status-cmd.c Tue Mar 16 18:03:37 2010
@@ -33,6 +33,10 @@
#include "svn_cmdline.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -218,6 +222,8 @@ svn_cl__status(apr_getopt_t *os,
sb.cached_changelists = master_cl_hash;
sb.cl_pool = pool;
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
for (i = 0; i < targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/unlock-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/unlock-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/unlock-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/unlock-cmd.c Tue Mar 16 18:03:37 2010
@@ -28,6 +28,11 @@
#include "svn_error.h"
#include "svn_cmdline.h"
#include "cl.h"
+
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -55,5 +60,7 @@ svn_cl__unlock(apr_getopt_t *os,
svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, FALSE,
FALSE, FALSE, pool);
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
return svn_client_unlock(targets, opt_state->force, ctx, pool);
}
Modified: subversion/branches/1.6.x-issue3432/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svn/update-cmd.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svn/update-cmd.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svn/update-cmd.c Tue Mar 16 18:03:37 2010
@@ -29,6 +29,10 @@
#include "svn_error.h"
#include "cl.h"
+/* We shouldn't be including a private header here, but it is
+ * necessary for fixing issue #3416 */
+#include "private/svn_opt_private.h"
+
#include "svn_private_config.h"
@@ -53,6 +57,8 @@ svn_cl__update(apr_getopt_t *os,
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target(targets, pool);
+ SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
+
/* If using changelists, convert targets into a set of paths that
match the specified changelist(s). */
if (opt_state->changelists)
Modified: subversion/branches/1.6.x-issue3432/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svnlook/main.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svnlook/main.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svnlook/main.c Tue Mar 16 18:03:37 2010
@@ -1027,6 +1027,15 @@ print_diff_tree(svn_fs_root_t *root,
SVN_ERR(svn_stream_close(ostream));
SVN_ERR(svn_cmdline_printf(pool, "\n"));
}
+ else if (! node->prop_mod &&
+ ((! c->no_diff_added && node->action == 'A') ||
+ (! c->no_diff_deleted && node->action == 'D')))
+ {
+ /* There was an empty file added or deleted in this revision.
+ * We can't print a diff, but we can at least print
+ * a diff header since we know what happened to this file. */
+ SVN_ERR(svn_cmdline_printf(pool, "%s", header->data));
+ }
}
SVN_ERR(svn_cmdline_fflush(stdout));
}
@@ -1604,11 +1613,16 @@ do_plist(svnlook_ctxt_t *c,
SVN_ERR(verify_path(&kind, root, path, pool));
SVN_ERR(svn_fs_node_proplist(&props, root, path, pool));
}
- else
+ else if (c->is_revision)
{
SVN_ERR(svn_fs_revision_proplist(&props, c->fs, c->rev_id, pool));
revprop = TRUE;
}
+ else
+ {
+ SVN_ERR(svn_fs_txn_proplist(&props, c->txn, pool));
+ revprop = TRUE;
+ }
if (xml)
{
@@ -1622,8 +1636,16 @@ do_plist(svnlook_ctxt_t *c,
if (revprop)
{
/* "<revprops ...>" */
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
- "rev", revstr, NULL);
+ if (c->is_revision)
+ {
+ svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
+ "rev", revstr, NULL);
+ }
+ else
+ {
+ svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
+ "txn", c->txn_name, NULL);
+ }
}
else
{
Modified: subversion/branches/1.6.x-issue3432/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svnserve/cyrus_auth.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svnserve/cyrus_auth.c Tue Mar 16 18:03:37 2010
@@ -282,9 +282,6 @@ svn_error_t *cyrus_auth_request(svn_ra_s
/* Initialize security properties. */
svn_ra_svn__default_secprops(&secprops);
- /* Don't allow PLAIN or LOGIN, since we don't support TLS yet. */
- secprops.security_flags = SASL_SEC_NOPLAINTEXT;
-
/* Don't allow ANONYMOUS if a username is required. */
no_anonymous = needs_username || get_access(b, UNAUTHENTICATED) < required;
if (no_anonymous)
Modified: subversion/branches/1.6.x-issue3432/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svnserve/main.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svnserve/main.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svnserve/main.c Tue Mar 16 18:03:37 2010
@@ -772,6 +772,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/1.6.x-issue3432/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/svnsync/main.c?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/svnsync/main.c (original)
+++ subversion/branches/1.6.x-issue3432/subversion/svnsync/main.c Tue Mar 16 18:03:37 2010
@@ -246,7 +246,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));
@@ -269,8 +270,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));
}
@@ -1271,6 +1273,16 @@ close_edit(void *edit_baton,
return eb->wrapped_editor->close_edit(eb->wrapped_edit_baton, pool);
}
+static svn_error_t *
+abort_edit(void *edit_baton,
+ apr_pool_t *pool)
+{
+ edit_baton_t *eb = edit_baton;
+ return eb->wrapped_editor->abort_edit(eb->wrapped_edit_baton, pool);
+}
+
+
+
/*** Editor factory function ***/
/* Set WRAPPED_EDITOR and WRAPPED_EDIT_BATON to an editor/baton pair
@@ -1312,6 +1324,7 @@ get_sync_editor(const svn_delta_editor_t
tree_editor->close_file = close_file;
tree_editor->absent_file = absent_file;
tree_editor->close_edit = close_edit;
+ tree_editor->abort_edit = abort_edit;
eb->wrapped_editor = wrapped_editor;
eb->wrapped_edit_baton = wrapped_edit_baton;
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/autoprop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/autoprop_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/autoprop_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/autoprop_tests.py Tue Mar 16 18:03:37 2010
@@ -62,6 +62,7 @@ enable-auto-props = %s
fubar* = tarfile=si
foobar.lha = lhafile=da;lzhfile=niet
spacetest = abc = def ; ghi = ; = j
+quotetest = svn:keywords="Author Date Id Rev URL";
* = auto=oui
''' % (enable_flag and 'yes' or 'no')
@@ -125,7 +126,8 @@ def autoprops_test(sbox, cmd, cfgenable,
'foo.jpg',
'fubar.tar',
'foobar.lha',
- 'spacetest']
+ 'spacetest',
+ 'quotetest']
for filename in filenames:
svntest.main.file_write(os.path.join(files_dir, filename),
'foo\nbar\nbaz\n')
@@ -166,6 +168,9 @@ def autoprops_test(sbox, cmd, cfgenable,
check_proplist(filename, {'auto':'oui', 'lhafile':'da', 'lzhfile':'niet'})
filename = os.path.join(files_wc_dir, 'spacetest')
check_proplist(filename, {'auto':'oui', 'abc':'def', 'ghi':''})
+ filename = os.path.join(files_wc_dir, 'quotetest')
+ check_proplist(filename, {'auto':'oui',
+ 'svn:keywords': 'Author Date Id Rev URL'})
else:
for filename in filenames:
check_proplist(os.path.join(files_wc_dir, filename), {})
@@ -269,6 +274,37 @@ def autoprops_imp_dir(sbox):
autoprops_test(sbox, 'import', 1, 0, 'autodir')
+#----------------------------------------------------------------------
+
+# Issue #2713: adding a file with an svn:eol-style property, svn should abort
+# if the file has mixed EOL style. Previously, svn aborted but had added the
+# file anyway.
+def fail_add_mixed_eol_style(sbox):
+ "fail to add a file with mixed EOL style"
+
+ from svntest.actions import run_and_verify_svn, run_and_verify_unquiet_status
+
+ # Bootstrap
+ sbox.build()
+
+ filename = 'mixed-eol.txt'
+ filepath = os.path.join(sbox.wc_dir, filename)
+ parameters = ['--auto-props',
+ '--config-option=config:auto-props:' + filename
+ + '=svn:eol-style=native']
+
+ svntest.main.file_write(filepath, 'foo\nbar\r\nbaz\r')
+
+ expected_stderr = "svn: File '.*/" + filename + \
+ "' has inconsistent newlines" + \
+ "|" + "svn: Inconsistent line ending style\n"
+ run_and_verify_svn(None, [], expected_stderr,
+ 'add', filepath, *parameters)
+
+ expected_status = svntest.wc.State(sbox.wc_dir,
+ {filename : Item(status='? ')})
+ run_and_verify_unquiet_status(filepath, expected_status)
+
########################################################################
# Run the tests
@@ -290,6 +326,7 @@ test_list = [ None,
autoprops_imp_yes_no,
autoprops_add_dir,
autoprops_imp_dir,
+ fail_add_mixed_eol_style,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/basic_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/basic_tests.py Tue Mar 16 18:03:37 2010
@@ -1660,14 +1660,14 @@ def basic_peg_revision(sbox):
wc_dir = sbox.wc_dir
repos_dir = sbox.repo_url
filename = 'abc@abc'
-
- wc_file = wc_dir + '/' + filename
+ wc_file = os.path.join(wc_dir, filename)
url = repos_dir + '/' + filename
svntest.main.file_append(wc_file, 'xyz\n')
- svntest.main.run_svn(None, 'add', wc_file)
+ # We need to escape the @ in the middle of abc@abc by appending another @
+ svntest.main.run_svn(None, 'add', wc_file + '@')
svntest.main.run_svn(None,
- 'ci', '-m', 'secret log msg', wc_file)
+ 'ci', '-m', 'secret log msg', wc_file + '@')
# Without the trailing "@", expect failure.
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
@@ -1677,10 +1677,34 @@ def basic_peg_revision(sbox):
# With the trailing "@", expect success.
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, ["xyz\n"], [], 'cat', wc_file+'@')
+ None, ["xyz\n"], [], 'cat', wc_file + '@')
exit_code, output, errlines = svntest.actions.run_and_verify_svn(
- None, ["xyz\n"], [], 'cat', url+'@')
+ None, ["xyz\n"], [], 'cat', url + '@')
+
+ # Test with leading @ character in filename.
+ filename = '@abc'
+ wc_file = os.path.join(wc_dir, filename)
+ url = repos_dir + '/' + filename
+ svntest.main.file_append(wc_file, 'xyz\n')
+ exit_code, output, errlines = svntest.actions.run_and_verify_svn(
+ None, None, [], 'add', wc_file + '@')
+ exit_code, output, errlines = svntest.actions.run_and_verify_svn(
+ None, None, [], 'ci', '-m', 'secret log msg', wc_file + '@')
+
+ # With a leading "@" which isn't escaped, expect failure.
+ # Note that we just test with filename starting with '@', because
+ # wc_file + '@' + filename is a different situation where svn
+ # will try to parse filename as a peg revision.
+ exit_code, output, errlines = svntest.actions.run_and_verify_svn(
+ None, None, ".*'%s' is just a peg revision.*" % filename,
+ 'cat', filename)
+
+ # With a leading "@" which is escaped, expect success.
+ exit_code, output, errlines = svntest.actions.run_and_verify_svn(
+ None, ["xyz\n"], [], 'cat', wc_file + '@')
+ exit_code, output, errlines = svntest.actions.run_and_verify_svn(
+ None, ["xyz\n"], [], 'cat', repos_dir + '/' + filename + '@')
def info_nonhead(sbox):
"info on file not existing in HEAD"
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/export_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/export_tests.py Tue Mar 16 18:03:37 2010
@@ -389,6 +389,15 @@ def export_creates_intermediate_folders(
expected_output,
svntest.main.greek_state.copy())
+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)
+
########################################################################
# Run the tests
@@ -411,6 +420,7 @@ test_list = [ None,
export_unversioned_file,
export_with_state_deleted,
export_creates_intermediate_folders,
+ export_HEADplus1_fails,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/externals_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/externals_tests.py Tue Mar 16 18:03:37 2010
@@ -17,6 +17,7 @@
######################################################################
# General modules
+import sys
import os
import warnings
@@ -1127,6 +1128,176 @@ def external_into_path_with_spaces(sbox)
os.path.join(wc_dir, 'A', 'another copy of D'),
])
+# Issue #3368
+def binary_file_externals(sbox):
+ "binary file externals"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Add a binary file A/theta, write PNG file data into it.
+ theta_contents = svntest.main.file_read(
+ os.path.join(sys.path[0], "theta.bin"), 'rb')
+ theta_path = os.path.join(wc_dir, 'A', 'theta')
+ svntest.main.file_write(theta_path, theta_contents, 'wb')
+
+ svntest.main.run_svn(None, 'add', theta_path)
+
+ # Created expected output tree for 'svn ci'
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/theta' : Item(verb='Adding (bin)'),
+ })
+
+ # Create expected status tree
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=2),
+ })
+
+ # Commit the new binary file, creating revision 2.
+ svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+ expected_status, None, wc_dir)
+
+
+ # Create a file external on the binary file A/theta
+ C = os.path.join(wc_dir, 'A', 'C')
+ external = os.path.join(C, 'external')
+ externals_prop = "^/A/theta external\n"
+
+ # Set and commit the property.
+ change_external(C, externals_prop)
+
+
+ # Now, /A/C/external is designated as a file external pointing to
+ # the binary file /A/theta, but the external file is not there yet.
+ # Try to actually insert the external file via a verified update:
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/C/external' : Item(status='E '),
+ })
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/theta' : Item(
+ theta_contents,
+ props={'svn:mime-type' : 'application/octet-stream'}),
+ 'A/C' : Item(props={'svn:externals':externals_prop}),
+ 'A/C/external' : Item(
+ theta_contents,
+ props={'svn:mime-type' : 'application/octet-stream'}),
+ })
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=3),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None, None, None, None,
+ True)
+
+
+#----------------------------------------------------------------------
+
+# Issue #3552
+def wc_repos_file_externals(sbox):
+ "tag directory with file externals from wc to url"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ # Add a file A/theta.
+ theta_path = os.path.join(wc_dir, 'A', 'theta')
+ svntest.main.file_write(theta_path, 'theta', 'w')
+ svntest.main.run_svn(None, 'add', theta_path)
+
+ # Created expected output tree for 'svn ci'
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/theta' : Item(verb='Adding'),
+ })
+
+ # Create expected status tree
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=2),
+ })
+
+ # Commit the new file, creating revision 2.
+ svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+ expected_status, None, wc_dir)
+
+
+ # Create a file external on the file A/theta
+ C = os.path.join(wc_dir, 'A', 'C')
+ external = os.path.join(C, 'theta')
+ externals_prop = "^/A/theta theta\n"
+
+ # Set and commit the property.
+ change_external(C, externals_prop)
+
+
+ # Now, /A/C/theta is designated as a file external pointing to
+ # the file /A/theta, but the external file is not there yet.
+ # Try to actually insert the external file via a verified update:
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/C/theta' : Item(status='E '),
+ })
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/theta' : Item('theta'),
+ 'A/C' : Item(props={'svn:externals':externals_prop}),
+ 'A/C/theta' : Item('theta'),
+ })
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=3),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None, None, None, None,
+ True)
+
+ # Copy A/C to a new tag in the repos
+ tag_url = repo_url + '/A/I'
+ svntest.main.run_svn(None, 'cp', C, tag_url, '-m', 'create tag')
+
+ # Try to actually insert the external file (A/I/theta) via a verified update:
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/I' : Item(status='A '),
+ 'A/I/theta' : Item(status='E '),
+ })
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/theta' : Item('theta'),
+ 'A/C' : Item(props={'svn:externals':externals_prop}),
+ 'A/C/theta' : Item('theta'),
+ 'A/I' : Item(props={'svn:externals':externals_prop}),
+ 'A/I/theta' : Item('theta'),
+ })
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 4)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=4),
+ 'A/I' : Item(status=' ', wc_rev=4),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None, None, None, None,
+ True)
+
+
########################################################################
# Run the tests
@@ -1150,6 +1321,8 @@ test_list = [ None,
cannot_move_or_remove_file_externals,
can_place_file_external_into_dir_external,
external_into_path_with_spaces,
+ binary_file_externals,
+ wc_repos_file_externals,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Tue Mar 16 18:03:37 2010
@@ -89,9 +89,7 @@ usage: 1. switch URL[@PEGREV] [PATH]
are applied to the obstructing path.
Use the --set-depth option to set a new working copy depth on the
- targets of this operation. Currently, the depth of a working copy
- directory can only be increased (telescoped more deeply); you cannot
- make a directory more shallow.
+ targets of this operation.
2. Rewrite working copy URL metadata to reflect a syntactic change only.
This is used when repository's root URL changes (such as a scheme
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/log_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/log_tests.py Tue Mar 16 18:03:37 2010
@@ -1640,6 +1640,57 @@ def merge_sensitive_log_propmod_merge_in
run_log_g_r8(A_COPY_path)
run_log_g_r8(A_COPY_psi_path)
+#----------------------------------------------------------------------
+# Should be able to run 'svn log' against an uncommitted copy or move
+# destination. See http://svn.haxx.se/dev/archive-2010-01/0492.shtml.
+def log_of_local_copy(sbox):
+ "svn log on an uncommitted copy"
+
+ guarantee_repos_and_wc(sbox)
+
+ C_path = os.path.join(sbox.wc_dir, "A", "C")
+ C_moved_path = os.path.join(sbox.wc_dir, "A", "C_MOVED")
+ psi_path = os.path.join(sbox.wc_dir, "A", "D", "H", "psi")
+ psi_moved_path = os.path.join(sbox.wc_dir, "A", "D", "H", "psi_moved")
+
+ # Get the logs for a directory and a file.
+ exit_code, C_log_out, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '-v', C_path)
+ exit_code, psi_log_out, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '-v', psi_path)
+
+ # Move that directory and file.
+ svntest.actions.run_and_verify_svn(None, None, [], 'mv',
+ C_path, C_moved_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'mv',
+ psi_path, psi_moved_path)
+
+ # Get the logs for the move destinations.
+ #
+ # This was failing with:
+ #
+ # svn log -v log_tests-29\A\C_MOVED
+ # ..\..\..\subversion\svn\log-cmd.c:600: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_client\log.c:627: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_repos\log.c:1449: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_repos\log.c:1092: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_fs_fs\tree.c:2818: (apr_err=160013)
+ # svn: File not found: revision 9, path '/A/C_MOVED'
+ #
+ exit_code, C_moved_log_out, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '-v', C_moved_path)
+ exit_code, psi_moved_log_out, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '-v', psi_moved_path)
+
+ # The logs of the move source and destinations should be the same.
+ if C_log_out != C_moved_log_out:
+ raise svntest.Failure("Log on uncommitted move destination '%s' " \
+ "differs from that on move source '%s'"
+ % (C_moved_path, C_path))
+ if psi_log_out != psi_moved_log_out:
+ raise svntest.Failure("Log on uncommitted move destination '%s' " \
+ "differs from that on move source '%s'"
+ % (psi_moved_path, psi_path))
########################################################################
# Run the tests
@@ -1681,6 +1732,7 @@ test_list = [ None,
server_has_mergeinfo),
SkipUnless(merge_sensitive_log_propmod_merge_inheriting_path,
server_has_mergeinfo),
+ log_of_local_copy,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/merge_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/merge_tests.py Tue Mar 16 18:03:37 2010
@@ -22,7 +22,7 @@ import time
# Our testing module
import svntest
-from svntest import wc
+from svntest import main, wc, verify, actions
from svntest.tree import SVNTreeUnequal
# (abbreviation)
@@ -561,18 +561,18 @@ def delete_file_and_dir(sbox):
# Merge rev 3 into B2
# The local mods to the paths modified in r3 cause the paths to be
- # skipped (without --force), resulting in only mergeinfo changes. The
- # target of the merge 'B2' gets mergeinfo for r3 and B2's two skipped
+ # tree-conflicted upon deletion, resulting in only mergeinfo changes.
+ # The target of the merge 'B2' gets mergeinfo for r3 and B2's two skipped
# children, 'E' and 'lambda', get override mergeinfo reflecting their
- # mergeinfo prior to the merge (in this case empty mergeinfo).
+ # mergeinfo prior to the merge (in this case no mergeinfo at all).
expected_output = wc.State(B2_path, {
'' : Item(),
'lambda' : Item(status=' ', treeconflict='C'),
+ 'E' : Item(status=' ', treeconflict='C'),
})
expected_disk = wc.State('', {
'' : Item(props={SVN_PROP_MERGEINFO : '/A/B:3'}),
- 'E' : Item(props={SVN_PROP_MERGEINFO : '',
- 'foo' : 'foo_val'}),
+ 'E' : Item(props={'foo' : 'foo_val'}),
'E/alpha' : Item("This is the file 'alpha'.\n"),
'E/beta' : Item("This is the file 'beta'.\n"),
'F' : Item(),
@@ -581,16 +581,14 @@ def delete_file_and_dir(sbox):
})
expected_status2 = wc.State(B2_path, {
'' : Item(status=' M'),
- 'E' : Item(status=' M'),
+ 'E' : Item(status=' M', treeconflict='C'),
'E/alpha' : Item(status=' '),
'E/beta' : Item(status=' '),
'F' : Item(status=' '),
'lambda' : Item(status=' M'), ### Should be tree-conflicted
})
expected_status2.tweak(wc_rev=2)
- expected_skip = wc.State(B2_path, {
- 'E' : Item(),
- })
+ expected_skip = wc.State('', { })
svntest.actions.run_and_verify_merge(B2_path, '2', '3', B_url,
expected_output,
expected_disk,
@@ -2698,8 +2696,6 @@ def merge_dir_replace(sbox):
'A/C/foo/file foo' : Item(verb='Adding'),
'A/C/foo/bar' : Item(verb='Adding'),
'A/C/foo/bar/new file 3' : Item(verb='Adding'),
- 'A/C/foo/new file' : Item(verb='Deleting'),
- 'A/C/foo/new file 2' : Item(verb='Deleting'),
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
@@ -14650,8 +14646,8 @@ def merge_range_prior_to_rename_source_e
"merge prior to rename src existence still dels src"
# Replicate a merge bug found while synching up a feature branch on the
- # Subversion repository with trunk. See r34047 of
- # http://svn.collab.net/repos/svn/branches/ignore-mergeinfo, in which
+ # Subversion repository with trunk. See r874121 of
+ # http://svn.apache.org/repos/asf/subversion/branches/ignore-mergeinfo, in which
# a move was merged to the target, but the delete half of the move
# didn't occur.
@@ -15986,6 +15982,421 @@ def multiple_reintegrates_from_the_same_
'merge', sbox.repo_url + '/A',
A_COPY_path)
+#----------------------------------------------------------------------
+
+def merge_replace_causes_tree_conflict(sbox):
+ "replace that causes a tree-conflict"
+
+ # svntest.factory.make(sbox,r"""
+ # # make a branch of A
+ # svn cp $URL/A $URL/branch
+ # svn up
+ # # ACTIONS ON THE MERGE SOURCE (branch)
+ # # various deletes of files and dirs
+ # svn delete branch/mu branch/B/E branch/D/G/pi branch/D/H
+ # svn ci
+ # svn up
+ #
+ # # replacements.
+ # # file-with-file
+ # echo "replacement for mu" > branch/mu
+ # svn add branch/mu
+ # # dir-with-dir
+ # svn mkdir branch/B/E
+ # svn ps propname propval branch/B/E
+ # # file-with-dir
+ # svn mkdir branch/D/G/pi
+ # svn ps propname propval branch/D/G/pi
+ # # dir-with-file
+ # echo "replacement for H" > branch/D/H
+ # svn add branch/D/H
+ # svn ci
+ #
+ # # ACTIONS ON THE MERGE TARGET (A)
+ # # local mods to conflict with merge source
+ # echo modified > A/mu
+ # svn ps propname otherpropval A/B/E
+ # echo modified > A/D/G/pi
+ # svn ps propname propval A/D/H
+ # svn merge $URL/branch $URL/A A
+ # svn st
+ # """)
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ url = sbox.repo_url
+
+ A = os.path.join(wc_dir, 'A')
+ A_B_E = os.path.join(wc_dir, 'A', 'B', 'E')
+ A_D_G_pi = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+ A_D_H = os.path.join(wc_dir, 'A', 'D', 'H')
+ A_mu = os.path.join(wc_dir, 'A', 'mu')
+ branch_B_E = os.path.join(wc_dir, 'branch', 'B', 'E')
+ branch_D_G_pi = os.path.join(wc_dir, 'branch', 'D', 'G', 'pi')
+ branch_D_H = os.path.join(wc_dir, 'branch', 'D', 'H')
+ branch_mu = os.path.join(wc_dir, 'branch', 'mu')
+ url_A = url + '/A'
+ url_branch = url + '/branch'
+
+ # make a branch of A
+ # svn cp $URL/A $URL/branch
+ expected_stdout = verify.UnorderedOutput([
+ '\n',
+ 'Committed revision 2.\n',
+ ])
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'cp', url_A,
+ url_branch, '-m', 'copy log')
+
+ # svn up
+ expected_output = svntest.wc.State(wc_dir, {
+ 'branch' : Item(status='A '),
+ 'branch/B' : Item(status='A '),
+ 'branch/B/F' : Item(status='A '),
+ 'branch/B/E' : Item(status='A '),
+ 'branch/B/E/beta' : Item(status='A '),
+ 'branch/B/E/alpha' : Item(status='A '),
+ 'branch/B/lambda' : Item(status='A '),
+ 'branch/D' : Item(status='A '),
+ 'branch/D/H' : Item(status='A '),
+ 'branch/D/H/psi' : Item(status='A '),
+ 'branch/D/H/chi' : Item(status='A '),
+ 'branch/D/H/omega' : Item(status='A '),
+ 'branch/D/G' : Item(status='A '),
+ 'branch/D/G/tau' : Item(status='A '),
+ 'branch/D/G/pi' : Item(status='A '),
+ 'branch/D/G/rho' : Item(status='A '),
+ 'branch/D/gamma' : Item(status='A '),
+ 'branch/C' : Item(status='A '),
+ 'branch/mu' : Item(status='A '),
+ })
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'branch' : Item(),
+ 'branch/D' : Item(),
+ 'branch/D/G' : Item(),
+ 'branch/D/G/rho' : Item(contents="This is the file 'rho'.\n"),
+ 'branch/D/G/tau' : Item(contents="This is the file 'tau'.\n"),
+ 'branch/D/G/pi' : Item(contents="This is the file 'pi'.\n"),
+ 'branch/D/H' : Item(),
+ 'branch/D/H/omega' : Item(contents="This is the file 'omega'.\n"),
+ 'branch/D/H/chi' : Item(contents="This is the file 'chi'.\n"),
+ 'branch/D/H/psi' : Item(contents="This is the file 'psi'.\n"),
+ 'branch/D/gamma' : Item(contents="This is the file 'gamma'.\n"),
+ 'branch/B' : Item(),
+ 'branch/B/E' : Item(),
+ 'branch/B/E/alpha' : Item(contents="This is the file 'alpha'.\n"),
+ 'branch/B/E/beta' : Item(contents="This is the file 'beta'.\n"),
+ 'branch/B/F' : Item(),
+ 'branch/B/lambda' : Item(contents="This is the file 'lambda'.\n"),
+ 'branch/mu' : Item(contents="This is the file 'mu'.\n"),
+ 'branch/C' : Item(),
+ })
+
+ expected_status = actions.get_virginal_state(wc_dir, 2)
+ expected_status.add({
+ 'branch' : Item(status=' ', wc_rev='2'),
+ 'branch/D' : Item(status=' ', wc_rev='2'),
+ 'branch/D/gamma' : Item(status=' ', wc_rev='2'),
+ 'branch/D/H' : Item(status=' ', wc_rev='2'),
+ 'branch/D/H/omega' : Item(status=' ', wc_rev='2'),
+ 'branch/D/H/chi' : Item(status=' ', wc_rev='2'),
+ 'branch/D/H/psi' : Item(status=' ', wc_rev='2'),
+ 'branch/D/G' : Item(status=' ', wc_rev='2'),
+ 'branch/D/G/tau' : Item(status=' ', wc_rev='2'),
+ 'branch/D/G/pi' : Item(status=' ', wc_rev='2'),
+ 'branch/D/G/rho' : Item(status=' ', wc_rev='2'),
+ 'branch/B' : Item(status=' ', wc_rev='2'),
+ 'branch/B/F' : Item(status=' ', wc_rev='2'),
+ 'branch/B/E' : Item(status=' ', wc_rev='2'),
+ 'branch/B/E/beta' : Item(status=' ', wc_rev='2'),
+ 'branch/B/E/alpha' : Item(status=' ', wc_rev='2'),
+ 'branch/B/lambda' : Item(status=' ', wc_rev='2'),
+ 'branch/C' : Item(status=' ', wc_rev='2'),
+ 'branch/mu' : Item(status=' ', wc_rev='2'),
+ })
+
+ actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
+ expected_status, None, None, None, None, None, False, wc_dir)
+
+ # ACTIONS ON THE MERGE SOURCE (branch)
+ # various deletes of files and dirs
+ # svn delete branch/mu branch/B/E branch/D/G/pi branch/D/H
+ expected_stdout = verify.UnorderedOutput([
+ 'D ' + branch_mu + '\n',
+ 'D ' + os.path.join(branch_B_E, 'alpha') + '\n',
+ 'D ' + os.path.join(branch_B_E, 'beta') + '\n',
+ 'D ' + branch_B_E + '\n',
+ 'D ' + branch_D_G_pi + '\n',
+ 'D ' + os.path.join(branch_D_H, 'chi') + '\n',
+ 'D ' + os.path.join(branch_D_H, 'omega') + '\n',
+ 'D ' + os.path.join(branch_D_H, 'psi') + '\n',
+ 'D ' + branch_D_H + '\n',
+ ])
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'delete',
+ branch_mu, branch_B_E, branch_D_G_pi, branch_D_H)
+
+ # svn ci
+ expected_output = svntest.wc.State(wc_dir, {
+ 'branch/D/G/pi' : Item(verb='Deleting'),
+ 'branch/D/H' : Item(verb='Deleting'),
+ 'branch/mu' : Item(verb='Deleting'),
+ 'branch/B/E' : Item(verb='Deleting'),
+ })
+
+ expected_status.remove('branch/mu', 'branch/D/H', 'branch/D/H/omega',
+ 'branch/D/H/chi', 'branch/D/H/psi', 'branch/D/G/pi', 'branch/B/E',
+ 'branch/B/E/beta', 'branch/B/E/alpha')
+
+ actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
+ None, wc_dir)
+
+ # svn up
+ expected_output = svntest.wc.State(wc_dir, {})
+
+ expected_disk.remove('branch/mu', 'branch/D/H', 'branch/D/H/omega',
+ 'branch/D/H/chi', 'branch/D/H/psi', 'branch/D/G/pi', 'branch/B/E',
+ 'branch/B/E/alpha', 'branch/B/E/beta')
+
+ expected_status.tweak(wc_rev='3')
+
+ actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
+ expected_status, None, None, None, None, None, False, wc_dir)
+
+ # replacements.
+ # file-with-file
+ # echo "replacement for mu" > branch/mu
+ main.file_write(branch_mu, 'replacement for mu')
+
+ # svn add branch/mu
+ expected_stdout = ['A ' + branch_mu + '\n']
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'add',
+ branch_mu)
+
+ # dir-with-dir
+ # svn mkdir branch/B/E
+ expected_stdout = ['A ' + branch_B_E + '\n']
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'mkdir',
+ branch_B_E)
+
+ # svn ps propname propval branch/B/E
+ expected_stdout = ["property 'propname' set on '" + branch_B_E + "'\n"]
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'ps',
+ 'propname', 'propval', branch_B_E)
+
+ # file-with-dir
+ # svn mkdir branch/D/G/pi
+ expected_stdout = ['A ' + branch_D_G_pi + '\n']
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'mkdir',
+ branch_D_G_pi)
+
+ # svn ps propname propval branch/D/G/pi
+ expected_stdout = ["property 'propname' set on '" + branch_D_G_pi + "'\n"]
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'ps',
+ 'propname', 'propval', branch_D_G_pi)
+
+ # dir-with-file
+ # echo "replacement for H" > branch/D/H
+ main.file_write(branch_D_H, 'replacement for H')
+
+ # svn add branch/D/H
+ expected_stdout = ['A ' + branch_D_H + '\n']
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'add',
+ branch_D_H)
+
+ # svn ci
+ expected_output = svntest.wc.State(wc_dir, {
+ 'branch/D/G/pi' : Item(verb='Adding'),
+ 'branch/D/H' : Item(verb='Adding'),
+ 'branch/mu' : Item(verb='Adding'),
+ 'branch/B/E' : Item(verb='Adding'),
+ })
+
+ expected_status.add({
+ 'branch/D/G/pi' : Item(status=' ', wc_rev='4'),
+ 'branch/D/H' : Item(status=' ', wc_rev='4'),
+ 'branch/B/E' : Item(status=' ', wc_rev='4'),
+ 'branch/mu' : Item(status=' ', wc_rev='4'),
+ })
+
+ actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
+ None, wc_dir)
+
+ # ACTIONS ON THE MERGE TARGET (A)
+ # local mods to conflict with merge source
+ # echo modified > A/mu
+ main.file_write(A_mu, 'modified')
+
+ # svn ps propname otherpropval A/B/E
+ expected_stdout = ["property 'propname' set on '" + A_B_E + "'\n"]
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'ps',
+ 'propname', 'otherpropval', A_B_E)
+
+ # echo modified > A/D/G/pi
+ main.file_write(A_D_G_pi, 'modified')
+
+ # svn ps propname propval A/D/H
+ expected_stdout = ["property 'propname' set on '" + A_D_H + "'\n"]
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'ps',
+ 'propname', 'propval', A_D_H)
+
+ # svn merge $URL/A $URL/branch A
+ expected_stdout = verify.UnorderedOutput([
+ "--- Merging differences between repository URLs into '" + A + "':\n",
+ ' C ' + A_B_E + '\n',
+ ' C ' + A_mu + '\n',
+ ' C ' + A_D_G_pi + '\n',
+ ' C ' + A_D_H + '\n',
+ 'Summary of conflicts:\n',
+ ' Tree conflicts: 4\n',
+ ])
+
+ actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge',
+ url_A, url_branch, A)
+
+ # svn st
+ expected_status.tweak('A', status=' M')
+ expected_status.tweak('A/D/G/pi', 'A/mu', status='M ', treeconflict='C')
+ expected_status.tweak('A/D/H', status=' M', treeconflict='C')
+ ### A/B/E gets both a property and tree conflict flagged. Is this OK?
+ expected_status.tweak('A/B/E', status=' C', treeconflict='C')
+
+ actions.run_and_verify_status(wc_dir, expected_status)
+
+# Test for a reintegrate bug which can occur when the merge source
+# has mergeinfo that explicitly describes common history with the reintegrate
+# target, see http://mail-archives.apache.org/mod_mbox/subversion-dev/
+# 200912.mbox/%3C6cfe18eb0912161438wfb5234bj118aacdff7ffb25f@mail.gmail.com%3E
+def reintegrate_with_self_referential_mergeinfo(sbox):
+ "source has target's history as explicit mergeinfo"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Make some changes under 'A' in r2-5.
+ wc_disk, wc_status = set_up_branch(sbox, nbr_of_branches=0)
+
+ # Some paths we'll care about
+ A_path = os.path.join(wc_dir, "A")
+ A2_path = os.path.join(wc_dir, "A2")
+ A2_B_path = os.path.join(wc_dir, "A2", "B")
+ A2_1_path = os.path.join(wc_dir, "A2.1")
+ A2_1_mu_path = os.path.join(wc_dir, "A2.1", "mu")
+
+ # r6 Copy A to A2 and then manually set some self-referential mergeinfo on
+ # A2/B and A2.
+ svntest.actions.run_and_verify_svn(None, ["At revision 5.\n"], [],
+ 'up', wc_dir)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'copy', A_path, A2_path)
+ # /A:3 describes A2's natural history, a.k.a. it's implicit mergeinfo, so
+ # it is self-referential. Same for /A/B:4 and A2/B. Normally this is
+ # redundant but not harmful.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'svn:mergeinfo', '/A:3', A2_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'svn:mergeinfo', '/A/B:4', A2_B_path)
+ svntest.actions.run_and_verify_svn(
+ None, None, [], 'ci', '-m',
+ 'copy A to A2 and set some self-referential mergeinfo on the latter.',
+ wc_dir)
+
+ # r7 Copy A2 to A2.1
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'copy', A2_path, A2_1_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+ '-m', 'copy A2to A2.1.', wc_dir)
+
+ # r8 Make a change on A2.1/mu
+ svntest.main.file_write(A2_1_mu_path, 'New A2.1 stuff')
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+ '-m', 'Work done on the A2.1 branch.',
+ wc_dir)
+
+ # Update to uniform revision and reintegrated A2.1 back to A2.
+ svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+ 'up', wc_dir)
+
+ # Now merge all available revisions from A to A_COPY:
+ expected_output = wc.State(A2_path, {
+ 'mu' : Item(status='U '),
+ })
+ expected_status = wc.State(A2_path, {
+ '' : Item(status=' M'),
+ 'B' : Item(status=' M'),
+ 'mu' : Item(status='M '),
+ 'B/E' : Item(status=' '),
+ 'B/E/alpha' : Item(status=' '),
+ 'B/E/beta' : Item(status=' '),
+ 'B/lambda' : Item(status=' '),
+ 'B/F' : Item(status=' '),
+ 'C' : Item(status=' '),
+ 'D' : Item(status=' '),
+ 'D/G' : Item(status=' '),
+ 'D/G/pi' : Item(status=' '),
+ 'D/G/rho' : Item(status=' '),
+ 'D/G/tau' : Item(status=' '),
+ 'D/gamma' : Item(status=' '),
+ 'D/H' : Item(status=' '),
+ 'D/H/chi' : Item(status=' '),
+ 'D/H/psi' : Item(status=' '),
+ 'D/H/omega' : Item(status=' '),
+ })
+ expected_status.tweak(wc_rev=8)
+ expected_disk = wc.State('', {
+ '' : Item(props={SVN_PROP_MERGEINFO : '/A:3\n/A2.1:7-8'}),
+ 'B' : Item(props={SVN_PROP_MERGEINFO : '/A/B:4\n/A2.1/B:7-8'}),
+ 'mu' : Item("New A2.1 stuff"),
+ 'B/E' : Item(),
+ 'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+ 'B/E/beta' : Item("New content"),
+ 'B/lambda' : Item("This is the file 'lambda'.\n"),
+ 'B/F' : Item(),
+ 'C' : Item(),
+ 'D' : Item(),
+ 'D/G' : Item(),
+ 'D/G/pi' : Item("This is the file 'pi'.\n"),
+ 'D/G/rho' : Item("New content"),
+ 'D/G/tau' : Item("This is the file 'tau'.\n"),
+ 'D/gamma' : Item("This is the file 'gamma'.\n"),
+ 'D/H' : Item(),
+ 'D/H/chi' : Item("This is the file 'chi'.\n"),
+ 'D/H/psi' : Item("New content"),
+ 'D/H/omega' : Item("New content"),
+ })
+ expected_skip = wc.State(A2_path, { })
+ # Previously failed with this error:
+ #
+ # svn merge ^/A2.1" A2 --reintegrate
+ # ..\..\..\subversion\svn\merge-cmd.c:349: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_client\merge.c:9219: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_client\ra.c:728: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_client\mergeinfo.c:733: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_client\ra.c:526: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_repos\rev_hunt.c:908: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_repos\rev_hunt.c:607: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_fs_fs\tree.c:2886: (apr_err=160013)
+ # ..\..\..\subversion\libsvn_fs_fs\tree.c:669: (apr_err=160013)
+ # svn: File not found: revision 4, path '/A2'
+ svntest.actions.run_and_verify_merge(A2_path, None, None,
+ sbox.repo_url + '/A2.1',
+ expected_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, None, None, None,
+ None, 1, 0, '--reintegrate')
+
########################################################################
# Run the tests
@@ -16044,8 +16455,7 @@ test_list = [ None,
SkipUnless(cherry_pick_text_conflict,
server_has_mergeinfo),
merge_file_replace,
- XFail(SkipUnless(merge_dir_replace,
- server_has_mergeinfo)),
+ SkipUnless(merge_dir_replace, server_has_mergeinfo),
XFail(merge_dir_and_file_replace),
merge_file_replace_to_mixed_rev_wc,
merge_added_dir_to_deleted_in_target,
@@ -16204,8 +16614,12 @@ test_list = [ None,
server_has_mergeinfo),
SkipUnless(multiple_reintegrates_from_the_same_branch,
server_has_mergeinfo),
+ # ra_serf causes duplicate notifications with this test:
+ Skip(merge_replace_causes_tree_conflict,
+ svntest.main.is_ra_type_dav_serf),
SkipUnless(handle_gaps_in_implicit_mergeinfo,
server_has_mergeinfo),
+ reintegrate_with_self_referential_mergeinfo,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/resolved_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/resolved_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/resolved_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/resolved_tests.py Tue Mar 16 18:03:37 2010
@@ -318,6 +318,27 @@ def resolved_on_deleted_item(sbox):
+def theirs_conflict_in_subdir(sbox):
+ "resolve to 'theirs-conflict' in sub-directory"
+
+ sbox.build()
+ wc = sbox.wc_dir
+ wc2 = sbox.add_wc_path('wc2')
+ svntest.actions.duplicate_dir(sbox.wc_dir, wc2)
+
+ alpha_path = os.path.join(wc, 'A', 'B', 'E', 'alpha')
+ alpha_path2 = os.path.join(wc2, 'A', 'B', 'E', 'alpha')
+
+ svntest.main.file_append(alpha_path, "Modified alpha.\n")
+ svntest.main.run_svn(None, 'ci', '-m', 'logmsg', wc)
+
+ svntest.main.file_append(alpha_path2, "Modified alpha, too.\n")
+ svntest.main.run_svn(None, 'up', wc2)
+
+ svntest.actions.run_and_verify_resolve([alpha_path2],
+ '--accept=theirs-conflict',
+ alpha_path2)
+
#######################################################################
# Run the tests
@@ -326,6 +347,7 @@ def resolved_on_deleted_item(sbox):
test_list = [ None,
resolved_on_wc_root,
resolved_on_deleted_item,
+ theirs_conflict_in_subdir,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnadmin_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnadmin_tests.py Tue Mar 16 18:03:37 2010
@@ -693,14 +693,12 @@ def load_with_parent_dir(sbox):
'mergeinfo_included.dump')
dumpfile = svntest.main.file_read(dumpfile_location)
- # Create 'sample' dir in sbox.repo_url
+ # Create 'sample' dir in sbox.repo_url, and load the dump stream there.
svntest.actions.run_and_verify_svn(None,
['\n', 'Committed revision 1.\n'],
[], "mkdir", sbox.repo_url + "/sample",
"-m", "Create sample dir")
-
- # Load the dump stream
- load_and_verify_dumpstream(sbox,[],[], None, dumpfile, '--parent-dir',
+ load_and_verify_dumpstream(sbox, [], [], None, dumpfile, '--parent-dir',
'/sample')
# Verify the svn:mergeinfo properties for '--parent-dir'
@@ -716,6 +714,30 @@ def load_with_parent_dir(sbox):
[], 'propget', 'svn:mergeinfo', '-R',
sbox.repo_url + '/sample/branch1')
+ # Create 'sample-2' dir in sbox.repo_url, and load the dump stream again.
+ # This time, don't include a leading slash on the --parent-dir argument.
+ # See issue #3547.
+ svntest.actions.run_and_verify_svn(None,
+ ['\n', 'Committed revision 11.\n'],
+ [], "mkdir", sbox.repo_url + "/sample-2",
+ "-m", "Create sample-2 dir")
+ load_and_verify_dumpstream(sbox, [], [], None, dumpfile, '--parent-dir',
+ 'sample-2')
+
+ # Verify the svn:mergeinfo properties for '--parent-dir'.
+ svntest.actions.run_and_verify_svn(None,
+ [sbox.repo_url +
+ "/sample-2/branch - " +
+ "/sample-2/trunk:15-17\n"],
+ [], 'propget', 'svn:mergeinfo', '-R',
+ sbox.repo_url + '/sample-2/branch')
+ svntest.actions.run_and_verify_svn(None,
+ [sbox.repo_url +
+ "/sample-2/branch1 - " +
+ "/sample-2/branch:16-19\n"],
+ [], 'propget', 'svn:mergeinfo', '-R',
+ sbox.repo_url + '/sample-2/branch1')
+
#----------------------------------------------------------------------
def set_uuid(sbox):
@@ -895,6 +917,39 @@ def create_in_repo_subdir(sbox):
# No SVNRepositoryCreateFailure raised?
raise svntest.Failure
+def verify_with_invalid_revprops(sbox):
+ "svnadmin verify detects invalid revprops file"
+
+ repo_dir = sbox.repo_dir
+
+ svntest.main.safe_rmtree(repo_dir, 1)
+
+ # This should succeed
+ svntest.main.create_repos(repo_dir)
+
+ # Run a test verify
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ sbox.repo_dir)
+
+ if svntest.verify.verify_outputs(
+ "Output of 'svnadmin verify' is unexpected.", None, errput, None,
+ ".*Verified revision 0*"):
+ raise svntest.Failure
+
+ # Empty the revprops file
+ rp_file = open(os.path.join(repo_dir, 'db', 'revprops', '0', '0'), 'w')
+
+ rp_file.write('')
+ rp_file.close()
+
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ sbox.repo_dir)
+
+ if svntest.verify.verify_outputs(
+ "Output of 'svnadmin verify' is unexpected.", None, errput, None,
+ ".*Malformed file"):
+ raise svntest.Failure
+
########################################################################
# Run the tests
@@ -921,6 +976,7 @@ test_list = [ None,
SkipUnless(fsfs_recover_handle_missing_revs_or_revprops_file,
svntest.main.is_fs_type_fsfs),
create_in_repo_subdir,
+ verify_with_invalid_revprops,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnlook_tests.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svnlook_tests.py Tue Mar 16 18:03:37 2010
@@ -533,6 +533,96 @@ def diff_binary(sbox):
raise svntest.Failure("No 'Binary files differ' indication in "
"'svnlook diff' output.")
+#----------------------------------------------------------------------
+def verify_logfile(logfilename, expected_data):
+ if os.path.exists(logfilename):
+ fp = open(logfilename)
+ else:
+ raise svntest.verify.SVNUnexpectedOutput("hook logfile %s not found"\
+ % logfilename)
+
+ actual_data = fp.readlines()
+ fp.close()
+ os.unlink(logfilename)
+ svntest.verify.compare_and_display_lines('wrong hook logfile content',
+ 'STDOUT',
+ expected_data, actual_data)
+
+def test_txn_flag(sbox):
+ "test 'svnlook * -t'"
+
+ sbox.build()
+ repo_dir = sbox.repo_dir
+ wc_dir = sbox.wc_dir
+ logfilepath = os.path.join(repo_dir, 'hooks.log')
+
+ # List changed dirs and files in this transaction
+ hook_template = """import sys,os,subprocess
+svnlook_bin=%s
+
+fp = open(os.path.join(sys.argv[1], 'hooks.log'), 'wb')
+def output_command(fp, cmd, opt):
+ command = [svnlook_bin, cmd, '-t', sys.argv[2], sys.argv[1]] + opt
+ process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
+ (output, errors) = process.communicate()
+ status = process.returncode
+ fp.write(output)
+ fp.write(errors)
+ return status
+
+for (svnlook_cmd, svnlook_opt) in %s:
+ output_command(fp, svnlook_cmd, svnlook_opt.split(' '))
+fp.close()"""
+ pre_commit_hook = svntest.main.get_pre_commit_hook_path(repo_dir)
+
+ # 1. svnlook 'changed' -t and 'dirs-changed' -t
+ hook_instance = hook_template % (repr(svntest.main.svnlook_binary),
+ repr([('changed', ''),
+ ('dirs-changed', '')]))
+ svntest.main.create_python_hook_script(pre_commit_hook,
+ hook_instance)
+
+ # Change files mu and rho
+ A_path = os.path.join(wc_dir, 'A')
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+ rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ svntest.main.file_append(mu_path, 'appended mu text')
+ svntest.main.file_append(rho_path, 'new appended text for rho')
+
+ # commit, and check the hook's logfile
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'log msg', wc_dir)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'up', wc_dir)
+
+ expected_data = [ 'U A/D/G/rho\n', 'U A/mu\n', 'A/\n', 'A/D/G/\n' ]
+ verify_logfile(logfilepath, expected_data)
+
+ # 2. svnlook 'propget' -t, 'proplist' -t
+ # 2. Change a dir and revision property
+ hook_instance = hook_template % (repr(svntest.main.svnlook_binary),
+ repr([('propget', 'bogus_prop /A'),
+ ('propget', '--revprop bogus_rev_prop'),
+ ('proplist', '/A'),
+ ('proplist', '--revprop')]))
+ svntest.main.create_python_hook_script(pre_commit_hook,
+ hook_instance)
+
+ svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+ 'bogus_prop', 'bogus_val\n', A_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'log msg', wc_dir,
+ '--with-revprop', 'bogus_rev_prop=bogus_rev_val\n')
+ # Now check the logfile
+ expected_data = [ 'bogus_val\n',
+ 'bogus_rev_val\n',
+ ' bogus_prop\n',
+ ' svn:log\n', ' svn:author\n',
+ # internal property, not really expected
+ ' svn:check-locks\n',
+ ' bogus_rev_prop\n', ' svn:date\n']
+ verify_logfile(logfilepath, expected_data)
+
########################################################################
# Run the tests
@@ -549,6 +639,7 @@ test_list = [ None,
diff_ignore_whitespace,
diff_ignore_eolstyle,
diff_binary,
+ test_txn_flag,
]
if __name__ == '__main__':
Modified: subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svntest/actions.py?rev=923910&r1=923909&r2=923910&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/1.6.x-issue3432/subversion/tests/cmdline/svntest/actions.py Tue Mar 16 18:03:37 2010
@@ -29,6 +29,12 @@ def no_sleep_for_timestamps():
def do_sleep_for_timestamps():
os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS'] = 'no'
+def no_check_for_wc_ng():
+ os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG'] = 'yes'
+
+def do_check_for_wc_ng():
+ os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG'] = 'no'
+
def setup_pristine_repository():
"""Create the pristine repository and 'svn import' the greek tree"""