[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Ruby bindings client for merge_peg

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-08-14 08:23:18 CEST

[[[

* subversion/bindings/swig/ruby/test/test_client.rb
  (SvnClientTest#test_merge_peg) pass in a peg_rev argument when
  calling merge_peg. Change the ranges to match what is returned
  [Basically do what was done to test_merge in 26004].
* subversion/bindings/swig/ruby/svn/client.rb
  (Svn::Client::Context#merge_peg) make the peg_rev argument mandatory
  instead of optional.

]]]

Index: subversion/bindings/swig/ruby/test/test_client.rb
===================================================================
--- subversion/bindings/swig/ruby/test/test_client.rb (revision 26069)
+++ subversion/bindings/swig/ruby/test/test_client.rb (working copy)
@@ -896,10 +896,10 @@
     rev2 = ctx.commit(@wc_path).revision

     assert_nil(ctx.merge_info(trunk))
- ctx.merge_peg(branch, rev1, rev2, trunk)
+ ctx.merge_peg(branch, rev1, rev2, trunk, rev2)
     merge_info = ctx.merge_info(trunk)
     assert_equal(["/branch"], merge_info.keys)
- assert_equal([[2, 2]], merge_info["/branch"].collect {|range| range.to_a})
+ assert_equal([[1, 2]], merge_info["/branch"].collect {|range| range.to_a})
     rev3 = ctx.commit(@wc_path).revision

     assert_equal(normalize_line_break(src), ctx.cat(trunk_path, rev3))
@@ -907,29 +907,27 @@
     ctx.rm(branch_path)
     rev4 = ctx.commit(@wc_path).revision

- ctx.merge_peg(branch, rev3, rev4, trunk)
+ ctx.merge_peg(branch, rev3, rev4, trunk, rev4)
     assert(!File.exist?(trunk_path))

     merge_info = ctx.merge_info(trunk, rev4)
     assert_equal(["/branch"], merge_info.keys)
- assert_equal([[2, 2], [4, 4]],
+ assert_equal([[1, 2], [3, 4]],
                  merge_info["/branch"].collect {|range| range.to_a })
     ctx.propdel("svn:mergeinfo", trunk)
- merge_info = ctx.merge_info(trunk)
- assert_equal(["/branch"], merge_info.keys)
- assert_equal([[2, 2]], merge_info["/branch"].collect {|range| range.to_a})
+ assert_nil ctx.merge_info(trunk)

     ctx.revert(trunk_path)
     File.open(trunk_path, "a") {|f| f.print(src)}
- ctx.merge_peg(branch, rev3, rev4, trunk)
+ ctx.merge_peg(branch, rev3, rev4, trunk, rev4)
     assert(File.exist?(trunk_path))
     rev5 = ctx.commit(@wc_path).revision

     File.open(trunk_path, "a") {|f| f.print(src)}
- ctx.merge_peg(branch, rev3, rev4, trunk, nil, true, false, true, true)
+ ctx.merge_peg(branch, rev3, rev4, trunk, rev4, true, false, true, true)
     assert(File.exist?(trunk_path))

- ctx.merge_peg(branch, rev3, rev4, trunk, nil, true, false, true)
+ ctx.merge_peg(branch, rev3, rev4, trunk, rev4, true, false, true)
     rev6 = ctx.commit(@wc_path).revision

     assert(!File.exist?(trunk_path))
Index: subversion/bindings/swig/ruby/svn/client.rb
===================================================================
--- subversion/bindings/swig/ruby/svn/client.rb (revision 26069)
+++ subversion/bindings/swig/ruby/svn/client.rb (working copy)
@@ -315,8 +315,8 @@
                       dry_run, options, self)
       end

- def merge_peg(src, rev1, rev2, target_wcpath,
- peg_rev=nil, depth=nil,
+ def merge_peg(src, rev1, rev2, target_wcpath, peg_rev,
+ depth=nil,
                     ignore_ancestry=false, force=false,
                     dry_run=false, options=nil, record_only=false)
         Client.merge_peg3(src, rev1, rev2, peg_rev,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Tue Aug 14 08:21:12 2007

This is an archived mail posted to the Subversion Dev mailing list.