esr-rim 1.3.9 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzMzYjRlMWZiZWE5YmFiMGYzMjI1YWEzODczMTU1N2I4YWIxYmVjOQ==
4
+ ZTAxYjg0NjcxMmVhMThhNTA4MWI0ZDU0YzQxZGEzNmQ3NzJkYWM0Yg==
5
5
  data.tar.gz: !binary |-
6
- YTY4NGY4M2MwNTJmYTI0ZGUzMWY5N2IzNTliYTQ4YzNiNDhmMzdmZQ==
6
+ MWFjMjVhMTY4YzYyNGQxMTRmNDVlNzU1ZjNiOTdiZmMyOGYzODZmNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGY0YzQ3NjU2ODJhNTg0OTk0MmM4NTRjOGZhZmQxMTYxOGNkZWJhNDc0YzM2
10
- OGIzOTFhMTAyZjYxNmJlZGQwYWYzMTY5NDBkMjY1MDYxZjVhYzUyMzEzMGU1
11
- MmVkNjAzMjkyMjVlZTY5NGQ2OGQ2ZDViZDIzNGVhYmM3NzE5OGM=
9
+ MGJlMTY3YTQ1N2Y1MjllOTVmZjZjNzM5NGM0M2FjYjMxYWI4MzNiM2VlZWU3
10
+ Y2VmNDNkMGJjODNmYzU1M2E0ZmMxMWM3ODgxOTAxNWI2M2VjZDRlNmJkMGFk
11
+ MGQ1NTE3YTI4MmFhYjk4NDBmNzYzODk3NmE3ZTkzYTJiZjU3N2Y=
12
12
  data.tar.gz: !binary |-
13
- NjdmZjM2ODc4MWMwNTc1YTlmZGM2NjRlODg2NTI4MGNlOTFhYmU1NWRhZWYx
14
- OWIyZTE5NmYyN2JhYjhhOGE2MmE5YWY1YjY0MGI2ZmEwOTkzN2QyZWQ3YjBk
15
- ZjZiNTRjMmJkYjc4YWFjMWI1NWM1NTI1OWY2MzFmOTYzY2JlMTE=
13
+ NTg0MzcxODM3YjQyYjVjM2JjY2I1N2ZiMDZmNDZlZTI0YjM3NWM2YjA1NmY2
14
+ YmQzYjdhNzE1MWFjNTI4NmI3ZjIyYzc1ZTRlZGM0YjYyYzgxMWYzY2FkZDc3
15
+ YmExNjgxZDI0ZjEyOTE0MjkyMDY1YzFmNjJlODczNGY3NTkxMmE=
data/CHANGELOG CHANGED
@@ -122,3 +122,7 @@
122
122
  # 1.3.9
123
123
 
124
124
  * Changed handling of parallel tasks due to robustness problems
125
+
126
+ # 1.4.0
127
+
128
+ * fixed Issue #20: Add revision timestamp to .riminfo
@@ -144,6 +144,17 @@ class GitSession
144
144
  end
145
145
  sha1
146
146
  end
147
+
148
+ # returns some informations about a revision
149
+ def rev_infos(rev, desired)
150
+ info = {}
151
+ desired.each_pair do |key, value|
152
+ execute "git log -1 --format=#{value} #{rev} --" do |out, e|
153
+ info[key] = out.strip if !e
154
+ end
155
+ end
156
+ info
157
+ end
147
158
 
148
159
  # returns the SHA-1 representations of the heads of all remote branches
149
160
  def remote_branch_revs
@@ -22,7 +22,7 @@ def initialize(workspace_root, logger)
22
22
  rim_dir = File.join(File.expand_path(ENV['HOME']), ".rim") if rim_dir.nil? && ENV.has_key?('HOME')
23
23
  if rim_dir
24
24
  @rim_path = File.join(rim_dir, Processor.shorten_path(@ws_root))
25
- else
25
+ else
26
26
  @rim_path = File.join(@ws_root, ".rim")
27
27
  end
28
28
  @logger = logger
@@ -36,6 +36,12 @@ class RimInfo
36
36
  attr_accessor d
37
37
  end
38
38
 
39
+ @@git_infos = {
40
+ :committer_date => "%ci"
41
+ }
42
+
43
+ attr_accessor :infos
44
+
39
45
  def self.exists?(dir)
40
46
  File.exist?(info_file(dir))
41
47
  end
@@ -52,6 +58,10 @@ class RimInfo
52
58
  mi
53
59
  end
54
60
 
61
+ def self.git_infos
62
+ @@git_infos
63
+ end
64
+
55
65
  def dirty?
56
66
  @dirty
57
67
  end
@@ -81,6 +91,12 @@ class RimInfo
81
91
  AttrsDef.each do |a|
82
92
  send("#{a}=".to_sym, attrs[a])
83
93
  end
94
+ @@git_infos.each_pair do |key, value|
95
+ if attrs.has_key?(key)
96
+ @infos ||= {}
97
+ @infos[key] = attrs[key]
98
+ end
99
+ end
84
100
  @dirty = checksum != calc_sha1(content)
85
101
  end
86
102
 
@@ -110,10 +126,18 @@ class RimInfo
110
126
  end
111
127
 
112
128
  def to_s
113
- max_len = AttrsDef.collect{|a| a.size}.max
114
- AttrsDef.collect { |a|
129
+ i = @infos || {}
130
+ max_len = (AttrsDef + i.keys).collect{|a| a.size}.max
131
+ s = AttrsDef.collect { |a|
115
132
  "#{a.to_s.ljust(max_len)}: #{send(a)}"
116
133
  }.join("\n")
134
+ if !i.empty?
135
+ s << "\n\n"
136
+ i.each_pair { |key, value|
137
+ s << "#{key.to_s.ljust(max_len)}: #{value.to_s}\n"
138
+ }
139
+ end
140
+ s
117
141
  end
118
142
 
119
143
  private
@@ -47,6 +47,7 @@ module RIM
47
47
  @rim_info.revision_sha1 = sha1
48
48
  @rim_info.ignores = @module_info.ignores.join(",")
49
49
  @rim_info.subdir = @module_info.subdir
50
+ @rim_info.infos = s.rev_infos(@module_info.target_revision, RimInfo.git_infos)
50
51
  @rim_info.to_dir(local_path)
51
52
  DirtyCheck.mark_clean(local_path)
52
53
  end
@@ -2,7 +2,7 @@ module RIM
2
2
 
3
3
  module Version
4
4
 
5
- Version = "1.3.9"
5
+ Version = "1.4.0"
6
6
 
7
7
  end
8
8
 
@@ -0,0 +1 @@
1
+ more content
@@ -0,0 +1 @@
1
+ some content
@@ -0,0 +1 @@
1
+ ignored stuff
@@ -0,0 +1 @@
1
+ some other content
@@ -0,0 +1 @@
1
+ some content
@@ -0,0 +1 @@
1
+ anything
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esr-rim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.9
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ESR Labs AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2017-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: subcommand
@@ -69,6 +69,9 @@ files:
69
69
  - lib/rim/upload_module_helper.rb
70
70
  - lib/rim/version.rb
71
71
  - test/command_helper_test.rb
72
+ - test/dirty_check/dir1/file2
73
+ - test/dirty_check/file1
74
+ - test/dirty_check/ign_file1
72
75
  - test/dirty_check_test.rb
73
76
  - test/file_helper_test.rb
74
77
  - test/git_test.rb
@@ -76,6 +79,9 @@ files:
76
79
  - test/manifest_test_dir/manifest.rim
77
80
  - test/manifest_test_dir/subdir/only_to_keep_folder_in_git.txt
78
81
  - test/processor_test.rb
82
+ - test/rim_info/mod1/dir1/file2
83
+ - test/rim_info/mod1/file1
84
+ - test/rim_info/unrelated_file
79
85
  - test/rim_info_test.rb
80
86
  - test/status_builder_test.rb
81
87
  - test/sync_helper_test.rb