lib/rim/command/sync.rb in esr-rim-1.2.2 vs lib/rim/command/sync.rb in esr-rim-1.3.0

- old
+ new

@@ -42,10 +42,13 @@ @module_options[:ignores] = ignores || "" end opts.on("-m", "--message MESSAGE", String, "Message header to provide to each commit.") do |message| @message = message end + opts.on("-d", "--subdir SUBDIR", String, "Sync just a subdir from the remote module.") do |subdir| + @module_options[:subdir] = subdir + end opts.on("-s", "--split", "Create a separate commit for each module.") do @split = true end opts.on("-b", "--rebase", "Rebase after successful sync.") do @rebase = true @@ -61,11 +64,16 @@ if helper.find_file_dir_in_workspace(local_path, RimInfo::InfoFileName) raise RimException.new("There's already a module file. Don't use the create option to sync the module.") elsif !@module_options[:remote_url] || !@module_options[:target_revision] raise RimException.new("Please specify remote URL and target revision for the new module.") else - helper.add_module_info(helper.create_module_info(@module_options[:remote_url], local_path, @module_options[:target_revision], \ - @module_options[:ignores])) + helper.add_module_info(helper.create_module_info( + @module_options[:remote_url], + local_path, + @module_options[:target_revision], + @module_options[:ignores], + @module_options[:subdir], + )) end else helper.modules_from_paths(@all ? helper.module_paths(ARGV, @excludedirs) : ARGV, @module_options) end helper.check_arguments