Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-06-17 19:48:42 +0000
committerMichael Valenta2004-06-17 19:48:42 +0000
commit69042219dcf83ce14b2f961017ac9c93013e6b3d (patch)
treef3278f85aa709dbea1177a7810f1fbae9ddf6dea
parent29674f165f3afb1e909ce88dfa0aa09d89e6eca3 (diff)
downloadeclipse.platform.team-69042219dcf83ce14b2f961017ac9c93013e6b3d.tar.gz
eclipse.platform.team-69042219dcf83ce14b2f961017ac9c93013e6b3d.tar.xz
eclipse.platform.team-69042219dcf83ce14b2f961017ac9c93013e6b3d.zip
Bug 67674 text in cvs commitinfo file causes inability to commitI20040617a
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
index 146c1d69f..0b272c652 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
@@ -184,7 +184,12 @@ public class CommitCommentArea extends DialogArea {
private void finished() {
// strip template from the comment entered
try {
- comment = comment.replaceAll(getCommitTemplate(), ""); //$NON-NLS-1$
+ String commitTemplate = getCommitTemplate();
+ if (comment.startsWith(commitTemplate)) {
+ comment = comment.substring(commitTemplate.length());
+ } else if (comment.endsWith(commitTemplate)) {
+ comment = comment.substring(0, comment.length() - commitTemplate.length());
+ }
} catch (CVSException e) {
// we couldn't get the commit template. Log the error and continue
CVSUIPlugin.log(e);

Back to the top