? SqlFileRef.patch
Index: src/main/org/apache/tools/ant/taskdefs/SQLExec.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
retrieving revision 1.35
diff -u -r1.35 SQLExec.java
--- src/main/org/apache/tools/ant/taskdefs/SQLExec.java	3 Mar 2002 01:46:20 -0000	1.35
+++ src/main/org/apache/tools/ant/taskdefs/SQLExec.java	8 Mar 2002 04:44:34 -0000
@@ -576,6 +576,25 @@
                 if (line.startsWith("--")) {
                   continue;
                 }
+                if (line.startsWith("@")) {
+                  if (line.equals("@")) {
+                    throw new SQLException("lines beginning with \"@\" must"
+                                           + "contain a filename");
+                  }
+                  // use everything after the "@" to refer to the filename
+                  String filename = line.substring(1);
+                  File subFile = new File(filename);
+                  
+                  if (srcFile != null && !subFile.isAbsolute()) {
+                      // filename is relative to the main file
+                      subFile = new File(srcFile.getParent(),filename);
+                  }
+
+                  Transaction t = new Transaction();
+                  t.setSrc(subFile);
+                  t.runTransaction(out);
+                  continue;
+                }
                 StringTokenizer st = new StringTokenizer(line);
                 if (st.hasMoreTokens()) {
                     String token = st.nextToken();
