svnkit 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: acca2d3f17aa68573a1ce34e663353046ab26307
4
+ data.tar.gz: 6db92ea2f51fb64b82db9567fd408b7400952358
5
+ SHA512:
6
+ metadata.gz: cb867fdb22540530b696d1ee8a134adc3ea2558817a8961e1780fc45977ed69cad2c77dfc7a08e089a2e53985c3685c15df60307051288b65540816cc1b86881
7
+ data.tar.gz: 8494d3328a0d778834f4233f9ad88e4fb5b0a6c0354e15614fe28a3ec1f9c55040065063d78431ec0fd0e0b32abaac44d8ffc741b273dcd4a8ac21843298efc2
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/lib/svnkit.rb ADDED
@@ -0,0 +1,85 @@
1
+ #encoding:utf-8
2
+ require 'java'
3
+ require 'svnkit/svnkit-1.8.3.jar'
4
+ require 'svnkit/sqljet-1.1.10.jar'
5
+ require 'svnkit/antlr-runtime-3.4.jar'
6
+ require 'svnkit/sequence-library-1.0.2.jar'
7
+ ['org.tmatesoft.svn.core.wc.SVNClientManager',
8
+ 'org.tmatesoft.svn.core.auth.BasicAuthenticationManager',
9
+ 'org.tmatesoft.svn.core.wc.ISVNOptions',
10
+ 'org.tmatesoft.svn.core.wc.SVNWCUtil',
11
+ 'org.tmatesoft.svn.core.SVNURL',
12
+ 'org.tmatesoft.svn.core.SVNDepth',
13
+ 'java.io.File',
14
+ 'org.tmatesoft.svn.core.wc.SVNUpdateClient',
15
+ 'org.tmatesoft.svn.core.wc.SVNCopySource',
16
+ 'org.tmatesoft.svn.core.wc.SVNRevision',
17
+ 'org.tmatesoft.svn.core.SVNProperties',
18
+ 'org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl'].each do |klass|
19
+ java_import klass
20
+ end
21
+ class SVN
22
+ attr_accessor :client
23
+ def initialize user,password
24
+ SVNRepositoryFactoryImpl.setup
25
+ authormanager = BasicAuthenticationManager.new user,password
26
+ options = SVNWCUtil.createDefaultOptions(true)
27
+ @client = SVNClientManager.newInstance(options,authormanager)
28
+ end
29
+ def checkout svnurl,des
30
+ url = SVNURL.parseURIEncoded svnurl
31
+ #respository = @client.createRepository url,true
32
+ #revision = respository.getLatestRevision
33
+ #depth = SVNDepth.getInfinityOrEmptyDepth true
34
+ desFile = File.new des
35
+ updateclient = @client.getUpdateClient
36
+ updateclient.setIgnoreExternals false
37
+ updateclient.doCheckout(url, desFile, SVNRevision::HEAD, SVNRevision::HEAD, SVNDepth::INFINITY,true)
38
+ end
39
+
40
+ def copy svnurl,desturl
41
+ copyclient = @client.getCopyClient
42
+ copyclient.setIgnoreExternals false
43
+ url =SVNURL.parseURIEncoded svnurl
44
+ des=SVNURL.parseURIEncoded desturl
45
+ copysources=[]
46
+ copysources << SVNCopySource.new(SVNRevision::HEAD, SVNRevision::HEAD, url)
47
+ copyclient.doCopy(copysources.to_java("org.tmatesoft.svn.core.wc.SVNCopySource"), des, false, false, false, "copy", nil);
48
+ end
49
+
50
+ def upload svnurl,targetfile
51
+ commitclient = @client.getCommitClient
52
+ commitclient.setIgnoreExternals false
53
+ url = SVNURL.parseURIEncoded svnurl
54
+ target = File.new targetfile
55
+ commitclient.doImport(target,url, "import operation!", nil, true, true,SVNDepth::INFINITY)
56
+ end
57
+ def delete svnurl
58
+ commitclient = @client.getCommitClient
59
+ commitclient.setIgnoreExternals false
60
+ url =SVNURL.parseURIEncoded svnurl
61
+ deleteurls = []
62
+ deleteurls << url
63
+ commitclient.doDelete(deleteurls.to_java("org.tmatesoft.svn.core.SVNURL"), "delete model");
64
+ end
65
+ def export svnurl,despath
66
+ updateclient = @client.getUpdateClient
67
+ updateclient.setIgnoreExternals false
68
+ url =SVNURL.parseURIEncoded svnurl
69
+ des = File.new despath
70
+ updateclient.doExport(url,des, SVNRevision::HEAD, SVNRevision::HEAD, "downloadModel",true,SVNDepth::INFINITY)
71
+ end
72
+ def update targetpath
73
+ updateclient = @client.getUpdateClient
74
+ updateclient.setIgnoreExternals false
75
+ target = File.new targetpath
76
+ updateclient.doUpdate(target, SVNRevision::HEAD,SVNDepth::INFINITY,true, true)
77
+ end
78
+ end
79
+ #svn = SVN.new 'chwu','asland'
80
+ #svn.checkout("https://192.168.75.168:8888/svn/QM_CITI1.0/Trunk/Project/06.Test/项目实施/标准环境/CustomCI V1.1",'E:\\RubyProject\\SVNKIT\\CIManager\\')
81
+ #svn.copy("https://192.168.75.168:8888/svn/QM_CITI1.0/Trunk/Project/06.Test/项目实施/标准环境/CustomCI V1.1","https://192.168.75.168:8888/svn/QM_CITI1.0/Trunk/Development/Source/CIManager")
82
+ #svn.upload("https://192.168.75.168:8888/svn/QM_CITI1.0/Trunk/Development/Source/CIManager/dk.rb","C:\\dk.rb")
83
+ #svn.delete "https://192.168.75.168:8888/svn/QM_CITI1.0/Trunk/Development/Source/CIManager/dk.rb"
84
+ #svn.export "https://192.168.75.168:8888/svn/QM_CITI1.0/Trunk/Development/Source/CIManager/","F:\\"
85
+ #svn.update "E:\\QM_CITI1.0\\项目实施\\标准环境"
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: svnkit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - aslandhu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: svnkit wrap
14
+ email: chwu@iflytek.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/svnkit.rb
20
+ - lib/svnkit/antlr-runtime-3.4.jar
21
+ - lib/svnkit/jna-3.5.2.jar
22
+ - lib/svnkit/jsch.agentproxy.connector-factory-0.0.7.jar
23
+ - lib/svnkit/jsch.agentproxy.core-0.0.7.jar
24
+ - lib/svnkit/jsch.agentproxy.pageant-0.0.7.jar
25
+ - lib/svnkit/jsch.agentproxy.sshagent-0.0.7.jar
26
+ - lib/svnkit/jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar
27
+ - lib/svnkit/jsch.agentproxy.usocket-jna-0.0.7.jar
28
+ - lib/svnkit/jsch.agentproxy.usocket-nc-0.0.7.jar
29
+ - lib/svnkit/platform-3.5.2.jar
30
+ - lib/svnkit/sequence-library-1.0.2.jar
31
+ - lib/svnkit/sqljet-1.1.10.jar
32
+ - lib/svnkit/svnkit-1.8.3.jar
33
+ - lib/svnkit/svnkit-cli-1.8.3.jar
34
+ - lib/svnkit/svnkit-javahl16-1.8.3.jar
35
+ - lib/svnkit/trilead-ssh2-1.0.0-build217.jar
36
+ homepage: http://172.16.91.84:8080/jenkins
37
+ licenses:
38
+ - MIT
39
+ metadata: {}
40
+ post_install_message:
41
+ rdoc_options: []
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements: []
55
+ rubyforge_project:
56
+ rubygems_version: 2.1.9
57
+ signing_key:
58
+ specification_version: 4
59
+ summary: svnkit!
60
+ test_files: []