svn_command_helper 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/svn_command_helper/version.rb +1 -1
- data/lib/svn_command_helper.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbba4dae3a7f40041202b269e9082afdae2c7fa1
|
4
|
+
data.tar.gz: 7b86cda09558d0fdca998382f41acb80620aa9ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b51931a3a3f0c072b3523c6f1e6a47d415b92e0a39daf480bd47077bee54e2d4be297a2057c7adc44a03f74ea7c217621140df9559d5bea98cc314f656d5ab5c
|
7
|
+
data.tar.gz: 41d755fdce894a45951cac61233a12bbe75e8f9acd49392c92de7d69a1be19a9581eb2dd1f7e33378af7f4b44a0e387f56f36ca37ef11f1ce50554e596721423
|
data/lib/svn_command_helper.rb
CHANGED
@@ -33,8 +33,8 @@ module SvnCommandHelper
|
|
33
33
|
# @param [Boolean] recursive --recursive
|
34
34
|
# @return [Array<String>] paths
|
35
35
|
def list(uri, recursive = false)
|
36
|
-
if @list_cache && @list_cache[uri]
|
37
|
-
@list_cache[uri]
|
36
|
+
if @list_cache && @list_cache[recursive][uri]
|
37
|
+
@list_cache[recursive][uri]
|
38
38
|
else
|
39
39
|
list_str = cap("svn list --xml #{recursive ? '-R' : ''} #{uri}")
|
40
40
|
list = REXML::Document.new(list_str).elements.collect("/lists/list/entry") do |entry|
|
@@ -47,7 +47,7 @@ module SvnCommandHelper
|
|
47
47
|
date: Time.iso8601(commit.elements["date"].text),
|
48
48
|
})
|
49
49
|
end
|
50
|
-
@list_cache[uri] = list if @list_cache
|
50
|
+
@list_cache[recursive][uri] = list if @list_cache
|
51
51
|
list
|
52
52
|
end
|
53
53
|
end
|
@@ -76,7 +76,7 @@ module SvnCommandHelper
|
|
76
76
|
|
77
77
|
# svn list cache block
|
78
78
|
def list_cache(&block)
|
79
|
-
@list_cache = {}
|
79
|
+
@list_cache = {true => {}, false => {}}
|
80
80
|
block.call
|
81
81
|
@list_cache = nil
|
82
82
|
end
|