Community
Participate
Working Groups
Build Identifier: 20090621-0832 There can be no remote changes if you compare against the BASE version. However, for huge sets of resources, that calculation can generate a lot of unnecessary network traffic and cost a lot of time. The optimization is straightforward: Iff the target version is BASE, then determine only the local changes and do not merge in the (empty) set of remote changes. (The latter is only necessary when comparing with non-BASE versions.) I will attach a patch. Looking at the ECLIPSE CVS repo, the problem has been there for ages (at least since version 3.2), maybe always. Reproducible: Always Steps to Reproduce: 1. Select a (CVS-shared) resource in the Navigator 2. Hit "Compare With / Another Branch or Version... / BASE" 3. A CVS update is executed on the repository (bad :-( ) 4. The "Synchronize" view is populated
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.