| Summary: | CVS: "Compare With / Another Branch or Version... / BASE" unnecessarily calculates the remote changes | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Arno Unkrig <arno> |
| Component: | Team | Assignee: | platform-cvs-inbox <platform-cvs-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | arno, krzysztof.daniel, pawel.pogorzelski1 |
| Version: | 3.7 | Keywords: | performance |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
| Attachments: | |||
|
Description
Arno Unkrig
Created attachment 166518 [details]
The (minimal) change that is required on revision 1.12 of org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java
This patch is in CONTEXT DIFF format, and is trivial: A one-line change in line 328.
Also it may be worth considering to add a popup menu Entry "Compare With / Base revision" as a shortcut for "Compare With / Another Branch or Version... / BASE" , which is quite hard to find. (Actually I built a helper plugin which does exactly that, as an interim solution for my company.) I'm pretty sure this belongs to the Platform team. Apologies if that is not the case. -M. Hello... is there anybody out there? This is a very small, yet useful one! Can YOU help? The patch I provided is wrong. Instead, in "org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java" the lines
private IStatus refresh(IResource resource, int depth, IProgressMonitor monitor) {
monitor = Policy.monitorFor(monitor);
try {
monitor.beginTask(null, 100);
Set allChanges = new HashSet();
if (getResourceComparator().isThreeWay()) {
IResource[] baseChanges = getBaseTree().refresh(new IResource[] {resource}, depth, Policy.subMonitorFor(monitor, 25));
allChanges.addAll(Arrays.asList(baseChanges));
}
IResource[] remoteChanges = getRemoteTree().refresh(new IResource[] {resource}, depth, Policy.subMonitorFor(monitor, 75));
allChanges.addAll(Arrays.asList(remoteChanges));
IResource[] changedResources = (IResource[]) allChanges.toArray(new IResource[allChanges.size()]);
fireTeamResourceChange(SubscriberChangeEvent.asSyncChangedDeltas(this, changedResources));
return Status.OK_STATUS;
...
should be changed to something like
...
if (getTag() != CVSTag.BASE) {
IResource[] remoteChanges = getRemoteTree().refresh(new IResource[] {resource}, depth, Policy.subMonitorFor(monitor, 75));
allChanges.addAll(Arrays.asList(remoteChanges));
}
Who's going to take this one from the CVS inbox? Krzysztof, could you take a look at Arno's patch? Compare with Base is your baby ;) Arno, please update the patch with comment 6 in the meantime. Created attachment 206069 [details]
The one-liner that fixes the problem
I added the patch that fixes the problem... however I am not absolutely sure that it is correct - code review required!
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |