Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to set specific revision when using Subversion as SCM #1546

Closed
wants to merge 12 commits into from

Conversation

marcovtwout
Copy link
Contributor

No description provided.

@marcovtwout
Copy link
Contributor Author

Deploy config example:

set :svn_revision, 24

@leehambley
Copy link
Member

All the tests failed, could you please try again?

@marcovtwout
Copy link
Contributor Author

Sorry for the many commits, I haven't had time yet to set up local testing.

@marcovtwout
Copy link
Contributor Author

Existing test cases now pass.

I naively tried to add a new test case by copying and modifying it in the same file, but I guess I am missing something. Could you point me in the right direction? marcovtwout@14a0a86

context.expects(:execute).with(:svn, :update, '--username someuser', '--password somepassword', '--revision 12345')
context.expects(:fetch).twice.with(:svn_username).returns('someuser')
context.expects(:fetch).twice.with(:svn_password).returns('somepassword')
context.expects(:fetch).once.with(:svn_revision).returns('12345')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be context.expects(:fetch).twice.

… based on the Travis build which is showing the failing test:

Failures:
  1) Capistrano::Svn::DefaultStrategy#update_specific_revision should run svn update and update to a specific revision
     Failure/Error: subject.update
     Mocha::ExpectationError:
       unexpected invocation: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_revision)
       unsatisfied expectations:
       - expected exactly once, invoked twice: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_revision)
       - expected exactly once, not yet invoked: #<#<Class:0x00000003740b78>:0x3740b28>.execute(:svn, :update, '--username someuser', '--password somepassword', '--revision 12345')
       satisfied expectations:
       - expected exactly twice, invoked twice: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_password)
       - expected exactly twice, invoked twice: #<#<Class:0x00000003740b78>:0x3740b28>.fetch(:svn_username)
     # ./lib/capistrano/scm.rb:51:in `fetch'
     # ./lib/capistrano/svn.rb:12:in `svn'
     # ./lib/capistrano/svn.rb:32:in `update'
     # ./spec/lib/capistrano/svn_spec.rb:77:in `block (3 levels) in <module:Capistrano>'

@marcovtwout
Copy link
Contributor Author

Anything left to do before this can be merged?

@leehambley
Copy link
Member

I'll double check. Thanks for the ping.

@mattbrictson
Copy link
Member

@marcovtwout Can you add a CHANGELOG entry for this and then squash all the commits down to a single commit? Then I can merge it. Thanks

@marcovtwout
Copy link
Contributor Author

#1573

@marcovtwout marcovtwout deleted the svn-revision branch January 25, 2016 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants