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 +4 -4
- data/lib/svn_command_helper.rb +21 -17
- data/lib/svn_command_helper/version.rb +1 -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: 0a4ce823897241b18d9f4884d9247495b2da7386
|
4
|
+
data.tar.gz: f96dd812b11e7211102040fd855412bde219f90f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4da0345f5b11ea16723a5764296eddd7321c699c6b924c595ea3a60b80cd29dcc40240ebb6e489fd96625fd29311eaa4e47d8c47bc9a307d7a565f3f296ec9f
|
7
|
+
data.tar.gz: a49bcd4829440db97d440718020b40d9ad921c822a5d8def80ee2a10f7e6a7d3e0d31c65c956648e511ce9beaffe7f43b73613bfd19f98b8400259ea284d3686
|
data/lib/svn_command_helper.rb
CHANGED
@@ -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
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
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.
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
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
|
|