piston 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 8
2
+ :patch: 9
3
3
  :major: 2
4
- :minor: 0
5
4
  :build:
5
+ :minor: 0
@@ -63,8 +63,10 @@ module Piston
63
63
  Dir.chdir(@dir) do
64
64
  logger.debug {"Saving old changes before updating"}
65
65
  git(:commit, '-a', '-m', 'old changes')
66
- logger.debug {"Merging old changes with #{commit}"}
67
- git(:merge, '--squash', commit)
66
+ target = commit
67
+ target = "origin/#{target}" unless target.include?("/") || target =~ /^[a-f\d]+$/i
68
+ logger.debug {"Merging old changes with #{target}"}
69
+ git(:merge, '--squash', target)
68
70
  output = git(:status)
69
71
  added = output.scan(/new file:\s+(.*)$/).flatten
70
72
  deleted = output.scan(/deleted:\s+(.*)$/).flatten
@@ -75,7 +77,10 @@ module Piston
75
77
 
76
78
  def remember_values
77
79
  # find last commit for +commit+ if it wasn't checked out
78
- @sha1 = git('ls-remote', repository.url, commit).match(/\w+/)[0] unless @sha1
80
+ unless @sha1
81
+ out = git('ls-remote', repository.url, commit).match(/\w+/)
82
+ @sha1 = out[0] unless out.nil?
83
+ end
79
84
  # if ls-remote returns nothing, +commit+ must be a commit, not a branch
80
85
  @sha1 = commit unless @sha1
81
86
  { Piston::Git::COMMIT => @sha1, Piston::Git::BRANCH => commit }
@@ -60,7 +60,7 @@ module Piston
60
60
  raise ArgumentError, "Revision #{revision} of #{repository.url} was never checked out -- can't iterate over files" unless @dir
61
61
 
62
62
  Pathname.new(abspath).dirname.mkpath
63
- FileUtils.cp(@dir + relpath, abspath)
63
+ FileUtils.copy_entry(@dir + relpath, abspath) unless abspath.symlink?
64
64
  end
65
65
 
66
66
  # Copies +abspath+ (an absolute path) to +relpath+ (relative to ourselves).
@@ -69,7 +69,7 @@ module Piston
69
69
 
70
70
  target = @dir + relpath
71
71
  Pathname.new(target).dirname.mkpath
72
- FileUtils.cp(abspath, target)
72
+ FileUtils.copy_entry(abspath, target) unless abspath.symlink?
73
73
  end
74
74
 
75
75
  def remotely_modified
@@ -106,7 +106,11 @@ module Piston
106
106
 
107
107
  private
108
108
  def relative_paths(paths)
109
- paths.map { |item| Pathname.new(item).relative_path_from(@dir) }
109
+ # Paths taken from svn will come with backslashes. We must make sure the argument to
110
+ # Pathname#relative_path_from uses the same kind of slash, otherwise we get an
111
+ # "ArgumentError: different prefix..." error
112
+ rel_dir = RUBY_PLATFORM =~ /mswin/ ? Pathname.new(@dir.to_s.gsub(/\//, '\\')) : @dir
113
+ paths.map { |item| Pathname.new(item).relative_path_from(rel_dir) }
110
114
  end
111
115
  end
112
116
  end
@@ -79,7 +79,7 @@ module Piston
79
79
  added.each do |item|
80
80
  target = path + item
81
81
  target.mkdir unless target.exist?
82
- svn(:add, target)
82
+ svn(:add, '--parents', target)
83
83
  end
84
84
  end
85
85
 
@@ -91,7 +91,7 @@ module Piston
91
91
 
92
92
  def rename(renamed)
93
93
  renamed.each do |from, to|
94
- svn(:mv, path + from, path + to)
94
+ svn(:mv, '--parents', path + from, path + to)
95
95
  end
96
96
  end
97
97
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{piston}
8
- s.version = "2.0.8"
8
+ s.version = "2.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Francois Beausoleil"]
12
- s.date = %q{2010-01-12}
12
+ s.date = %q{2010-08-04}
13
13
  s.default_executable = %q{piston}
14
14
  s.description = %q{Piston makes it easy to merge vendor branches into your own repository, without worrying about which revisions were grabbed or not. Piston will also keep your local changes in addition to the remote changes.}
15
15
  s.email = %q{francois@teksol.info}
@@ -113,12 +113,11 @@ Gem::Specification.new do |s|
113
113
  "test/unit/working_copy/test_validate.rb",
114
114
  "tmp/.gitignore"
115
115
  ]
116
- s.has_rdoc = false
117
116
  s.homepage = %q{http://francois.github.com/piston}
118
117
  s.rdoc_options = ["--charset=UTF-8"]
119
118
  s.require_paths = ["lib"]
120
119
  s.rubyforge_project = %q{piston}
121
- s.rubygems_version = %q{1.3.5}
120
+ s.rubygems_version = %q{1.3.7}
122
121
  s.summary = %q{Ease your vendor branch management worries}
123
122
  s.test_files = [
124
123
  "test/integration_helpers.rb",
@@ -166,7 +165,7 @@ Gem::Specification.new do |s|
166
165
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
167
166
  s.specification_version = 3
168
167
 
169
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
168
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
170
169
  s.add_development_dependency(%q<cucumber>, [">= 0.1.16"])
171
170
  s.add_runtime_dependency(%q<main>, [">= 2.8.3"])
172
171
  s.add_runtime_dependency(%q<log4r>, [">= 1.0.5"])
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piston
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 2
8
+ - 0
9
+ - 9
10
+ version: 2.0.9
5
11
  platform: ruby
6
12
  authors:
7
13
  - Francois Beausoleil
@@ -9,49 +15,73 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-01-12 00:00:00 -05:00
18
+ date: 2010-08-04 00:00:00 -04:00
13
19
  default_executable: piston
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: cucumber
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 59
30
+ segments:
31
+ - 0
32
+ - 1
33
+ - 16
23
34
  version: 0.1.16
24
- version:
35
+ type: :development
36
+ version_requirements: *id001
25
37
  - !ruby/object:Gem::Dependency
26
38
  name: main
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
30
42
  requirements:
31
43
  - - ">="
32
44
  - !ruby/object:Gem::Version
45
+ hash: 41
46
+ segments:
47
+ - 2
48
+ - 8
49
+ - 3
33
50
  version: 2.8.3
34
- version:
51
+ type: :runtime
52
+ version_requirements: *id002
35
53
  - !ruby/object:Gem::Dependency
36
54
  name: log4r
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
40
58
  requirements:
41
59
  - - ">="
42
60
  - !ruby/object:Gem::Version
61
+ hash: 29
62
+ segments:
63
+ - 1
64
+ - 0
65
+ - 5
43
66
  version: 1.0.5
44
- version:
67
+ type: :runtime
68
+ version_requirements: *id003
45
69
  - !ruby/object:Gem::Dependency
46
70
  name: activesupport
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
50
74
  requirements:
51
75
  - - ">="
52
76
  - !ruby/object:Gem::Version
77
+ hash: 15
78
+ segments:
79
+ - 2
80
+ - 0
81
+ - 0
53
82
  version: 2.0.0
54
- version:
83
+ type: :runtime
84
+ version_requirements: *id004
55
85
  description: Piston makes it easy to merge vendor branches into your own repository, without worrying about which revisions were grabbed or not. Piston will also keep your local changes in addition to the remote changes.
56
86
  email: francois@teksol.info
57
87
  executables:
@@ -155,7 +185,7 @@ files:
155
185
  - test/unit/working_copy/test_rememberance.rb
156
186
  - test/unit/working_copy/test_validate.rb
157
187
  - tmp/.gitignore
158
- has_rdoc: false
188
+ has_rdoc: true
159
189
  homepage: http://francois.github.com/piston
160
190
  licenses: []
161
191
 
@@ -165,21 +195,27 @@ rdoc_options:
165
195
  require_paths:
166
196
  - lib
167
197
  required_ruby_version: !ruby/object:Gem::Requirement
198
+ none: false
168
199
  requirements:
169
200
  - - ">="
170
201
  - !ruby/object:Gem::Version
202
+ hash: 3
203
+ segments:
204
+ - 0
171
205
  version: "0"
172
- version:
173
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
+ none: false
174
208
  requirements:
175
209
  - - ">="
176
210
  - !ruby/object:Gem::Version
211
+ hash: 3
212
+ segments:
213
+ - 0
177
214
  version: "0"
178
- version:
179
215
  requirements: []
180
216
 
181
217
  rubyforge_project: piston
182
- rubygems_version: 1.3.5
218
+ rubygems_version: 1.3.7
183
219
  signing_key:
184
220
  specification_version: 3
185
221
  summary: Ease your vendor branch management worries