autobuild 1.5.41 → 1.5.42

Sign up to get free protection for your applications and to get access to all the features.
data/Changes.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == Version 1.5.42
2
+ * archive: fix support for using local files
3
+ * git: make "switching branch" messages stand out a bit more
4
+ * cvs: make the CVS support compatible with autoproj (should remain backward
5
+ compatible as well)
6
+
1
7
  == Version 1.5.41
2
8
  * git: properly handle push_to_branch at checkout (was working during updates)
3
9
  * cmake: more specific progress message for configuration
@@ -47,8 +47,13 @@ module Autobuild
47
47
  cached_mtime = File.lstat(cachefile).mtime
48
48
 
49
49
  size, mtime = nil
50
- open @url, :content_length_proc => lambda { |size| } do |file|
51
- mtime = file.last_modified
50
+ if @url.scheme == "file"
51
+ size = File.stat(@url.path).size
52
+ mtime = File.stat(@url.path).mtime
53
+ else
54
+ open @url, :content_length_proc => lambda { |size| } do |file|
55
+ mtime = file.last_modified
56
+ end
52
57
  end
53
58
 
54
59
  if mtime && size
@@ -117,7 +122,9 @@ module Autobuild
117
122
  @options[:cachedir] ||= "#{Autobuild.prefix}/cache"
118
123
 
119
124
  @url = URI.parse(url)
120
- raise ConfigException, "invalid URL #{@url}" unless VALID_URI_SCHEMES.include?(@url.scheme)
125
+ if !VALID_URI_SCHEMES.include?(@url.scheme)
126
+ raise ConfigException, "invalid URL #{@url} (local files must be prefixed with file://)"
127
+ end
121
128
 
122
129
  filename = options[:filename] || File.basename(url).gsub(/\?.*/, '')
123
130
  @mode = options[:mode] || ArchiveImporter.filename_to_mode(filename)
@@ -12,9 +12,13 @@ module Autobuild
12
12
  # This importer uses the 'cvs' tool to perform the import. It defaults
13
13
  # to 'cvs' and can be configured by doing
14
14
  # Autobuild.programs['cvs'] = 'my_cvs_tool'
15
- def initialize(root, name, options = {})
16
- @root = root
17
- @module = name
15
+ def initialize(root_name, options = {})
16
+ options = Kernel.validate_options options, :module => nil, :cvsup => '-dP', :cvsco => '-P'
17
+ @root = root_name
18
+ @module = options[:module]
19
+ if !@module
20
+ raise ArgumentError, "no module given"
21
+ end
18
22
 
19
23
  @program = Autobuild.tool('cvs')
20
24
  @options_up = options[:cvsup] || '-dP'
@@ -71,8 +75,13 @@ module Autobuild
71
75
 
72
76
  # Returns the CVS importer which will get the +name+ module in repository
73
77
  # +repo+. The allowed values in +options+ are described in CVSImporter.new.
74
- def self.cvs(repo, name, options = {})
75
- CVSImporter.new(repo, name, options)
78
+ def self.cvs(module_name, options = {}, backward_compatibility = nil)
79
+ if backward_compatibility
80
+ backward_compatibility[:module] = options
81
+ CVSImporter.new(module_name, backward_compatibility)
82
+ else
83
+ CVSImporter.new(module_name, options)
84
+ end
76
85
  end
77
86
  end
78
87
 
@@ -308,10 +308,10 @@ module Autobuild
308
308
  # Check if the target branch already exists. If it is the
309
309
  # case, check it out. Otherwise, create it.
310
310
  if system("git", "show-ref", "--verify", "--quiet", "refs/heads/#{local_branch}")
311
- package.progress "switching branch of %s to %s" % [package.name, local_branch]
311
+ package.progress " switching branch of %s to %s" % [package.name, local_branch]
312
312
  Subprocess.run(package, :import, Autobuild.tool('git'), 'checkout', local_branch)
313
313
  else
314
- package.progress "checking out branch %s for %s" % [local_branch, package.name]
314
+ package.progress " checking out branch %s for %s" % [local_branch, package.name]
315
315
  Subprocess.run(package, :import, Autobuild.tool('git'), 'checkout', '-b', local_branch, "FETCH_HEAD")
316
316
  end
317
317
  end
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.5.41" unless defined? Autobuild::VERSION
2
+ VERSION = "1.5.42" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- hash: 81
4
+ hash: 87
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
- - 41
10
- version: 1.5.41
9
+ - 42
10
+ version: 1.5.42
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sylvain Joyeux
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-22 00:00:00 Z
18
+ date: 2011-07-14 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake