svn_command_helper 0.3.3 → 0.3.4

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: 4136d2e62bccd090142f60b3066fe827358ed331
4
- data.tar.gz: 5cff7f8d944a0df5f62ce831077f1aedb21ffbea
3
+ metadata.gz: 0a4ce823897241b18d9f4884d9247495b2da7386
4
+ data.tar.gz: f96dd812b11e7211102040fd855412bde219f90f
5
5
  SHA512:
6
- metadata.gz: 644a746013d48ae0be9be58fea0dd55e73195c95104c98a9ce111e57eab24fbfa8e22a455d9c6b4ae08c8e9c8d9d1103655ee1938ca2f83d1403515020c60f80
7
- data.tar.gz: 71025eca99d0eac8f41dc23e21f07d1c07c9557c707672e0b8a70f90d83d2b158f65ca1f05570b2a5cd3c9face0472965cd5756c463ca2b2177e93c4c40fae3f
6
+ metadata.gz: e4da0345f5b11ea16723a5764296eddd7321c699c6b924c595ea3a60b80cd29dcc40240ebb6e489fd96625fd29311eaa4e47d8c47bc9a307d7a565f3f296ec9f
7
+ data.tar.gz: a49bcd4829440db97d440718020b40d9ad921c822a5d8def80ee2a10f7e6a7d3e0d31c65c956648e511ce9beaffe7f43b73613bfd19f98b8400259ea284d3686
@@ -178,13 +178,15 @@ module SvnCommandHelper
178
178
  sys "svn copy --parents #{only_from_transactions.map(&:from).join(' ')} #{transaction.to_base} -m '#{message}'"
179
179
  else
180
180
  Dir.mktmpdir do |dir|
181
- sys "svn checkout --depth empty #{transaction.to_base} ."
182
- sys "svn copy --parents #{only_from_transactions.map(&:from).join(' ')} ."
183
- to_exist_transactions.each do |_transaction|
184
- sys "svn update --set-depth infinity #{_transaction.file}"
185
- sys "svn merge --accept theirs-full #{_transaction.from} #{_transaction.file}"
181
+ Dir.chdir(dir) do
182
+ sys "svn checkout --depth empty #{transaction.to_base} ."
183
+ sys "svn copy --parents #{only_from_transactions.map(&:from).join(' ')} ."
184
+ to_exist_transactions.each do |_transaction|
185
+ sys "svn update --set-depth infinity #{_transaction.file}"
186
+ sys "svn merge --accept theirs-full #{_transaction.from} #{_transaction.file}"
187
+ end
188
+ Svn.commit(message, ".")
186
189
  end
187
- Svn.commit(message, ".")
188
190
  end
189
191
  end
190
192
  end
@@ -197,19 +199,21 @@ module SvnCommandHelper
197
199
  transactions.each do |transaction|
198
200
  raise "copy_multi: #{transaction.from} not exists" unless transaction.from_exist?
199
201
  end
200
- Dir.tmpdir do |dir|
201
- sys "svn checkout --depth empty #{base_uri} ."
202
- transactions.each do |transaction|
203
- relative_to = transaction.relative_to(base_uri)
204
- Svn.update_deep(relative_to, "empty") # mkpath的な なくてもエラーにはならないので
205
-
206
- if transaction.to_exist? # toがある場合マージ
207
- sys "svn merge --accept theirs-full #{transaction.from} #{relative_to}"
208
- else # toがない場合コピー
209
- sys "svn copy --parents #{transaction.from} #{relative_to}"
202
+ Dir.mktmpdir do |dir|
203
+ Dir.chdir(dir) do
204
+ sys "svn checkout --depth empty #{base_uri} ."
205
+ transactions.each do |transaction|
206
+ relative_to = transaction.relative_to(base_uri)
207
+ Svn.update_deep(relative_to, "empty") # mkpath的な なくてもエラーにはならないので
208
+
209
+ if transaction.to_exist? # toがある場合マージ
210
+ sys "svn merge --accept theirs-full #{transaction.from} #{relative_to}"
211
+ else # toがない場合コピー
212
+ sys "svn copy --parents #{transaction.from} #{relative_to}"
213
+ end
210
214
  end
215
+ Svn.commit(message, ".")
211
216
  end
212
- Svn.commit(message, ".")
213
217
  end
214
218
  end
215
219
 
@@ -1,4 +1,4 @@
1
1
  module SvnCommandHelper
2
2
  # version
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
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: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Narazaka