summaryrefslogtreecommitdiff
path: root/git-cvsimport-script
diff options
context:
space:
mode:
authorMatthias Urlichs <smurf@kiste.(none)>2005-06-28 17:58:40 (GMT)
committerMatthias Urlichs <smurf@kiste.(none)>2005-06-28 17:58:40 (GMT)
commitf65ae603db8ffc36e25cc835eeffcfe4909c3148 (patch)
tree2ce6ddb91bbba5cc326f285f47051b4b724c1255 /git-cvsimport-script
parent2a3e1a85b5432b94499db7d7fbe4ec9b65b6c88d (diff)
downloadgit-f65ae603db8ffc36e25cc835eeffcfe4909c3148.zip
git-f65ae603db8ffc36e25cc835eeffcfe4909c3148.tar.gz
git-f65ae603db8ffc36e25cc835eeffcfe4909c3148.tar.bz2
Local cvsimport fixups
Diffstat (limited to 'git-cvsimport-script')
-rwxr-xr-xgit-cvsimport-script10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-cvsimport-script b/git-cvsimport-script
index d611756..58ded8a 100755
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -61,6 +61,8 @@ package CVSconn;
# Basic CVS dialog.
# We're only interested in connecting and downloading, so ...
+use POSIX qw(strftime dup2);
+
sub new {
my($what,$repo,$subdir) = @_;
$what=ref($what) if ref($what);
@@ -571,7 +573,9 @@ while(<CVS>) {
# VERSION:1.96->1.96.2.1
my $init = ($2 eq "INITIAL");
my $fn = $1;
- my $data = $cvs->file($fn,$3);
+ my $rev = $3;
+ $fn =~ s#^/+##;
+ my $data = $cvs->file($fn,$rev);
print "".($init ? "New" : "Update")." $fn: ".length($data)." bytes.\n";
mkpath(dirname($fn),$opt_v);
open(F,"> ./$fn")
@@ -583,7 +587,9 @@ while(<CVS>) {
chmod(pmode($cvs->{'mode'}), $fn);
push(@new,$fn); # may be resurrected!
} elsif($state == 9 and /^\s+(\S+):\d(?:\.\d+)+->(\d(?:\.\d+)+)\(DEAD\)\s*$/) {
- push(@old,$1);
+ my $fn = $1;
+ $fn =~ s#^/+##;
+ push(@old,$fn);
} elsif($state == 9 and /^\s*$/) {
$state = 10;
} elsif(($state == 9 or $state == 10) and /^-+$/) {