svn_command_helper 1.0.1 → 1.1.0
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 +14 -1
- 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: 5a84fa200fd38076ba2001eae98357c7fdc7c4f3
|
4
|
+
data.tar.gz: c7492259bd925af2e146716d44c1453c93c2e94b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc3dfc80506eda2eeff7733003a1b505c493272255e92c42b7d60c6f15df8bcab8d109748999dc6c0c7c57724cb7f0a71eba33a11e88e25499ee7cbcb1b69611
|
7
|
+
data.tar.gz: 40a8b8e8c9d11972cc2f53fa2c959e4e6c95c703039165b480653976e25a5a26f8f7f9177eae2b6cbbac2ca5f94a224d01a495f9025082b74a665ebe9f1d86ac
|
data/lib/svn_command_helper.rb
CHANGED
@@ -256,8 +256,9 @@ module SvnCommandHelper
|
|
256
256
|
# @param [Boolean] ignore_eol_style -x --ignore-eol-style
|
257
257
|
# @param [Boolean] ignore_space_change -x --ignore-space-change
|
258
258
|
# @param [Boolean] ignore_all_space -x --ignore-all-space
|
259
|
+
# @param [Boolean] with_list_info with svn list info
|
259
260
|
# @return [Array] diff files list
|
260
|
-
def summarize_diff(from_uri, to_uri, ignore_properties: false, ignore_eol_style: false, ignore_space_change: false, ignore_all_space: false)
|
261
|
+
def summarize_diff(from_uri, to_uri, ignore_properties: false, ignore_eol_style: false, ignore_space_change: false, ignore_all_space: false, with_list_info: false)
|
261
262
|
options = []
|
262
263
|
options << "-x --ignore-eol-style" if ignore_eol_style
|
263
264
|
options << "-x --ignore-space-change" if ignore_space_change
|
@@ -275,6 +276,18 @@ module SvnCommandHelper
|
|
275
276
|
if ignore_properties
|
276
277
|
diff_list.reject! {|diff| diff.item == "none"}
|
277
278
|
end
|
279
|
+
if with_list_info
|
280
|
+
from_entries = Svn.list_recursive(from_uri)
|
281
|
+
to_entries = Svn.list_recursive(to_uri)
|
282
|
+
from_entries_hash = from_entries.each.with_object({}) {|file, entries_hash| entries_hash[file.path] = file}
|
283
|
+
to_entries_hash = to_entries.each.with_object({}) {|file, entries_hash| entries_hash[file.path] = file}
|
284
|
+
from_uri_path = Pathname.new(from_uri)
|
285
|
+
diff_list.each do |diff|
|
286
|
+
path = Pathname.new(diff.path).relative_path_from(from_uri_path).to_s
|
287
|
+
diff.from = from_entries_hash[path]
|
288
|
+
diff.to = to_entries_hash[path]
|
289
|
+
end
|
290
|
+
end
|
278
291
|
diff_list
|
279
292
|
end
|
280
293
|
|