|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.javacvs; import org.openide.util.NbBundle; import java.io.*; import java.util.*; import org.netbeans.modules.javacvs.*; import org.netbeans.lib.cvsclient.command.KeywordSubstitutionOptions; /** this class implements the cvs update command. * @author mkleint */ public class FsUpdate extends CvsCommand { /** first of the 2 possible -j switches that merge 2 different revisions. * If only this property is set, the current working file is merged * with the specified one. */ private String mergeRevision1; /** * Use this keyword substitution for the command. * does not include the -k switch part. */ private KeywordSubstitutionOptions keywordSubst; /** Second of the 2 possible -j switches that merge 2 different revisions. * Assumes the first -j switch (mergeRevision1 property is set). * Then the update commands merges the sources of these 2 revisons specified * by the -j switches. */ private String mergeRevision2; /** * Whether to prune directories, i.e. remove any directories that do not * contain any files. This is the -P option in command-line CVS) */ private boolean pruneDirectories; /** * Determines whether to get a clean copy from the server. * This overrides even locally modified files. */ private boolean cleanCopy; /** * Determines wheather the output of the command is processed on standard output. * Default is false. If true, nothing is done to local working files. */ private boolean pipeToOutput; /** * Resets any sticky tags/dates/options imposed on the updated file(s). */ private boolean resetStickyOnes; /** * Whether to build directories, like checkout does (this is the -d option * in command-line CVS) */ private boolean buildDirectories; /** * Equals the -r switch of command-line cvs. */ private String updateByRevision; /** * equals the -D switch of command line cvs. */ private String updateByDate; /** * Use head revision if a revision meeting criteria set by switches -r/-D * (tag/date) is not found. */ private boolean useHeadIfNotFound; /** * to be recursive is default behaviour of command. */ private boolean recursive = true; /** Creates new CvsUpdate instance. */ protected FsUpdate() { super(); } /** Getter for property mergeRevision1. * @return Value of property mergeRevision1. */ public String getMergeRevision1() { return mergeRevision1; } /** Setter for property mergeRevision1. * @param mergeRevision1 New value of property mergeRevision1. */ public void setMergeRevision1(String mergeRevision1) { this.mergeRevision1 = mergeRevision1; } /** Getter for property mergeRevision2. * @return Value of property mergeRevision2. */ public String getMergeRevision2() { return mergeRevision2; } /** Setter for property mergeRevision2. * @param mergeRevision2 New value of property mergeRevision2. */ public void setMergeRevision2(String mergeRevision2) { this.mergeRevision2 = mergeRevision2; } /** * Getter for property pipeToOutput. * @return Value of property pipeToOutput. */ public boolean isPipeToOutput() { return pipeToOutput; } /** * Setter for property pipeToOutput. * @param pipeToOutput New value of property pipeToOutput. */ public void setPipeToOutput(boolean pipeToOutput) { this.pipeToOutput = pipeToOutput; } /** * Getter for property resetStickyOnes. * @return Value of property resetStickyOnes. */ public boolean isResetStickyOnes() { return resetStickyOnes; } /** * Setter for property resetStickyOnes. * @param resetStickyOnes New value of property resetStickyOnes. */ public void setResetStickyOnes(boolean resetStickyOnes) { this.resetStickyOnes = resetStickyOnes; } /** * Getter for property useHeadIfNotFound. * @return Value of property useHeadIfNotFound. */ public boolean isUseHeadIfNotFound() { return useHeadIfNotFound; } /** * Setter for property useHeadIfNotFound. * @param useHeadIfNotFound New value of property useHeadIfNotFound. */ public void setUseHeadIfNotFound(boolean useHeadIfNotFound) { this.useHeadIfNotFound = useHeadIfNotFound; } /** * Getter for property updateByDate. * @return Value of property updateByDate. */ public String getUpdateByDate() { return updateByDate; } /** * Setter for property updateByDate. * @param updateByDate New value of property updateByDate. */ public void setUpdateByDate(String updateByDate) { this.updateByDate = updateByDate; } /** * Getter for property updateByRevision. * @return Value of property updateByRevision. */ public String getUpdateByRevision() { return updateByRevision; } /** * Setter for property updateByRevision. * @param updateByRevision New value of property updateByRevision. */ public void setUpdateByRevision(String updateByRevision) { this.updateByRevision = updateByRevision; } /** * Getter for property keywordSubst. * @return Value of property keywordSubst. */ public KeywordSubstitutionOptions getKeywordSubst() { return keywordSubst; } /** * Setter for property keywordSubst. * @param keywordSubst New value of property keywordSubst. */ public void setKeywordSubst(KeywordSubstitutionOptions keywordSubst) { this.keywordSubst = keywordSubst; } /** Set whether to build directories. This is the -d option in command-line * CVS. */ public void setBuildDirectories(boolean buildDirectories) { this.buildDirectories = buildDirectories; } /** * Get whether to build directories. * @return true if directories are to be built, false otherwise */ public boolean isBuildDirectories() { return buildDirectories; } /** * Sets whether to get a clean copy from the server. * Even locally modified files will not merged but overridden. * This is the -C option in the command-line CVS. */ public void setCleanCopy(boolean cleanCopy) { this.cleanCopy = cleanCopy; } /** * Returns whether to get a clean copy from the server. */ public boolean isCleanCopy() { return cleanCopy; } /** * Set whether to prune directories. This is the -P option in the command- * line CVS. */ public void setPruneDirectories(boolean pruneDirectories) { this.pruneDirectories = pruneDirectories; } /** * Get whether to prune directories. * @return true if directories should be removed if they contain no files, * false otherwise. */ public boolean isPruneDirectories() { return pruneDirectories; } /** Sets recursive (-R switch) or local (-l switch) behaviour. */ public void setRecursive(boolean recursive) { this.recursive = recursive; } /** Returns recursive (-R switch) or local (-l switch) behaviour. */ public boolean isRecursive() { return recursive; } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.