You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2012/03/22 16:56:30 UTC

svn commit: r1303856 - in /subversion/trunk/subversion: bindings/swig/ruby/svn/fs.rb bindings/swig/ruby/test/test_info.rb svnlook/main.c tests/cmdline/svnlook_tests.py

Author: philip
Date: Thu Mar 22 15:56:30 2012
New Revision: 1303856

URL: http://svn.apache.org/viewvc?rev=1303856&view=rev
Log:
Ask for deltas during replay as this allows property deletes that
remove all properties to be detected.  Prior to r1293375 the replay
driver sent a dummy delete which was used to detect these property
changes.

This reverts r1302524 as the Ruby tests have been fixed in the same
way.

* subversion/svnlook/main.c
  (generate_delta_tree): Replay with deltas.

* subversion/bindings/swig/ruby/svn/fs.rb
  (Root.replay): Replay with deltas.

* subversion/tests/cmdline/svnlook_tests.py
  (property_delete): Remove XFAIL.

* subversion/bindings/swig/ruby/test/test_info.rb
   (test_diff): Reinstate a couple of property expectations.

Modified:
    subversion/trunk/subversion/bindings/swig/ruby/svn/fs.rb
    subversion/trunk/subversion/bindings/swig/ruby/test/test_info.rb
    subversion/trunk/subversion/svnlook/main.c
    subversion/trunk/subversion/tests/cmdline/svnlook_tests.py

Modified: subversion/trunk/subversion/bindings/swig/ruby/svn/fs.rb
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/ruby/svn/fs.rb?rev=1303856&r1=1303855&r2=1303856&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/ruby/svn/fs.rb (original)
+++ subversion/trunk/subversion/bindings/swig/ruby/svn/fs.rb Thu Mar 22 15:56:30 2012
@@ -415,7 +415,7 @@ module Svn
                         ignore_ancestry)
       end
 
-      def replay(editor, base_dir=nil, low_water_mark=nil, send_deltas=false,
+      def replay(editor, base_dir=nil, low_water_mark=nil, send_deltas=true,
                  &callback)
         base_dir ||= ""
         low_water_mark ||= Core::INVALID_REVNUM

Modified: subversion/trunk/subversion/bindings/swig/ruby/test/test_info.rb
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/ruby/test/test_info.rb?rev=1303856&r1=1303855&r2=1303856&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/ruby/test/test_info.rb (original)
+++ subversion/trunk/subversion/bindings/swig/ruby/test/test_info.rb Thu Mar 22 15:56:30 2012
@@ -217,6 +217,7 @@ class SvnInfoTest < Test::Unit::TestCase
       assert_equal([file1, file2, file4].sort, keys[0..-2])
       assert_match(/\A#{file5}/, file5_key)
       assert(info.diffs[file1].has_key?(:modified))
+      assert(info.diffs[file1].has_key?(:property_changed))
       assert(info.diffs[file2].has_key?(:modified))
       assert(info.diffs[file4].has_key?(:added))
       assert(info.diffs[file4].has_key?(:property_changed))
@@ -229,6 +230,8 @@ class SvnInfoTest < Test::Unit::TestCase
       assert_equal(0, info.diffs[file4][:added].deleted_line)
       assert_equal(0, info.diffs[file5_key][:copied].added_line)
       assert_equal(0, info.diffs[file5_key][:copied].deleted_line)
+      assert_equal("Name: #{file1_prop_key}\n   - #{file1_prop_value}\n",
+                   info.diffs[file1][:property_changed].body)
       assert_equal("Name: #{file4_prop_key}\n   + #{file4_prop_value}\n",
                    info.diffs[file4][:property_changed].body)
       assert_equal(commit_info.revision, info.revision)

Modified: subversion/trunk/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/main.c?rev=1303856&r1=1303855&r2=1303856&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/main.c (original)
+++ subversion/trunk/subversion/svnlook/main.c Thu Mar 22 15:56:30 2012
@@ -461,7 +461,7 @@ generate_delta_tree(svn_repos_node_t **t
                                 base_root, root, pool, edit_pool));
 
   /* Drive our editor. */
-  SVN_ERR(svn_repos_replay2(root, "", SVN_INVALID_REVNUM, FALSE,
+  SVN_ERR(svn_repos_replay2(root, "", SVN_INVALID_REVNUM, TRUE,
                             editor, edit_baton, NULL, NULL, edit_pool));
 
   /* Return the tree we just built. */

Modified: subversion/trunk/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnlook_tests.py?rev=1303856&r1=1303855&r2=1303856&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnlook_tests.py Thu Mar 22 15:56:30 2012
@@ -701,7 +701,6 @@ fp.close()"""
                     '  bogus_rev_prop\n', '  svn:date\n']
   verify_logfile(logfilepath, svntest.verify.UnorderedOutput(expected_data))
 
-@XFail()  # Revert r1302524 when this is fixed?
 def property_delete(sbox):
   "property delete"
 



Re: svn commit: r1303856 - in /subversion/trunk/subversion: bindings/swig/ruby/svn/fs.rb bindings/swig/ruby/test/test_info.rb svnlook/main.c tests/cmdline/svnlook_tests.py

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Mar 22, 2012 at 13:35, Philip Martin <ph...@wandisco.com> wrote:
> Greg Stein <gs...@gmail.com> writes:
>> On Mar 22, 2012 11:56 AM, <ph...@apache.org> wrote:
>>>...
>>> This reverts r1302524 as the Ruby tests have been fixed in the same
>>> way.
>>
>> Edit svn:log on r1302524?
>
> OK.  I'm more interested in whether people think this is the right way
> to fix the problem.  Is asking for deltas during replay the right way to
> ensure that the node editor sets prop_mod?

>From svn_repos_replay2():

 * If @a send_deltas is @c TRUE, the text and property deltas for changes
 * will be sent, otherwise NULL text deltas and empty prop changes will be
 * used.


That seems like it was abusing the delta editor right from the start.
I might suggest that we kill the parameter altogether.

If generating and delivering text deltas and property diffs is "too
much work", then I believe functionality which requires the
minimal-work use a new interface (not Ev1 or Ev2).

Cheers,
-g

Re: svn commit: r1303856 - in /subversion/trunk/subversion: bindings/swig/ruby/svn/fs.rb bindings/swig/ruby/test/test_info.rb svnlook/main.c tests/cmdline/svnlook_tests.py

Posted by Philip Martin <ph...@wandisco.com>.
Greg Stein <gs...@gmail.com> writes:

> On Mar 22, 2012 11:56 AM, <ph...@apache.org> wrote:
>>
>> Author: philip
>> Date: Thu Mar 22 15:56:30 2012
>> New Revision: 1303856
>>
>> URL: http://svn.apache.org/viewvc?rev=1303856&view=rev
>> Log:
>> Ask for deltas during replay as this allows property deletes that
>> remove all properties to be detected.  Prior to r1293375 the replay
>> driver sent a dummy delete which was used to detect these property
>> changes.
>>
>> This reverts r1302524 as the Ruby tests have been fixed in the same
>> way.
>
> Edit svn:log on r1302524?

OK.  I'm more interested in whether people think this is the right way
to fix the problem.  Is asking for deltas during replay the right way to
ensure that the node editor sets prop_mod?

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: svn commit: r1303856 - in /subversion/trunk/subversion: bindings/swig/ruby/svn/fs.rb bindings/swig/ruby/test/test_info.rb svnlook/main.c tests/cmdline/svnlook_tests.py

Posted by Greg Stein <gs...@gmail.com>.
On Mar 22, 2012 11:56 AM, <ph...@apache.org> wrote:
>
> Author: philip
> Date: Thu Mar 22 15:56:30 2012
> New Revision: 1303856
>
> URL: http://svn.apache.org/viewvc?rev=1303856&view=rev
> Log:
> Ask for deltas during replay as this allows property deletes that
> remove all properties to be detected.  Prior to r1293375 the replay
> driver sent a dummy delete which was used to detect these property
> changes.
>
> This reverts r1302524 as the Ruby tests have been fixed in the same
> way.

Edit svn:log on r1302524?