Project

General

Profile

Bug #5578 ยป ant_diff_cmd.diff

dhogan dhogan, 02/27/2012 03:00 PM

View differences:

settings/taskdefs.xml (working copy)
208 208
  	<typedef name="status-modules"
209 209
        classname="org.kepler.build.StatusModules"
210 210
        classpath="build-area/target/kepler-tasks.jar"/>
211
  
211

  
212
	<typedef name="diff-modules"
213
		classname="org.kepler.build.DiffModules"
214
		classpath="build-area/target/kepler-tasks.jar"/>
215

  
212 216
  	<typedef name="make-startup-scripts"
213 217
        classname="org.kepler.build.MakeStartupScripts">
214 218
        <classpath>
src/org/kepler/build/StatusModules.java (working copy)
24 24
 */
25 25
package org.kepler.build;
26 26

  
27
import java.io.File;
28

  
27 29
import org.kepler.build.modules.Module;
28 30
import org.kepler.build.modules.ModulesTask;
31
import org.kepler.build.project.ProjectLocator;
29 32
import org.kepler.build.util.CommandLine;
30 33

  
31 34
/**
32
 * A class to run svn status in each module directory.
35
 * A class to run svn status in each module directory and the build-area.
33 36
 *
34 37
 * @author Daniel Crawl
35 38
 * @version $Id$
......
47 50
                    module.getDir().getAbsolutePath()};
48 51
            CommandLine.exec(statusCommand);
49 52
        }
53

  
54
        // build-area isn't in modules.txt
55
        File buildDir = ProjectLocator.shouldUtilizeUserKeplerModules()
56
                        ? ProjectLocator.getUserBuildDir()
57
                        : ProjectLocator.getBuildDir();
58
        String[] statusCommand = {"svn", "stat",
59
                buildDir.getAbsolutePath()};
60
        CommandLine.exec(statusCommand);
50 61
    }
51 62

  
52 63
}
src/org/kepler/build/DiffModules.java (revision 0)
1
/* Based on StatusModules */
2
/*
3
 * Copyright (c) 2009 The Regents of the University of California.
4
 * All rights reserved.
5
 *
6
 * Permission is hereby granted, without written agreement and without
7
 * license or royalty fees, to use, copy, modify, and distribute this
8
 * software and its documentation for any purpose, provided that the above
9
 * copyright notice and the following two paragraphs appear in all copies
10
 * of this software.
11
 *
12
 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
13
 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
15
 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
16
 * SUCH DAMAGE.
17
 *
18
 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
19
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
21
 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
22
 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
23
 * ENHANCEMENTS, OR MODIFICATIONS.
24
 *      
25
 */
26
package org.kepler.build;
27

  
28
import java.io.File;
29

  
30
import org.kepler.build.modules.Module;
31
import org.kepler.build.modules.ModulesTask;
32
import org.kepler.build.project.ProjectLocator;
33
import org.kepler.build.util.CommandLine;
34

  
35
/**
36
 * A class to run svn status in each module directory and the build-area.
37
 *
38
 * @author Daniel Crawl
39
 * @version $Id: StatusModules.java 26441 2010-12-08 02:28:20Z welker $
40
 */
41
public class DiffModules extends ModulesTask
42
{
43
    /**
44
     * run the task
45
     */
46
    public void run() throws Exception
47
    {
48
        for (Module module : moduleTree)
49
        {
50
            String[] diffCommand = {"svn", "diff",
51
                    module.getDir().getAbsolutePath()};
52
            CommandLine.exec(diffCommand);
53
        }
54

  
55
        // build-area isn't in modules.txt
56
        File buildDir = ProjectLocator.shouldUtilizeUserKeplerModules()
57
                        ? ProjectLocator.getUserBuildDir()
58
                        : ProjectLocator.getBuildDir();
59
        String[] diffCommand = {"svn", "diff",
60
                buildDir.getAbsolutePath()};
61
        CommandLine.exec(diffCommand);
62
    }
63

  
64
}
build.xml (working copy)
163 163
		<make-suite name="${name}" />
164 164
	</target>
165 165
    
166
    <target name="status" description="Run svn status on all the modules listed in modules.txt.">
166
    <target name="status" description="Run svn status on all the modules listed in modules.txt and build-area.">
167 167
	   <status-modules/>
168 168
    </target>
169 169

  
170
	<target name="diff" description="Run svn diff on all the modules listed in modules.txt and build-area.">
171
		<diff-modules />
172
	</target>
173

  
170 174
	<target name="make-module" description="Make a module that contains source code and/or resources.">
171 175
		<make-module name="${name}" />
172 176
	</target>
    (1-1/1)