Package es.juanrak.svn.modelo

Examples of es.juanrak.svn.modelo.SVNLogEntrada


import es.juanrak.svn.plugin.SVNJavaPlugin;

public class Ejemplo extends SVNJavaPlugin {
    public void ejecutar(SVNLogEntrada logEntradaRecibo) {
        try {
            SVNLogEntrada entradaAnterior = getControlador().getListaLogEntrada(logEntradaRecibo.getParaPath(), logEntradaRecibo.getRevision());
            System.out.println( entradaAnterior.getMensaje() );
        }
        catch (Exception e) {
        }
    }
View Full Code Here


      return rutaMerge;
  }

  private long getRevisionPrevia(SVNLogEntrada logEntradaRecibo) {
      try {
        SVNLogEntrada logEntrada = getControlador().logAnterior(logEntradaRecibo.getParaPath(), logEntradaRecibo.getRevision());
        if( logEntrada != null ) {
          return logEntrada.getRevision();
        }
      }
      catch(Exception exception) {
        getControlador().getLogger().error(SVNError.getError(SVNError.ERROR_OBTENER_LOG, exception));
      }
View Full Code Here

    public String getColumnName(int column) {
        return columnas[column];
    }

    public Object getValueAt(int fila, int columna) {
        SVNLogEntrada n = this.collection.get(fila);
        switch (columna) {
        case 0:
            return new Long(n.getRevision());
        case 1:
            return new Integer(n.getRutasCambiadas().size());
        case 2:
            return n.getAutor();
        case 3:
            return n.getTipoEntrada();           
        case 4:
            return sdf.format( n.getFecha() );
        case 5:
            return n.getMensaje();
        case 6:
            return new Integer(fila);
        }
        return getEntrada(fila);
    }
View Full Code Here

        table.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent event) {
                int row = table.getSelectedRow();
                if( row != -1 )
                {
                    SVNLogEntrada logEntrada = (SVNLogEntrada)table.getModel().getValueAt(//
                            table.convertRowIndexToModel(row)//
                            , table.getModel().getColumnCount());
                   
                    fireEntradaSeleccionada(logEntrada);
                   
    //                panelRevisionFicheros.setLogEntrada( logEntrada );
    //                mensaje.setText(logEntrada.getMensaje());
                   
                    if( event.getButton() == MouseEvent.BUTTON3 ) {
                       
                    }
                }
            }


            public void mouseReleased(MouseEvent e) {
                Point pt = e.getPoint();
                int row = table.rowAtPoint(e.getPoint());
                row = table.convertRowIndexToModel( row );
                if( row != -1 ) {
                    SVNLogEntrada logEntrada = ((SVNRevisionTableModel)table.getModel()).getEntrada(row);
                    if (logEntrada != null) {
                        if (e.getButton() == MouseEvent.BUTTON3) {
                            JPopupMenu popup = SVNMenuPopupConstructor.getPopupMenu(logEntrada, controlador, null);
                            popup.show(table, pt.x, pt.y);
                        }
                    }
                }
            }
        });
        table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent arg0) {
                if( table.getSelectedRow() != -)
                {
                    SVNLogEntrada logEntrada = (SVNLogEntrada)table.getModel().getValueAt( //
                            table.convertRowIndexToModel(table.getSelectedRow()) //
                            , table.getModel().getColumnCount());
                    fireEntradaSeleccionada(logEntrada);
                   
//                    panelRevisionFicheros.setLogEntrada( logEntrada );
View Full Code Here

            indexRutaParcial = rutaParcial.length();
        }
           
        for (Iterator entries = coleccion.iterator(); entries.hasNext();) {
            SVNLogEntry logEntry = (SVNLogEntry) entries.next();
            SVNLogEntrada logEntrada = new SVNLogEntrada(entrada, entrada.getPath(), logEntry );
            logEntrada.setTipoEntrada( getLogEntradaTipo(logEntrada) );
                
           
            Iterator it = logEntry.getChangedPaths().keySet().iterator();
            ArrayList<SVNLogRutaEntrada> logRutas = new ArrayList<SVNLogRutaEntrada>();
           
            while(it.hasNext()) {
                SVNLogEntryPath entryPath = (SVNLogEntryPath) logEntry.getChangedPaths().get(it.next());
                SVNLogRutaEntrada logRutaEntrada = new SVNLogRutaEntrada(logEntrada, entryPath );
                if( (rutaParcial!= null ) ) //TRUNK
                {
                    int indexFrom = logRutaEntrada.getRutaParcial().toUpperCase().lastIndexOf(rutaParcial);
                    if( indexFrom != -1 ) logRutaEntrada.setRutaParcial(logRutaEntrada.getRutaParcial().substring(indexFrom + indexRutaParcial));
                }
               
                logRutas.add(logRutaEntrada);
            }
            logEntrada.addRutasCambiadas( logRutas );
            logEntradas.add(logEntrada);
           
        }
        return logEntradas;
    }
View Full Code Here

        final int indexRutaParcialFinal = indexRutaParcial;
       
        this.repositorio.log(entrada.getPath(), desdeRevision, hastaRevision, new ISVNLogEntryHandler() {

            public void handleLogEntry(SVNLogEntry logEntry) throws org.tmatesoft.svn.core.SVNException {
                SVNLogEntrada logEntrada = new SVNLogEntrada(entrada, entrada.getPath(), logEntry );
                logEntrada.setTipoEntrada( getLogEntradaTipo(logEntrada) );
                    
               
                Iterator it = logEntry.getChangedPaths().keySet().iterator();
                ArrayList<SVNLogRutaEntrada> logRutas = new ArrayList<SVNLogRutaEntrada>();
               
                while(it.hasNext()) {
                    SVNLogEntryPath entryPath = (SVNLogEntryPath) logEntry.getChangedPaths().get(it.next());
                    SVNLogRutaEntrada logRutaEntrada = new SVNLogRutaEntrada(logEntrada, entryPath);
                    if( (rutaParcialFinal!= null ) ) //TRUNK
                    {
                        int indexFrom = logRutaEntrada.getRutaParcial().toUpperCase().lastIndexOf(rutaParcialFinal);
                        if( indexFrom != -1 ) logRutaEntrada.setRutaParcial(logRutaEntrada.getRutaParcial().substring(indexFrom + indexRutaParcialFinal));
                    }
                   
                    logRutas.add(logRutaEntrada);
                }
                logEntrada.addRutasCambiadas( logRutas );
                manejadorLogEntryRecibo.manejadorLogEntrada(logEntrada);
            }
           
        });
    }
View Full Code Here

        {
            rutaParcial = (String) parametroRutaParcial.getValor();
            indexRutaParcial = rutaParcial.length();
        }

        SVNLogEntrada logEntrada = new SVNLogEntrada(entrada, pathRecibo, logEntry);
        logEntrada.setTipoEntrada(getLogEntradaTipo(logEntrada));

        Iterator it = logEntry.getChangedPaths().keySet().iterator();
        ArrayList<SVNLogRutaEntrada> logRutas = new ArrayList<SVNLogRutaEntrada>();

        while (it.hasNext()) {
            SVNLogEntryPath entryPath = (SVNLogEntryPath) logEntry.getChangedPaths().get(it.next());
            SVNLogRutaEntrada logRutaEntrada = new SVNLogRutaEntrada(logEntrada, entryPath);
            if ((rutaParcial != null)) // TRUNK
            {
                int indexFrom = logRutaEntrada.getRutaParcial().toUpperCase().lastIndexOf(rutaParcial);
                if (indexFrom != -1)
                    logRutaEntrada.setRutaParcial(logRutaEntrada.getRutaParcial().substring(indexFrom + indexRutaParcial));
            }

            logRutas.add(logRutaEntrada);
        }
        logEntrada.addRutasCambiadas(logRutas);

        return logEntrada;
    }
View Full Code Here

                        parametros[pos++] = fd.getAbsolutePath();
                        getLogger().log("COMMIT:>" +fd.getAbsolutePath());
                    }
                }
                else if(parametro.equals("LOG")) {
                    SVNLogEntrada logEntrada = getListaLogEntrada(elementoOrigenComando.getPath(), elementoOrigenComando.getRevision());
                    if( logEntrada != null ) {
                        if( tipoComando == JAVA ) {
                            parametros[pos++] = logEntrada.getMensaje();
                        }
                        else {
                            File fd = UtilFichero.crearFicheroTemporal("svn", ".tmp");
                            try
                            {
                                fd.deleteOnExit();
                                FileWriter fstream = new FileWriter(fd);
                                BufferedWriter out = new BufferedWriter(fstream);
                                out.write(logEntrada.getMensaje());
                                out.close();
                            }
                            catch (Exception e){
                              System.err.println("Error: " + e.getMessage());
                            }
View Full Code Here

        } catch (Exception svne) {
            SVNError.crearError(SVNError.ERROR_OBTENER_LOG, svne, new Object[] { entrada, new Long(desdeRevisionRecibo)} );
        }

        if( logEntries.size()== 1){
          SVNLogEntrada logEntrada = new SVNLogEntrada(getEntry(entrada, desdeRevisionRecibo),entrada,logEntries.get(0) );
            return logEntrada;
        }
        return null;
    }
View Full Code Here

                , true // strictNode,
                , 1 // long limit
                , new ISVNLogEntryHandler() {

                    public void handleLogEntry(SVNLogEntry logEntrada) throws org.tmatesoft.svn.core.SVNException {
                        listaEntradas.add(new SVNLogEntrada(entrada, pathRecibo, logEntrada));
                    }
                });
        long revision = listaEntradas.get(0).getRevision();

        Collection collection = repositorio.getFileRevisions(pathRecibo //
View Full Code Here

TOP

Related Classes of es.juanrak.svn.modelo.SVNLogEntrada

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.