Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 163174 Details for
Bug 36436
[Merge] CVS substituted keywords treated as conflicts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
use option -kk for merging into local workspace if possible
Merge-kk_36436_patch.txt (text/plain), 7.19 KB, created by
Axel Mueller
on 2010-03-28 08:26:31 EDT
(
hide
)
Description:
use option -kk for merging into local workspace if possible
Filename:
MIME Type:
Creator:
Axel Mueller
Created:
2010-03-28 08:26:31 EDT
Size:
7.19 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.cvs.core >Index: src/org/eclipse/team/internal/ccvs/core/client/Command.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java,v >retrieving revision 1.78 >diff -u -r1.78 Command.java >--- src/org/eclipse/team/internal/ccvs/core/client/Command.java 21 Jun 2007 14:56:11 -0000 1.78 >+++ src/org/eclipse/team/internal/ccvs/core/client/Command.java 28 Mar 2010 12:19:28 -0000 >@@ -19,6 +19,7 @@ > import org.eclipse.osgi.util.NLS; > import org.eclipse.team.internal.ccvs.core.*; > import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener; >+import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation; > > /** > * Abstract base class for command requests. >@@ -92,6 +93,7 @@ > public static final KSubstOption KSUBST_TEXT_EXPAND_LOCKER = new KSubstOption("-kkvl"); //$NON-NLS-1$ > public static final KSubstOption KSUBST_TEXT_VALUES_ONLY = new KSubstOption("-kv"); //$NON-NLS-1$ > public static final KSubstOption KSUBST_TEXT_KEYWORDS_ONLY = new KSubstOption("-kk"); //$NON-NLS-1$ >+ public static KSubstOption KSUBST_TEXT_KEYWORDS_ONLY_MERGE = null; > > /*** Default command output listener ***/ > protected static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new CommandOutputListener(); >@@ -324,6 +326,12 @@ > try { > session.setCurrentCommand(Command.this); > status[0] = doExecute(session, gOptions, lOptions, arguments, listener, monitor); >+ if ( ((CVSRepositoryLocation)session.getCVSRepositoryLocation()).CanMergeWithKeywords() ) { >+ KSUBST_TEXT_KEYWORDS_ONLY_MERGE = new KSubstOption("-kk"); //$NON-NLS-1$ >+ } >+ else { >+ KSUBST_TEXT_KEYWORDS_ONLY_MERGE = null; >+ } > notifyConsoleOnCompletion(session, status[0], null); > } catch (CVSException e) { > notifyConsoleOnCompletion(session, null, e); >Index: src/org/eclipse/team/internal/ccvs/core/client/Version.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java,v >retrieving revision 1.19 >diff -u -r1.19 Version.java >--- src/org/eclipse/team/internal/ccvs/core/client/Version.java 16 Mar 2007 21:03:49 -0000 1.19 >+++ src/org/eclipse/team/internal/ccvs/core/client/Version.java 28 Mar 2010 12:19:28 -0000 >@@ -54,6 +54,7 @@ > ICommandOutputListener listener = new ICommandOutputListener() { > public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) { > String knownPrefix = null; >+ String versionNumber = null; > boolean isCVSNT = false; > if (line.startsWith(CVS_NT_PREFIX_1)) { > isCVSNT = true; >@@ -67,7 +68,7 @@ > IStatus status = OK; > int serverType = CVSRepositoryLocation.CVS_SERVER; > if (knownPrefix != null) { >- String versionNumber = line.substring(knownPrefix.length(), line.indexOf(' ', knownPrefix.length() + 1)); >+ versionNumber = line.substring(knownPrefix.length(), line.indexOf(' ', knownPrefix.length() + 1)); > if (versionNumber.startsWith("1.10") || versionNumber.equals("1.11") || versionNumber.equals("1.11.1")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > serverType = CVSRepositoryLocation.UNSUPPORTED_SERVER; > status = new CVSStatus(IStatus.WARNING, CVSStatus.UNSUPPORTED_SERVER_VERSION, NLS.bind(CVSMessages.Version_unsupportedVersion, new String[] { location.getHost(), versionNumber }),location); >@@ -79,6 +80,18 @@ > status = new CVSStatus(IStatus.INFO, CVSStatus.SERVER_IS_UNKNOWN, NLS.bind(CVSMessages.Version_unknownVersionFormat, new String[] { location.getHost(), line }), location); > } > ((CVSRepositoryLocation)location).setServerPlaform(serverType); >+ /* >+ * CVS prior to 1.12.2, there was a major problem with using >+ * `-kk' on merges. Namely, `-kk' overrode any default keyword >+ * expansion mode set in the archive file in the repository. >+ * This could, unfortunately for some users, cause data >+ * corruption in binary files. CVSNT has the same problem. >+ */ >+ if (serverType == CVSRepositoryLocation.CVS_SERVER >+ && !versionNumber.startsWith("1.11") && !versionNumber.equals("1.12.1")) //$NON-NLS-1$ //$NON-NLS-2$ >+ ((CVSRepositoryLocation)location).setMergeWithKeywords(true); >+ else >+ ((CVSRepositoryLocation)location).setMergeWithKeywords(false); > return status; > } > public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) { >Index: src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java,v >retrieving revision 1.109 >diff -u -r1.109 CVSRepositoryLocation.java >--- src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java 12 Oct 2009 14:49:19 -0000 1.109 >+++ src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java 28 Mar 2010 12:19:30 -0000 >@@ -139,6 +139,12 @@ > * When this is set, subsequent attempts should prompt before attempting to connect > */ > private boolean previousAuthenticationFailed = false; >+ >+ /* >+ * Field that indicates if CVS server properly supports turn off of keyword expansion >+ * (option -kk) when merging. >+ */ >+ private boolean MergeWithKeywords = false; > > /** > * Return the preferences node whose child nodes are the know repositories >@@ -1090,7 +1096,23 @@ > serverPlatform = UNDETERMINED_PLATFORM; > } > } >- >+ >+ /** >+ * check keyword expansion mode for merging >+ * @return true: it is safe to turn off of keyword expansion (use option -kk) when merging >+ */ >+ public boolean CanMergeWithKeywords() { >+ return MergeWithKeywords; >+ } >+ >+ /** >+ * set keyword expansion mode for merging >+ * true: it is safe to turn off of keyword expansion (option -kk) when merging >+ * false: using option -kk is not supported or might corrupt binary files >+ */ >+ public void setMergeWithKeywords(boolean MergeWithKeywords) { >+ this.MergeWithKeywords = MergeWithKeywords; >+ } > /** > * @see ICVSRepositoryLocation#flushUserInfo() > */ >#P org.eclipse.team.cvs.ui >Index: src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java,v >retrieving revision 1.15 >diff -u -r1.15 MergeWizard.java >--- src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java 10 Apr 2006 14:27:03 -0000 1.15 >+++ src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java 28 Mar 2010 12:19:32 -0000 >@@ -133,6 +133,9 @@ > > private Command.LocalOption[] getLocalOptions(CVSTag startTag, CVSTag endTag) { > List options = new ArrayList(); >+ if (Command.KSUBST_TEXT_KEYWORDS_ONLY_MERGE != null){ >+ options.add(Command.KSUBST_TEXT_KEYWORDS_ONLY_MERGE); >+ } > if (startTag != null) { > options.add(Command.makeArgumentOption(Update.JOIN, startTag.getName())); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 36436
: 163174 |
163818