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 147425 Details for
Bug 210627
Create Patch should sort diffs by file path
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix v01
210627_v01.txt (text/plain), 4.70 KB, created by
Tomasz Zarna
on 2009-09-17 06:58:00 EDT
(
hide
)
Description:
Fix v01
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2009-09-17 06:58:00 EDT
Size:
4.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.cvs.ui >Index: src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java,v >retrieving revision 1.18 >diff -u -r1.18 DiffOperation.java >--- src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java 24 Apr 2009 09:33:19 -0000 1.18 >+++ src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java 17 Sep 2009 10:52:34 -0000 >@@ -170,13 +170,29 @@ > * @return a stream for the diff output > */ > protected abstract PrintStream openStream() throws CVSException; >+ >+ private static Comparator RESOURCE_COMPARATOR = new Comparator() { >+ public int compare(Object o1, Object o2) { >+ IResource r1 = (IResource) o1; >+ IResource r2 = (IResource) o2; >+ return r1.getFullPath().toString().compareTo(r2.getFullPath().toString()); >+ }}; > > protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException { > > //add this project to the total projects encountered >- final HashSet newFiles = new HashSet(); //array of ICVSResource - need HashSet to guard for duplicate entries >- final HashSet existingFiles = new HashSet(); //array of IResource - need HashSet to guard for duplicate entries > >+ //array of ICVSResource - need Set to guard for duplicate entries >+ final SortedSet newFiles = new TreeSet(new Comparator() { >+ public int compare(Object o1, Object o2) { >+ ICVSResource r1 = (ICVSResource) o1; >+ ICVSResource r2 = (ICVSResource) o2; >+ return RESOURCE_COMPARATOR.compare(r1.getIResource(), r2.getIResource()); >+ } >+ }); >+ //array of IResource - need Set to guard for duplicate entries >+ final SortedSet existingFiles = new TreeSet(RESOURCE_COMPARATOR); >+ > monitor.beginTask(null,100); > final IProgressMonitor subMonitor = Policy.subMonitorFor(monitor,10); > for (int i = 0; i < resources.length; i++) { >@@ -321,6 +337,19 @@ > return CVSUIMessages.DiffOperation_1; > } > >+ Map getProviderTraversalMapping(IProgressMonitor monitor) throws CoreException { >+ Map providerTraversal = super.getProviderTraversalMapping(monitor); >+ SortedMap result = new TreeMap(new Comparator() { >+ public int compare(Object o1, Object o2) { >+ CVSTeamProvider p1 = (CVSTeamProvider) o1; >+ CVSTeamProvider p2 = (CVSTeamProvider) o2; >+ return RESOURCE_COMPARATOR.compare(p1.getProject(), p2.getProject()); >+ } >+ }); >+ result.putAll(providerTraversal); >+ return result; >+ } >+ > private void addFileToDiff(ICVSFolder patchRoot, ICVSFile file, PrintStream printStream, int format) throws CVSException { > > String nullFilePrefix = ""; //$NON-NLS-1$ >Index: src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java,v >retrieving revision 1.36 >diff -u -r1.36 RepositoryProviderOperation.java >--- src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java 3 Oct 2008 11:26:05 -0000 1.36 >+++ src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java 17 Sep 2009 10:52:34 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -11,13 +11,7 @@ > package org.eclipse.team.internal.ccvs.ui.operations; > > import java.lang.reflect.InvocationTargetException; >-import java.util.ArrayList; >-import java.util.Arrays; >-import java.util.HashMap; >-import java.util.Iterator; >-import java.util.List; >-import java.util.Map; >-import java.util.Set; >+import java.util.*; > > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IResource; >@@ -325,7 +319,7 @@ > * Helper method. Return a Map mapping provider to a list of resources > * shared with that provider. > */ >- private Map getProviderTraversalMapping(IProgressMonitor monitor) throws CoreException { >+ Map getProviderTraversalMapping(IProgressMonitor monitor) throws CoreException { > Map result = new HashMap(); > ResourceMapping[] mappings = getScope().getMappings(); > for (int j = 0; j < mappings.length; j++) {
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 210627
:
147425
|
147679
|
147680