]> git.donarmstrong.com Git - bin.git/commitdiff
update sa to support versions of svn without --ignore-externals
authorDon Armstrong <don@donarmstrong.com>
Sun, 6 Nov 2005 04:54:50 +0000 (04:54 +0000)
committerDon Armstrong <don@donarmstrong.com>
Sun, 6 Nov 2005 04:54:50 +0000 (04:54 +0000)
sa

diff --git a/sa b/sa
index d09a139cf33998982f9b08938f226d421a8e4eb0..adb8b53fb34197a21c8f5f86fbb0fd19afac6efe 100755 (executable)
--- 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,
                );