From d5e2af1524ccdc4613111fc4a127b1fbbc3924f2 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 17 Nov 2008 23:09:43 +0100 Subject: [PATCH] Improve usage --- rcs-fast-export.rb | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/rcs-fast-export.rb b/rcs-fast-export.rb index 0d9df8b..406a2f3 100755 --- a/rcs-fast-export.rb +++ b/rcs-fast-export.rb @@ -3,7 +3,17 @@ require 'pp' def usage - STDERR.puts "#{$0} filename -- fast-export filename's RCS history" + STDERR.puts < mappings + --[no-]tag-each-rev [do not] create a lightweight tag for each RCS revision + +EOM end def not_found(arg) @@ -364,7 +374,8 @@ opts = GetoptLong.new( ['--rcs-suffixes', '-x', GetoptLong::REQUIRED_ARGUMENT], # tag each revision? ['--tag-each-rev', GetoptLong::NO_ARGUMENT], - ['--no-tag-each-rev', GetoptLong::NO_ARGUMENT] + ['--no-tag-each-rev', GetoptLong::NO_ARGUMENT], + ['--help', '-h', '-?', GetoptLong::NO_ARGUMENT] ) # We read options in order, but they apply to all passed parameters. @@ -394,6 +405,9 @@ opts.each do |opt, arg| parse_options[:tag_each_rev] = false when '' file_list << arg + when '--help' + usage + exit end end -- 2.32.0.93.g670b81a890