Skip to content

Commit

Permalink
git-svn: 0.9.1: add --version and copyright/license (GPL v2+) informa…
Browse files Browse the repository at this point in the history
…tion

Signed-off-by: Eric Wong <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Feb 20, 2006
1 parent 96a40b2 commit 551ce28
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions contrib/git-svn/git-svn.perl
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env perl
# Copyright (C) 2006, Eric Wong <[email protected]>
# License: GPL v2 or later
use warnings;
use strict;
use vars qw/ $AUTHOR $VERSION
$SVN_URL $SVN_INFO $SVN_WC
$GIT_SVN_INDEX $GIT_SVN
$GIT_DIR $REV_DIR/;
$AUTHOR = 'Eric Wong <[email protected]>';
$VERSION = '0.9.0';
$VERSION = '0.9.1';
$GIT_DIR = $ENV{GIT_DIR} || "$ENV{PWD}/.git";
$GIT_SVN = $ENV{GIT_SVN_ID} || 'git-svn';
$GIT_SVN_INDEX = "$GIT_DIR/$GIT_SVN/index";
Expand All @@ -31,7 +33,7 @@
my $sha1 = qr/[a-f\d]{40}/;
my $sha1_short = qr/[a-f\d]{6,40}/;
my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,
$_find_copies_harder, $_l);
$_find_copies_harder, $_l, $_version);

GetOptions( 'revision|r=s' => \$_revision,
'no-ignore-externals' => \$_no_ignore_ext,
Expand All @@ -41,6 +43,7 @@
'help|H|h' => \$_help,
'find-copies-harder' => \$_find_copies_harder,
'l=i' => \$_l,
'version|V' => \$_version,
'no-stop-on-copy' => \$_no_stop_copy );
my %cmd = (
fetch => [ \&fetch, "Download new revisions from SVN" ],
Expand All @@ -66,6 +69,7 @@
}
}
usage(0) if $_help;
version() if $_version;
usage(1) unless (defined $cmd);
svn_check_ignore_externals();
$cmd{$cmd}->[0]->(@ARGV);
Expand All @@ -91,6 +95,11 @@ sub usage {
exit $exit;
}

sub version {
print "git-svn version $VERSION\n";
exit 0;
}

sub rebuild {
$SVN_URL = shift or undef;
my $repo_uuid;
Expand Down

0 comments on commit 551ce28

Please sign in to comment.