git://git.jankratochvil.net
/
nethome.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better (what does really mean "better"?) handling of new/deleted files.
[nethome.git]
/
bin
/
cvsutil
diff --git
a/bin/cvsutil
b/bin/cvsutil
index
0ebe138
..
1048e97
100755
(executable)
--- a/
bin/cvsutil
+++ b/
bin/cvsutil
@@
-17,6
+17,7
@@
use Getopt::Long;
use Cwd qw(chdir fastgetcwd);
use Errno qw(ENOENT);
use File::Remove qw(remove);
use Cwd qw(chdir fastgetcwd);
use Errno qw(ENOENT);
use File::Remove qw(remove);
+use Carp qw(confess cluck croak carp);
use constant ENTRIES =>"CVS/Entries";
use constant CVSIGNORE=>".cvsignore";
use constant ENTRIES =>"CVS/Entries";
use constant CVSIGNORE=>".cvsignore";
@@
-86,8
+87,8
@@
my($msg,%opts)=@_;
my $errstr=$!;
$msg.=" in \"".fastgetcwd."\" (CVS \"$dir_dirname\")".($opts{"noerrno"} ? "" : ": $errstr");
my $errstr=$!;
$msg.=" in \"".fastgetcwd."\" (CVS \"$dir_dirname\")".($opts{"noerrno"} ? "" : ": $errstr");
-
die
$msg if $opt_fatal;
-
warn
$msg;
+
croak
$msg if $opt_fatal;
+
carp
$msg;
}
sub fordirs
}
sub fordirs
@@
-149,9
+150,11
@@
sub localreaddir
}
while (<E>) {
chomp;
}
while (<E>) {
chomp;
+ next if /^D$/;
do { push @dir_dirs ,$1; next; } if m#^D/([^/]*)/#;
do { push @dir_dirs ,$1; next; } if m#^D/([^/]*)/#;
+ next if m#^/[^/]*/-#; # deleted file: /filename/-1.1/dummy timestamp//
+ next if m#^/[^/]*/0/#; # new file: /filename/0/dummy timestamp//
do { push @dir_files,$1; next; } if m#^/([^/]*)/# ;
do { push @dir_files,$1; next; } if m#^/([^/]*)/# ;
- next if /^D$/;
mayfatal "File ".ENTRIES." contains invalid line \"$_\"",("noerrno"=>1);
}
close E;
mayfatal "File ".ENTRIES." contains invalid line \"$_\"",("noerrno"=>1);
}
close E;