Examples of ISVNPropertyHandler


Examples of org.tmatesoft.svn.core.wc.ISVNPropertyHandler

            if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
                revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
            }
            if (getCommandLine().hasURLs()) {
                wcClient.doSetRevisionProperty(SVNURL.parseURIEncoded(getCommandLine().getURL(0)),
                        revision, propertyName, propertyValue, force, new ISVNPropertyHandler() {
                            public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                            }
                            public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                                out.println("property '" + propertyName +"' set on repository revision " + url);
                            }
                            public void handleProperty(long revision, SVNPropertyData property) throws SVNException {
                            }
                });

            } else {
                File tgt = new File(".");
                if (getCommandLine().getPathCount() > 2) {
                    tgt = new File(getCommandLine().getPathAt(2));
                }
                wcClient.doSetRevisionProperty(tgt, revision, propertyName, propertyValue, force, new ISVNPropertyHandler() {
                            public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                            }
                            public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                                out.println("property '" + propertyName +"' set on repository revision " + url);
                            }
                            public void handleProperty(long revision, SVNPropertyData property) throws SVNException {
                            }
                });
            }

        } else {
            for (int i = pathIndex; i < getCommandLine().getPathCount(); i++) {
                final String absolutePath = getCommandLine().getPathAt(i);
                if (!recursive) {
                    wcClient.doSetProperty(new File(absolutePath), propertyName, propertyValue, force, recursive, new ISVNPropertyHandler() {
                        public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                            out.println("property '" + propertyName + "' set on '" + SVNFormatUtil.formatPath(path) + "'");
                        }
                        public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                        }
                        public void handleProperty(long revision, SVNPropertyData property) throws SVNException {
                        }

                    });
                } else {
                    final boolean wasSet[] = new boolean[] {false};
                    wcClient.doSetProperty(new File(absolutePath), propertyName, propertyValue, force, recursive, new ISVNPropertyHandler() {
                        public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                           wasSet[0] = true;
                        }
                        public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                        }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.ISVNPropertyHandler

            if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
                revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
            }
            if (getCommandLine().hasURLs()) {
                wcClient.doSetRevisionProperty(SVNURL.parseURIEncoded(getCommandLine().getURL(0)),
                        revision, propertyName, null, force, new ISVNPropertyHandler() {
                    public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                    }
                    public void handleProperty(long revision, SVNPropertyData property) throws SVNException {
                        out.println("Property '" + propertyName +"' deleted on repository revision " + revision);
                    }
                    public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                    }
                });

            } else {
                File tgt = new File(".");
                if (getCommandLine().getPathCount() > 1) {
                    tgt = new File(getCommandLine().getPathAt(1));
                }
                wcClient.doSetRevisionProperty(tgt, revision, propertyName, null, force, new ISVNPropertyHandler() {
                    public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                    }
                    public void handleProperty(long revision, SVNPropertyData property) throws SVNException {
                        out.println("Property '" + propertyName +"' deleted on repository revision " + revision);
                    }
                    public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                    }
                });
            }
        } else {
            for (int i = pathIndex; i < getCommandLine().getPathCount(); i++) {
                String absolutePath = getCommandLine().getPathAt(i);
                if (!recursive) {
                    wcClient.doSetProperty(new File(absolutePath), propertyName, null, force, recursive, new ISVNPropertyHandler() {
                        public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                            out.println("Property '" + propertyName + "' deleted on '" + SVNFormatUtil.formatPath(path) + "'");
                        }
                        public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                        }
                        public void handleProperty(long revision, SVNPropertyData property) throws SVNException {
                        }

                    });
                } else {
                    final boolean wasSet[] = new boolean[] {false};
                    wcClient.doSetProperty(new File(absolutePath), propertyName, null, force, recursive, new ISVNPropertyHandler() {
                        public void handleProperty(File path, SVNPropertyData property) throws SVNException {
                           wasSet[0] = true;
                        }
                        public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException {
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.