diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-07 01:30:43 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-07 01:30:43 -0700 |
commit | ced38ea252cb8b0315f4d2a54648b11c6c090657 (patch) | |
tree | 0c398a6bf408bb47fafc65c918b24b1bafeed7b1 /git-cvsimport.perl | |
parent | 77e6f5bc1009aa588a3b2235758bf5be13b23d85 (diff) | |
parent | d79073922fcb8c8a0bd57112817a2154f1ed05c1 (diff) | |
download | git-ced38ea252cb8b0315f4d2a54648b11c6c090657.tar.gz git-ced38ea252cb8b0315f4d2a54648b11c6c090657.tar.xz |
Merge branch 'maint'
* maint:
Documentation: tighten dependency for git.{html,txt}
Makefile: iconv() on Darwin has the old interface
t5300-pack-object.sh: portability issue using /usr/bin/stat
t3200-branch.sh: small language nit
usermanual.txt: some capitalization nits
Make builtin-branch.c handle the git config file
rename_ref(): only print a warning when config-file update fails
Distinguish branches by more than case in tests.
Avoid composing too long "References" header.
cvsimport: Improve formating consistency
cvsimport: Reorder options in documentation for better understanding
cvsimport: Improve usage error reporting
cvsimport: Improve documentation of CVSROOT and CVS module determination
cvsimport: sync usage lines with existing options
Conflicts:
Documentation/Makefile
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-x | git-cvsimport.perl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 1a1ba7b1a..ac74bc51b 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -32,12 +32,15 @@ $ENV{'TZ'}="UTC"; our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,$opt_M,$opt_A,$opt_S,$opt_L, $opt_a); my (%conv_author_name, %conv_author_email); -sub usage() { +sub usage(;$) { + my $msg = shift; + print(STDERR "Error: $msg\n") if $msg; print STDERR <<END; Usage: ${\basename $0} # fetch/update GIT from CVS [-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file] - [-p opts-for-cvsps] [-C GIT_repository] [-z fuzz] [-i] [-k] [-u] - [-s subst] [-a] [-m] [-M regex] [-S regex] [CVS_module] + [-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k] + [-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit] + [CVS_module] END exit(1); } @@ -116,7 +119,7 @@ read_repo_config($opts); getopts($opts) or usage(); usage if $opt_h; -@ARGV <= 1 or usage(); +@ARGV <= 1 or usage("You can't specify more than one CVS module"); if ($opt_d) { $ENV{"CVSROOT"} = $opt_d; @@ -129,7 +132,7 @@ if ($opt_d) { } elsif ($ENV{"CVSROOT"}) { $opt_d = $ENV{"CVSROOT"}; } else { - die "CVSROOT needs to be set"; + usage("CVSROOT needs to be set"); } $opt_o ||= "origin"; $opt_s ||= "-"; @@ -148,7 +151,7 @@ if ($#ARGV == 0) { chomp $cvs_tree; close $f; } else { - usage(); + usage("CVS module has to be specified"); } our @mergerx = (); |