summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a3e1a8)
raw | patch | inline | side by side (parent: 2a3e1a8)
author | Matthias Urlichs <smurf@kiste.(none)> | |
Tue, 28 Jun 2005 17:58:40 +0000 (19:58 +0200) | ||
committer | Matthias Urlichs <smurf@kiste.(none)> | |
Tue, 28 Jun 2005 17:58:40 +0000 (19:58 +0200) |
git-cvsimport-script | patch | blob | history |
diff --git a/git-cvsimport-script b/git-cvsimport-script
index d61175613dc4ca522642d9113d7e54a5dfb03cf2..58ded8a989e28ff74f96e6440fadb9657f5b7a18 100755 (executable)
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
# 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);
# 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")
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 /^-+$/) {