File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ module Shards
202
202
203
203
protected def versions_from_tags
204
204
capture(" hg tags --template #{ Process .quote(" {tag}\n " )} " )
205
- .split( '\n' )
205
+ .lines
206
206
.sort!
207
207
.compact_map { |tag | Version .new($1 ) if tag =~ VERSION_TAG }
208
208
end
@@ -267,7 +267,6 @@ module Shards
267
267
return HgTagRef .new value
268
268
when " commit"
269
269
return HgCommitRef .new value
270
- else
271
270
end
272
271
end
273
272
@@ -329,7 +328,7 @@ module Shards
329
328
source = hg_url
330
329
# Remove a "file://" from the beginning, otherwise the path might be invalid
331
330
# on Windows.
332
- source = source[ 7 ..] if source.starts_with? (" file://" )
331
+ source = source.lchop (" file://" )
333
332
334
333
hg_retry(err: " Failed to clone #{ source } " ) do
335
334
# We checkout the working directory so that "." is meaningful.
@@ -349,8 +348,7 @@ module Shards
349
348
private def hg_retry (err = " Failed to update repository" )
350
349
retries = 0
351
350
loop do
352
- yield
353
- break
351
+ return yield
354
352
rescue ex : Error
355
353
retries += 1
356
354
next if retries < 3
You can’t perform that action at this time.
0 commit comments