r10k 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.mkd +19 -0
- data/lib/r10k/git/rugged/bare_repository.rb +7 -27
- data/lib/r10k/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f96ed480367c515d5ba72c0f735b0fd4b52390b1
|
4
|
+
data.tar.gz: c907603955fee6cdf92b90a60082dcbdf2b50803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7062fe22e3adda24a7cc2d94e1ac43d8816d0c532657e0a8fee0e8213012e41e7b7d7aa91a640f6c90fdbe66e55b0c7513e958801ea0bd9d2fb4113a59e218ba
|
7
|
+
data.tar.gz: 805585701d26d633d8e43c3d62acf7564eecce984209860edf98fc449938aaf1a9d356cc1d372ce2ca18a84aaee803c231883f43346ee88a45c29274988c5dd0
|
data/CHANGELOG.mkd
CHANGED
@@ -1,6 +1,25 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
2.4.5
|
5
|
+
-----
|
6
|
+
|
7
|
+
2016/12/01
|
8
|
+
|
9
|
+
(RK-78) Use :prune option for #fetch in Rugged::BareRepository
|
10
|
+
|
11
|
+
Versions of the "rugged" gem prior to 0.24.0 lacked the ability to automatically
|
12
|
+
"prune" branches from a local repo that no longer existed in the matching remote
|
13
|
+
repo after a fetch. To work around this issue, r10k included code that would
|
14
|
+
manually remove/recreate branches during a fetch. Since "rugged" 0.24.0 is now
|
15
|
+
widely available, r10k has been updated to use the built-in "prune" option
|
16
|
+
during a fetch and the workaround code has been removed.
|
17
|
+
|
18
|
+
NOTE: If you use the "rugged" gem with r10k, you will need to manually upgrade
|
19
|
+
it to a version >= 0.24.0 to take advantage of the new functionality. If you
|
20
|
+
are using a "rugged" version less than 0.24.0, r10k will now issue a warning
|
21
|
+
every time it fetches from a remote git repository.
|
22
|
+
|
4
23
|
2.4.4
|
5
24
|
-----
|
6
25
|
2016/11/16
|
@@ -49,9 +49,14 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
|
|
49
49
|
#
|
50
50
|
# @return [void]
|
51
51
|
def fetch(remote_name='origin')
|
52
|
-
backup_branches = wipe_branches
|
53
52
|
logger.debug1 { _("Fetching remote '%{remote_name}' at %{path}") % {remote_name: remote_name, path: @path } }
|
54
|
-
|
53
|
+
|
54
|
+
# Check to see if we have a version of Rugged that supports "fetch --prune" and warn if not
|
55
|
+
if defined?(Rugged::Version) && !Gem::Dependency.new('rugged', '>= 0.24.0').match?('rugged', Rugged::Version)
|
56
|
+
logger.warn { _("Rugged versions prior to 0.24.0 do not support pruning stale branches during fetch, please upgrade your \'rugged\' gem. (Current version is: %{version})") % {version: Rugged::Version} }
|
57
|
+
end
|
58
|
+
|
59
|
+
options = {:credentials => credentials, :prune => true}
|
55
60
|
refspecs = ['+refs/*:refs/*']
|
56
61
|
|
57
62
|
remote = remotes[remote_name]
|
@@ -64,7 +69,6 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
|
|
64
69
|
|
65
70
|
report_transfer(results, remote_name)
|
66
71
|
rescue Rugged::SshError, Rugged::NetworkError => e
|
67
|
-
restore_branches(backup_branches)
|
68
72
|
if e.message =~ /Unsupported proxy scheme for/
|
69
73
|
message = e.message + "As of curl ver 7.50.2, unsupported proxy schemes no longer fall back to HTTP."
|
70
74
|
else
|
@@ -72,34 +76,10 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
|
|
72
76
|
end
|
73
77
|
raise R10K::Git::GitError.new(message, :git_dir => git_dir, :backtrace => e.backtrace)
|
74
78
|
rescue
|
75
|
-
restore_branches(backup_branches)
|
76
79
|
raise
|
77
80
|
end
|
78
81
|
|
79
82
|
def exist?
|
80
83
|
@path.exist?
|
81
84
|
end
|
82
|
-
|
83
|
-
def wipe_branches
|
84
|
-
backup_branches = {}
|
85
|
-
with_repo do |repo|
|
86
|
-
repo.branches.each do |branch|
|
87
|
-
if !branch.head?
|
88
|
-
backup_branches[branch.name] = branch.target_id
|
89
|
-
repo.branches.delete(branch)
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
backup_branches
|
94
|
-
end
|
95
|
-
|
96
|
-
def restore_branches(backup_branches)
|
97
|
-
with_repo do |repo|
|
98
|
-
backup_branches.each_pair do |name, ref|
|
99
|
-
if !repo.branches.exist?(name)
|
100
|
-
repo.create_branch(name, ref)
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
85
|
end
|
data/lib/r10k/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r10k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -538,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
538
538
|
version: '0'
|
539
539
|
requirements: []
|
540
540
|
rubyforge_project:
|
541
|
-
rubygems_version: 2.
|
541
|
+
rubygems_version: 2.5.1
|
542
542
|
signing_key:
|
543
543
|
specification_version: 4
|
544
544
|
summary: Puppet environment and module deployment
|