From: Don Armstrong Date: Sun, 6 Nov 2005 04:54:50 +0000 (+0000) Subject: update sa to support versions of svn without --ignore-externals X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=8906eedead2fff734cd32eae9691e89c2dd57887 update sa to support versions of svn without --ignore-externals --- diff --git a/sa b/sa index d09a139..adb8b53 100755 --- a/sa +++ b/sa @@ -94,6 +94,12 @@ sub parse_config_file { my $HOME=User->Home; my $HOSTNAME=qx(hostname); $HOSTNAME=~s/\n//g; +my $CAN_IGNORE_EXTERNALS = 0; +qx(svn --version) =~ /\(r(\d+)\)/; +if ($1 > 13838) { + $CAN_IGNORE_EXTERNALS = 1; +} + my %repos; for ('/etc/sa.conf', "${HOME}/.sarc", "${HOME}/.sarc_${HOSTNAME}", "${HOME}/.sarc_local") { if (-e $_) { @@ -117,7 +123,7 @@ while (my ($repo,$run_after) = each(%repos)) { system('svn', $command, $options{quiet}?'-q':(), - $options{quick}?'--ignore-externals':(), + ($options{quick} and $CAN_IGNORE_EXTERNALS)?'--ignore-externals':(), $options{quick}>1?'-N':(), $repo, );