Package net.sourceforge.cruisecontrol

Examples of net.sourceforge.cruisecontrol.Modification$ModifiedFile


        mods[2] = createModification("user3", true);
        return mods;
    }

    private Modification createModification(String name, boolean addemail) {
        Modification mod = new Modification();
        mod.userName = name;
        mod.comment = "This is the checkin for " + name;
        if (addemail) {
            mod.emailAddress = name + "@host.com";
        }
View Full Code Here


        boolean found2 = false;
        boolean found3 = false;
        for (Iterator iterator = modifications.iterator();
            iterator.hasNext();
            ) {
            Modification modification = (Modification) iterator.next();
            modification.modifiedTime = date;

            //NOTE:  HashSet contains() doesn't work properly therefore
            //there is this horrible assert statement
            if (modification.userName.equals("username1")) {
View Full Code Here

            + "-format \"#SCIT#|#DbPath#|#Changed By#|#CheckInComment#\""
            , cmdLine.toString());
    }
   
    public void testParseModificationDescription() throws ParseException {
        Modification m = AlienBrain.parseModificationDescription(
            "127610352000000000|/a/path/to/a/file.cpp|sjacobs|"
            + "A change that probably breaks everything.");
       
        assertEquals(DATE_FORMAT.parse("5/20/2005 -0400"), m.modifiedTime);
        assertEquals("sjacobs", m.userName);
View Full Code Here

    return DTFM.parse(dateString);
  }

  Modification createModification(String userName, String emailAddress, String comment,
                                  String revision, String modifiedTime, String type) throws ParseException {
    Modification modification = new Modification();
    modification.userName = userName;
    modification.emailAddress = emailAddress;
    modification.comment = comment;
    modification.revision = revision;
    modification.modifiedTime = parseLogDateFormat(modifiedTime);
View Full Code Here

    accurev.getProperties();

    assertNotNull(modifications);
    assertEquals(6, modifications.size());

    Modification modification;

    modification = createModification("norru", null, " Comment\n", "120208", "2005/06/22 10:53:10", "keep");
    assertEquals(modification, modifications.get(0));

    modification = createModification("norru", null, "", "120209", "2005/06/22 10:54:44", "defcomp");
View Full Code Here

            Element logEntryPaths = logEntry.getChild("paths");
            List paths = logEntryPaths.getChildren("path");
            for (Iterator iterator = paths.iterator(); iterator.hasNext();) {
                Element path = (Element) iterator.next();

                Modification modification = new Modification();
                modification.modifiedTime = convertDate(logEntry.getChildText("date"));
                modification.userName = logEntry.getChildText("author");
                modification.comment = logEntry.getChildText("msg");
                modification.revision = logEntry.getAttributeValue("revision");
                modification.folderName = "";
View Full Code Here

         * @see <a href="http://subversion.tigris.org/">subversion.tigris.org</a>
         */
        static List filterModifications(Modification[] modifications, Date lastBuild) {
            List filtered = new ArrayList();
            for (int i = 0; i < modifications.length; i++) {
                Modification modification = modifications[i];
                if (lastBuild == null || modification.modifiedTime.getTime() > lastBuild.getTime()) {
                    filtered.add(modification);
                }
            }
            return filtered;
View Full Code Here

            final List modifications = new ArrayList(logHelper.getModifications());
            Collections.sort(modifications, new ModificationComparator());
            description.append(modifications.size());
            Iterator it = modifications.iterator();
            while (it.hasNext()) {
                Modification mod = (Modification) it.next();
                description.append("<li>");
                description.append(mod.getFileName());
                description.append("  by ");
                if (mod.userName != null) {
                    description.append(mod.userName);
                } else {
                    description.append("[no user]");
View Full Code Here

    /**
     * To compare modifications happening in the same project.
     */
    static class ModificationComparator implements Comparator {
        public int compare(Object o1, Object o2) {
            Modification mod1 = (Modification) o1;
            Modification mod2 = (Modification) o2;
            long modifiedTimeDifference = mod1.modifiedTime.getTime() - mod2.modifiedTime.getTime();
            if (modifiedTimeDifference != 0) {
                return modifiedTimeDifference > 0 ? +1 : -1;
            }
            return mod1.getFileName().compareTo(mod2.getFileName());
        }
View Full Code Here

     * behavior is assigned here because we don't have a repository to query the
     * modification.  All modifications will be set to type "change" and
     * userName "User".
     */
    private void addRevision(File revision) {
        Modification mod = new Modification();

        mod.type = "change";
       
        // TODO: add attribute to specify user name for modifications
       
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.Modification$ModifiedFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.