You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/03/23 23:16:22 UTC
svn commit: r926814 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c
update_editor.c workqueue.c
Author: gstein
Date: Tue Mar 23 22:16:21 2010
New Revision: 926814
URL: http://svn.apache.org/viewvc?rev=926814&view=rev
Log:
Use the new file installation work item within svn_wc_add_repos_file4()
* subversion/libsvn_wc/update_editor.c:
(svn_wc_add_repos_file4): remove computation of DST_TXTB since we
already have it as TEXT_BASE_PATH. add comment about possibly using
OP_FILE_INSTALL when a separate working file (as distinct from just
the text base) is provided. remove the old section about installing
from the base, and do it later as a work item. add a comment to
clarify what svn_wc__install_props() is doing w.r.t work items. only
do an (extra) run of the workqueue before we make a call to
db_temp_op_set_working_last_change; otherwise, we can wait and run
everything all at once.
* subversion/libsvn_wc/adm_ops.c:
(svn_wc__get_pristine_contents): added nodes *do* have pristines
* subversion/libsvn_wc/workqueue.c:
(run_file_install): assert that we got a pristine stream (this work item
should not have been used, otherwise!)
Modified:
subversion/trunk/subversion/libsvn_wc/adm_ops.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/libsvn_wc/workqueue.c
Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=926814&r1=926813&r2=926814&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Tue Mar 23 22:16:21 2010
@@ -2236,6 +2236,9 @@ svn_wc__get_pristine_contents(svn_stream
if (status == svn_wc__db_status_added)
{
+ /* ### locally-added nodes *do* have a pristine. we install it when
+ ### the node is added/copied/moved. */
+#if 0
/* For an added node, we return an empty stream. Make sure this is not
* copied-here or moved-here, in which case we return the copy/move
* source's contents. */
@@ -2250,6 +2253,7 @@ svn_wc__get_pristine_contents(svn_stream
*contents = NULL;
return SVN_NO_ERROR;
}
+#endif
}
else if (status == svn_wc__db_status_not_present)
/* We know that the delete of this node has been committed.
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=926814&r1=926813&r2=926814&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Mar 23 22:16:21 2010
@@ -5932,17 +5932,14 @@ svn_wc_add_repos_file4(svn_wc_context_t
&& status != svn_wc__db_status_obstructed_add)
{
const char *dst_rtext;
- const char *dst_txtb;
/* ### replace this with: svn_wc__wq_prepare_revert_files() */
SVN_ERR(svn_wc__text_revert_path(&dst_rtext, db, local_abspath,
pool));
- SVN_ERR(svn_wc__text_base_path(&dst_txtb, db, local_abspath,
- FALSE, pool));
SVN_ERR(svn_wc__loggy_move(&pre_props_accum, dir_abspath,
- dst_txtb, dst_rtext, pool, pool));
+ text_base_path, dst_rtext, pool, pool));
SVN_ERR(svn_wc__loggy_revert_props_create(&pre_props_accum, db,
local_abspath,
dir_abspath,
@@ -6029,6 +6026,9 @@ svn_wc_add_repos_file4(svn_wc_context_t
svn_stream_t *tmp_contents;
const char *tmp_text_path;
+ /* ### it may be nice to have an option to OP_FILE_INSTALL to allow
+ ### an installation from an alternate location (TMP_TEXT_PATH). */
+
SVN_ERR(svn_stream_open_unique(&tmp_contents, &tmp_text_path,
temp_dir_abspath, svn_io_file_del_none,
pool, pool));
@@ -6046,18 +6046,6 @@ svn_wc_add_repos_file4(svn_wc_context_t
SVN_ERR(svn_wc__loggy_remove(&post_props_accum, dir_abspath,
tmp_text_path, pool, pool));
}
- else
- {
- /* No working file provided by the caller, copy and translate the
- text base. */
- SVN_ERR(svn_wc__loggy_copy(&post_props_accum, dir_abspath,
- tmp_text_base_path, local_abspath,
- pool, pool));
- SVN_ERR(svn_wc__loggy_set_entry_timestamp_from_wc(
- &post_props_accum, dir_abspath, local_abspath, pool, pool));
- SVN_ERR(svn_wc__loggy_set_entry_working_size_from_wc(
- &post_props_accum, dir_abspath, local_abspath, pool, pool));
- }
/* Install new text base. */
{
@@ -6081,21 +6069,47 @@ svn_wc_add_repos_file4(svn_wc_context_t
/* Write our accumulation of log entries into a log file */
SVN_ERR(svn_wc__wq_add_loggy(db, dir_abspath, pre_props_accum, pool));
+
+ /* Add some work items to install the properties. */
SVN_ERR(svn_wc__install_props(db, local_abspath, new_base_props,
new_props ? new_props : new_base_props,
TRUE, FALSE, pool));
- SVN_ERR(svn_wc__run_log2(db, dir_abspath, pool));
-
/* ### HACK: The following code should be performed in the same transaction as the install */
if (last_change)
- SVN_ERR(svn_wc__db_temp_op_set_working_last_change(db, local_abspath,
- last_change->cmt_rev,
- last_change->cmt_date,
- last_change->cmt_author,
- pool));
+ {
+ /* ### execute the work items which construct the node, allowing the
+ ### wc_db operation to tweak the WORKING_NODE row. these values
+ ### should be set some other way. */
+ SVN_ERR(svn_wc__run_log2(db, dir_abspath, pool));
+ SVN_ERR(svn_wc__db_temp_op_set_working_last_change(
+ db, local_abspath,
+ last_change->cmt_rev,
+ last_change->cmt_date,
+ last_change->cmt_author,
+ pool));
+ }
+
/* ### /HACK */
SVN_ERR(svn_wc__wq_add_loggy(db, dir_abspath, post_props_accum, pool));
+ /* If a working file was not provided by the caller, then install one
+ from the text base (with appropriate translation). */
+ if (new_contents == NULL)
+ {
+ const svn_skel_t *work_item;
+
+ SVN_ERR(svn_wc__wq_build_file_install(&work_item,
+ db, local_abspath,
+ FALSE /* use_commit_times */,
+ TRUE /* record_fileinfo */,
+ pool, pool));
+ /* ### we should pass WORK_ITEM to some wc_db api that constructs
+ ### this new node. but alas, we do so much of this in pieces,
+ ### and not using wc_db apis. so just manually add the work item
+ ### into the queue. */
+ SVN_ERR(svn_wc__db_wq_add(db, local_abspath, work_item, pool));
+ }
+
return svn_error_return(svn_wc__run_log2(db, dir_abspath, pool));
}
Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=926814&r1=926813&r2=926814&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Tue Mar 23 22:16:21 2010
@@ -1930,6 +1930,7 @@ run_file_install(svn_wc__db_t *db,
/* Get the pristine contents (from WORKING or BASE, as appropriate). */
SVN_ERR(svn_wc__get_pristine_contents(&src_stream, db, local_abspath,
scratch_pool, scratch_pool));
+ SVN_ERR_ASSERT(src_stream != NULL);
SVN_ERR(svn_wc__get_special(&special, db, local_abspath, scratch_pool));
if (special)
Re: svn commit: r926814 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c update_editor.c workqueue.c
Posted by Philip Martin <ph...@wandisco.com>.
gstein@apache.org writes:
> Author: gstein
> Date: Tue Mar 23 22:16:21 2010
> New Revision: 926814
> --- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Tue Mar 23 22:16:21 2010
> @@ -2236,6 +2236,9 @@ svn_wc__get_pristine_contents(svn_stream
>
> if (status == svn_wc__db_status_added)
> {
> + /* ### locally-added nodes *do* have a pristine. we install it when
> + ### the node is added/copied/moved. */
Is this claiming that there is a pristine for just plain added
(i.e. not copied) files? The content would seem to be entirely
arbitrary, depending on when the add command was run.
> +#if 0
> /* For an added node, we return an empty stream. Make sure this is not
> * copied-here or moved-here, in which case we return the copy/move
> * source's contents. */
--
Philip
Re: RE: svn commit: r926814 - in /subversion/trunk/subversion/libsvn_wc:
adm_ops.c update_editor.c workqueue.c
Posted by Greg Stein <gs...@gmail.com>.
Yup. Thanks. Saw this before heading to dinner, thinking it was due to new
changes. Realized "no" about 15 minutes ago. Will fix ASAP.
On Mar 23, 2010 9:12 PM, "Bert Huijben" <be...@qqmail.nl> wrote:
> -----Original Message-----
> From: gstein@apache.org [mailto:gstein@apache.org]
> Sent: dinsdag ...
Hi Greg,
This patch breaks export test 11 on more than one buildbot:
FAIL: export_tests.py 11: export working copy at base revision
CMD: svn export svn-test-work/working_copies/export_tests-11
svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir
/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom
CMD: /home/bt/slaves/x64-centos/build/subversion/svn/svn export
svn-test-work/working_copies/export_tests-11
svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir
/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.090459>
subversion/svn/export-cmd.c:104: (apr_err=2)
subversion/libsvn_client/export.c:1080: (apr_err=2)
subversion/libsvn_client/export.c:426: (apr_err=2)
subversion/libsvn_client/export.c:164: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/io.c:2696: (apr_err=2)
svn: Can't open file
'/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/working_copies/export_tests-11/.svn/text-base/kappa.svn-base':
No such file or directory
Traceback (most recent call last):
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 1197, in run
rc = self.pred.run(sandbox)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/testcase.py",
line 160, in run
return self.func(sandbox)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/export_tests.py",
line 293, in export_working_copy_at_base_revision
'-rBASE')
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/actions.py",
line 390, in run_and_verify_export
URL, export_dir_name, *args)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 604, in run_svn
return run_command(svn_binary, error_expected, 0,
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 366, in run_command
None, *varargs)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 538, in run_command_stdin
raise Failure
Failure
Bert
Re: RE: svn commit: r926814 - in /subversion/trunk/subversion/libsvn_wc:
adm_ops.c update_editor.c workqueue.c
Posted by Greg Stein <gs...@gmail.com>.
Yup. Thanks. Saw this before heading to dinner, thinking it was due to new
changes. Realized "no" about 15 minutes ago. Will fix ASAP.
On Mar 23, 2010 9:12 PM, "Bert Huijben" <be...@qqmail.nl> wrote:
> -----Original Message-----
> From: gstein@apache.org [mailto:gstein@apache.org]
> Sent: dinsdag ...
Hi Greg,
This patch breaks export test 11 on more than one buildbot:
FAIL: export_tests.py 11: export working copy at base revision
CMD: svn export svn-test-work/working_copies/export_tests-11
svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir
/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom
CMD: /home/bt/slaves/x64-centos/build/subversion/svn/svn export
svn-test-work/working_copies/export_tests-11
svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir
/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.090459>
subversion/svn/export-cmd.c:104: (apr_err=2)
subversion/libsvn_client/export.c:1080: (apr_err=2)
subversion/libsvn_client/export.c:426: (apr_err=2)
subversion/libsvn_client/export.c:164: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/io.c:2696: (apr_err=2)
svn: Can't open file
'/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/working_copies/export_tests-11/.svn/text-base/kappa.svn-base':
No such file or directory
Traceback (most recent call last):
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 1197, in run
rc = self.pred.run(sandbox)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/testcase.py",
line 160, in run
return self.func(sandbox)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/export_tests.py",
line 293, in export_working_copy_at_base_revision
'-rBASE')
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/actions.py",
line 390, in run_and_verify_export
URL, export_dir_name, *args)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 604, in run_svn
return run_command(svn_binary, error_expected, 0,
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 366, in run_command
None, *varargs)
File
"/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py",
line 538, in run_command_stdin
raise Failure
Failure
Bert
RE: svn commit: r926814 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c update_editor.c workqueue.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: gstein@apache.org [mailto:gstein@apache.org]
> Sent: dinsdag 23 maart 2010 23:16
> To: commits@subversion.apache.org
> Subject: svn commit: r926814 - in
> /subversion/trunk/subversion/libsvn_wc: adm_ops.c update_editor.c
> workqueue.c
>
> Author: gstein
> Date: Tue Mar 23 22:16:21 2010
> New Revision: 926814
>
> URL: http://svn.apache.org/viewvc?rev=926814&view=rev
> Log:
> Use the new file installation work item within svn_wc_add_repos_file4()
>
> * subversion/libsvn_wc/update_editor.c:
> (svn_wc_add_repos_file4): remove computation of DST_TXTB since we
> already have it as TEXT_BASE_PATH. add comment about possibly using
> OP_FILE_INSTALL when a separate working file (as distinct from just
> the text base) is provided. remove the old section about installing
> from the base, and do it later as a work item. add a comment to
> clarify what svn_wc__install_props() is doing w.r.t work items.
> only
> do an (extra) run of the workqueue before we make a call to
> db_temp_op_set_working_last_change; otherwise, we can wait and run
> everything all at once.
>
> * subversion/libsvn_wc/adm_ops.c:
> (svn_wc__get_pristine_contents): added nodes *do* have pristines
>
> * subversion/libsvn_wc/workqueue.c:
> (run_file_install): assert that we got a pristine stream (this work
> item
> should not have been used, otherwise!)
Hi Greg,
This patch breaks export test 11 on more than one buildbot:
FAIL: export_tests.py 11: export working copy at base revision
CMD: svn export svn-test-work/working_copies/export_tests-11 svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir /home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
CMD: /home/bt/slaves/x64-centos/build/subversion/svn/svn export svn-test-work/working_copies/export_tests-11 svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir /home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.090459>
subversion/svn/export-cmd.c:104: (apr_err=2)
subversion/libsvn_client/export.c:1080: (apr_err=2)
subversion/libsvn_client/export.c:426: (apr_err=2)
subversion/libsvn_client/export.c:164: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/io.c:2696: (apr_err=2)
svn: Can't open file '/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/working_copies/export_tests-11/.svn/text-base/kappa.svn-base': No such file or directory
Traceback (most recent call last):
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 1197, in run
rc = self.pred.run(sandbox)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/testcase.py", line 160, in run
return self.func(sandbox)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/export_tests.py", line 293, in export_working_copy_at_base_revision
'-rBASE')
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/actions.py", line 390, in run_and_verify_export
URL, export_dir_name, *args)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 604, in run_svn
return run_command(svn_binary, error_expected, 0,
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 366, in run_command
None, *varargs)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 538, in run_command_stdin
raise Failure
Failure
Bert
RE: svn commit: r926814 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c update_editor.c workqueue.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: gstein@apache.org [mailto:gstein@apache.org]
> Sent: dinsdag 23 maart 2010 23:16
> To: commits@subversion.apache.org
> Subject: svn commit: r926814 - in
> /subversion/trunk/subversion/libsvn_wc: adm_ops.c update_editor.c
> workqueue.c
>
> Author: gstein
> Date: Tue Mar 23 22:16:21 2010
> New Revision: 926814
>
> URL: http://svn.apache.org/viewvc?rev=926814&view=rev
> Log:
> Use the new file installation work item within svn_wc_add_repos_file4()
>
> * subversion/libsvn_wc/update_editor.c:
> (svn_wc_add_repos_file4): remove computation of DST_TXTB since we
> already have it as TEXT_BASE_PATH. add comment about possibly using
> OP_FILE_INSTALL when a separate working file (as distinct from just
> the text base) is provided. remove the old section about installing
> from the base, and do it later as a work item. add a comment to
> clarify what svn_wc__install_props() is doing w.r.t work items.
> only
> do an (extra) run of the workqueue before we make a call to
> db_temp_op_set_working_last_change; otherwise, we can wait and run
> everything all at once.
>
> * subversion/libsvn_wc/adm_ops.c:
> (svn_wc__get_pristine_contents): added nodes *do* have pristines
>
> * subversion/libsvn_wc/workqueue.c:
> (run_file_install): assert that we got a pristine stream (this work
> item
> should not have been used, otherwise!)
Hi Greg,
This patch breaks export test 11 on more than one buildbot:
FAIL: export_tests.py 11: export working copy at base revision
CMD: svn export svn-test-work/working_copies/export_tests-11 svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir /home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
CMD: /home/bt/slaves/x64-centos/build/subversion/svn/svn export svn-test-work/working_copies/export_tests-11 svn-test-work/working_copies/export_tests-11.export -rBASE --config-dir /home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.090459>
subversion/svn/export-cmd.c:104: (apr_err=2)
subversion/libsvn_client/export.c:1080: (apr_err=2)
subversion/libsvn_client/export.c:426: (apr_err=2)
subversion/libsvn_client/export.c:164: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/stream.c:745: (apr_err=2)
subversion/libsvn_subr/io.c:2696: (apr_err=2)
svn: Can't open file '/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svn-test-work/working_copies/export_tests-11/.svn/text-base/kappa.svn-base': No such file or directory
Traceback (most recent call last):
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 1197, in run
rc = self.pred.run(sandbox)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/testcase.py", line 160, in run
return self.func(sandbox)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/export_tests.py", line 293, in export_working_copy_at_base_revision
'-rBASE')
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/actions.py", line 390, in run_and_verify_export
URL, export_dir_name, *args)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 604, in run_svn
return run_command(svn_binary, error_expected, 0,
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 366, in run_command
None, *varargs)
File "/home/bt/slaves/x64-centos/build/subversion/tests/cmdline/svntest/main.py", line 538, in run_command_stdin
raise Failure
Failure
Bert