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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbba4dae3a7f40041202b269e9082afdae2c7fa1
4
- data.tar.gz: 7b86cda09558d0fdca998382f41acb80620aa9ca
3
+ metadata.gz: 5a84fa200fd38076ba2001eae98357c7fdc7c4f3
4
+ data.tar.gz: c7492259bd925af2e146716d44c1453c93c2e94b
5
5
  SHA512:
6
- metadata.gz: b51931a3a3f0c072b3523c6f1e6a47d415b92e0a39daf480bd47077bee54e2d4be297a2057c7adc44a03f74ea7c217621140df9559d5bea98cc314f656d5ab5c
7
- data.tar.gz: 41d755fdce894a45951cac61233a12bbe75e8f9acd49392c92de7d69a1be19a9581eb2dd1f7e33378af7f4b44a0e387f56f36ca37ef11f1ce50554e596721423
6
+ metadata.gz: cc3dfc80506eda2eeff7733003a1b505c493272255e92c42b7d60c6f15df8bcab8d109748999dc6c0c7c57724cb7f0a71eba33a11e88e25499ee7cbcb1b69611
7
+ data.tar.gz: 40a8b8e8c9d11972cc2f53fa2c959e4e6c95c703039165b480653976e25a5a26f8f7f9177eae2b6cbbac2ca5f94a224d01a495f9025082b74a665ebe9f1d86ac
@@ -1,4 +1,4 @@
1
1
  module SvnCommandHelper
2
2
  # version
3
- VERSION = "1.0.1"
3
+ VERSION = "1.1.0"
4
4
  end
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svn_command_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Narazaka