You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/06/30 19:39:58 UTC
[whimsy] branch master updated: Require revision by default for
svnmucc
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 53cb81b Require revision by default for svnmucc
53cb81b is described below
commit 53cb81bdf9d678c25cd5b3d63536665d2668fba8
Author: Sebb <se...@apache.org>
AuthorDate: Tue Jun 30 20:39:48 2020 +0100
Require revision by default for svnmucc
---
lib/spec/lib/svn_wunderbar_spec.rb | 36 ++++++++++++++++++------------------
lib/whimsy/asf/svn.rb | 6 +++---
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/lib/spec/lib/svn_wunderbar_spec.rb b/lib/spec/lib/svn_wunderbar_spec.rb
index 227ef53..4d89cf2 100644
--- a/lib/spec/lib/svn_wunderbar_spec.rb
+++ b/lib/spec/lib/svn_wunderbar_spec.rb
@@ -189,30 +189,30 @@ describe "ASF::SVN.update" do
end
describe "ASF::SVN.svnmucc_" do
- it "svnmucc_(nil,nil,nil,nil) should fail" do
- expect { ASF::SVN.svnmucc_(nil,nil,nil,nil) }.to raise_error(ArgumentError, "commands must be an array")
+ it "svnmucc_(nil,nil,nil,nil,nil) should fail" do
+ expect { ASF::SVN.svnmucc_(nil,nil,nil,nil,nil) }.to raise_error(ArgumentError, "commands must be an array")
end
- it "svnmucc_([],nil,nil,nil) should fail" do
- expect { ASF::SVN.svnmucc_([],nil,nil,nil) }.to raise_error(ArgumentError, "msg must not be nil")
+ it "svnmucc_([],nil,nil,nil,nil) should fail" do
+ expect { ASF::SVN.svnmucc_([],nil,nil,nil,nil) }.to raise_error(ArgumentError, "msg must not be nil")
end
- it "svnmucc_([],'test',nil,nil) should fail" do
- expect { ASF::SVN.svnmucc_([],'test',nil,nil) }.to raise_error(ArgumentError, "env must not be nil")
+ it "svnmucc_([],'test',nil,nil,nil) should fail" do
+ expect { ASF::SVN.svnmucc_([],'test',nil,nil,nil) }.to raise_error(ArgumentError, "env must not be nil")
end
- it "svnmucc_([],'test',ENV_.new,nil) should fail" do
- expect { ASF::SVN.svnmucc_([],ENV_.new,'test',nil) }.to raise_error(ArgumentError, "_ must not be nil")
+ it "svnmucc_([],'test',ENV_.new,nil,nil) should fail" do
+ expect { ASF::SVN.svnmucc_([],ENV_.new,'test',nil,nil) }.to raise_error(ArgumentError, "_ must not be nil")
end
- it "svnmucc_([[],'x',[]],'test',ENV_.new,'_') should fail" do
- expect { ASF::SVN.svnmucc_([[],'x',[]],ENV_.new,'test','_') }.to raise_error(ArgumentError, "command entries must be an array")
+ it "svnmucc_([[],'x',[]],'test',ENV_.new,'_',nil) should fail" do
+ expect { ASF::SVN.svnmucc_([[],'x',[]],ENV_.new,'test','_',nil) }.to raise_error(ArgumentError, "command entries must be an array")
end
- it "svnmucc_([['xyz']],'test',ENV_.new,_) should fail" do
+ it "svnmucc_([['xyz']],'test',ENV_.new,_,nil) should fail" do
rc, out = _json do |_|
- ASF::SVN.svnmucc_([['xyz']],'test',ENV_.new,_)
+ ASF::SVN.svnmucc_([['xyz']],'test',ENV_.new,_,nil)
end
expect(rc).to eq(1)
end
- it "svnmucc_([['help']],'test',ENV_.new,_) should produce help message with --message test" do
+ it "svnmucc_([['help']],'test',ENV_.new,_,nil) should produce help message with --message test" do
rc, out = _json do |_|
- ASF::SVN.svnmucc_([['help']],'test',ENV_.new,_)
+ ASF::SVN.svnmucc_([['help']],'test',ENV_.new,_,nil)
end
expect(rc).to eq(0)
expect(out).to be_kind_of(Hash)
@@ -221,7 +221,7 @@ describe "ASF::SVN.svnmucc_" do
expect(ts[0]).to match(/--message test/)
expect(ts[1]).to eq('usage: svnmucc ACTION...')
end
- it "svnmucc_([['help']],'test',ENV_.new,_,'x') should fail with invalid revision number" do
+ it "svnmucc_([['help']],'test',ENV_.new,_,'x',nil) should fail with invalid revision number" do
rc, out = _json do |_|
ASF::SVN.svnmucc_([['help']],'test',ENV_.new,_,'x')
end
@@ -232,7 +232,7 @@ describe "ASF::SVN.svnmucc_" do
expect(ts[0]).to match(/--revision x/)
expect(ts[1]).to eq('svnmucc: E205000: Invalid revision number \'x\'')
end
- it "svnmucc_([['help']],'test',ENV_.new,_,'123') should show revision in command" do
+ it "svnmucc_([['help']],'test',ENV_.new,_,'123',nil) should show revision in command" do
rc, out = _json do |_|
ASF::SVN.svnmucc_([['help']],'test',ENV_.new,_,'123')
end
@@ -242,7 +242,7 @@ describe "ASF::SVN.svnmucc_" do
expect(ts).to be_kind_of(Array)
expect(ts[0]).to match(/--revision 123/)
end
- it "svnmucc_([['help']],'test',ENV_.new,_,nil,nil) should not show revision in command" do
+ it "svnmucc_([['help']],'test',ENV_.new,_,nil,nil,nil) should not show revision in command" do
rc, out = _json do |_|
ASF::SVN.svnmucc_([['help']],'test',ENV_.new,_,nil,nil)
end
@@ -252,7 +252,7 @@ describe "ASF::SVN.svnmucc_" do
expect(ts).to be_kind_of(Array)
expect(ts[0]).not_to match(/--revision/)
end
- it "svnmucc_([['help']],'test',ENV_.new,_,nil,tmpdir) should have tmpdir in command" do
+ it "svnmucc_([['help']],'test',ENV_.new,_,nil,tmpdir,nil) should have tmpdir in command" do
tmpdir=Dir.mktmpdir
path=File.join(tmpdir,'*')
expect(Dir[path]).to eq([])
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 5db35dd..f743b56 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -633,8 +633,8 @@ module ASF
# msg - commit message
# env - environment (username/password)
# _ - Wunderbar context
- # revision - if defined, supply the --revision svnmucc parameter
- # temp - use this temporary directory (and don't remove it)
+ # revision - the --revision svnmucc parameter (unless nil)
+ # temp (optional) - use this temporary directory (and don't remove it)
# The commands must themselves be arrays to ensure correct processing of white-space
# For example:
# commands = []
@@ -642,7 +642,7 @@ module ASF
# commands << ['mv',url1,url2]
# commands << ['rm',url3]
# ASF::SVN.svnmucc_(commands,message,env,_)
- def self.svnmucc_(commands, msg, env, _, revision=nil, temp=nil)
+ def self.svnmucc_(commands, msg, env, _, revision, temp=nil)
raise ArgumentError.new 'commands must be an array' unless Array === commands
raise ArgumentError.new 'msg must not be nil' unless msg