Login | Register
My pages Projects Community openCollabNet

Discussions > commits > subclipse svn commit: r5960 - trunk/subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/actions/CommitAction.java

subclipse
Discussion topic

Back to topic list

subclipse svn commit: r5960 - trunk/subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/actions/CommitAction.java

Author selsemore
Full name Stephen Elsemore
Date 2016-01-29 07:53:57 PST
Message Author: selsemore
Date: 2016-01-29 07:53:57-0800
New Revision: 5960

Modified:
   trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java

Log:
Only include resources from active change set in commit dialog

When committing from Project/Package explorer with a change set activated, only
include the changed resources that belong to the active change set. Likewise,
only include active change set tasks in the comment proposal.

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​ui/src/org/tigris/su​bversion/subclipse/u​i/actions/CommitActi​on.java?view=diff​&pathrev=5960&r​1=5959&r2=5960
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java 2016-01-29 07:53:57-0800
@@ -105,7 +105,7 @@
                     public void run(IProgressMonitor monitor) throws InvocationTargetException {
                         try {
                             // search for modified or added, non-ignored resources in the selection.
- IResource[] modified = getModifiedResources(resources, monitor);
+ IResource[] modified = getChangeSetResource​s(getModifiedResourc​es(resources, monitor));
                             
                             // if no changes since last commit, do not show commit dialog.
                             if (modified.length == 0) {
@@ -487,6 +487,22 @@
         return comment.toString();
     }
 
+ private IResource[] getChangeSetResource​s(IResource[] allResources) {
+ ActiveChangeSet changeSet = SVNProviderPlugin.ge​tPlugin().getChangeS​etManager().getDefau​ltSet();
+ if (changeSet != null && !("<No Active Task>".equals(cha​ngeSet.getName()))) {
+ List<IResource> changeSetResourceList = new ArrayList<IResource>();
+ for (IResource resource : allResources) {
+ if (changeSet.contains(resource)) {
+ changeSetResourceLis​t.add(resource);
+ }
+ }
+ IResource[] changeSetResources = new IResource[changeSetR​esourceList.size()];​
+ changeSetResourceLis​t.toArray(changeSetR​esources);
+ return changeSetResources;
+ }
+ return allResources;
+ }
+
     private boolean isUserSet(ChangeSet set) {
         if (set instanceof ActiveChangeSet) {
             ActiveChangeSet acs = (ActiveChangeSet) set;

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

subclipse svn commit: r5960 - trunk/subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/actions/CommitAction.java selsemore Stephen Elsemore 2016-01-29 07:53:57 PST
Messages per page: