summaryrefslogtreecommitdiff
path: root/Porting
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-03-28 06:00:46 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-03-28 06:00:46 +0000
commiteb8faf6977841917141a39366c09b4f66d02509d (patch)
tree53c3eafb7812cc2076539415ba7cc141ccc26a6f /Porting
parentaf5b818b8ce0a95cd59352395000aeb059998b2d (diff)
downloadperl-eb8faf6977841917141a39366c09b4f66d02509d.tar.gz
update p4 utility to ignore non-text files
p4raw-id: //depot/perl@3183
Diffstat (limited to 'Porting')
-rwxr-xr-xPorting/p4desc15
1 files changed, 13 insertions, 2 deletions
diff --git a/Porting/p4desc b/Porting/p4desc
index 062a6f122b..7bac3eb1f2 100755
--- a/Porting/p4desc
+++ b/Porting/p4desc
@@ -1,4 +1,4 @@
-#!/l/local/bin/perl -wpi.bak
+#!/usr/bin/perl -wpi.bak
#
# Munge "p4 describe ..." output to include new files.
@@ -90,12 +90,23 @@ sub newfiles {
my $addfile;
my $ret = "";
for $addfile (@addfiles) {
+ my $type = `p4 -p $p4port files $addfile`;
+ if ($?) {
+ warn "$0: `p4 -p $p4port print $addfile` failed, status[$?]\n";
+ next;
+ }
+ $type =~ m|^//.*\((.+)\)$| or next;
+ $type = $1;
+ unless ($type =~ /text/) {
+ $ret .= "\n==== $addfile ($type) ====\n\n";
+ next;
+ }
my @new = `p4 -p $p4port print $addfile`;
if ($?) {
die "$0: `p4 -p $p4port print $addfile` failed, status[$?]\n";
}
my $desc = shift @new; # discard initial description
- $ret .= "\n==== $addfile (text) ====\n\n";
+ $ret .= "\n==== $addfile ($type) ====\n\n";
my $lines = "," . @new;
$lines = "" if @new < 2;
$ret .= "\@\@ -0,0 +1$lines \@\@\n";