Community
Participate
Working Groups
Build Identifier: I20101208-1300 Although I provided a build ID representing my most current version of 3.7, please note this issue has occurred on previous 3.7 versions as well as 3.6. For certain projects, the Create Patch wizard will create patches indicating every line within the file has changed even though only one line actually changed. The only project we're currently able to reproduce this with is org.eclipse.equinox.coordinator under HEAD -> org.eclipse.equinox -> compendium -> bundles at :pserver:anonymous@dev.eclipse.org:/cvsroot/rt. It may be significant this previously non-exsistant project was added to the repo from an Apple machine, which uses CR as the line terminator. We've tried various project and workspace settings to account for this to no avail. We've been able to reproduce this on all Windows machines we've tried. Apple machines work fine. Haven't tried Unix/Linux. Note that most, but not all, of the files within that project are affected. For example, changing MANIFEST.MF works fine. Reproducible: Always Steps to Reproduce: 1. Add the org.eclipse.equinox.coordinator project to your workspace. 2. Modify a single line within one of the Java files and save. 3. Create a patch.
Any thoughts on this? We frankly don't know if this is really an issue with the create patch wizard or not but are stumped. This issue is making ongoing Coordinator work targeted for M5 (and beyond) more difficult. In order for the IP log to tally fairly, I have to send a bloated patch to someone with an Apple machine. They must then apply the patch and create a new one in order to show only the changes that are made. The apply patch process using the bloated patch shows only the changes that actually occurred.
Note that CVS command line catches only the relevant changes. $ cvs diff -N -u -l org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/Activator.java Index: org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/Activator.java =================================================================== RCS file: /cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/Activator.java,v retrieving revision 1.2 diff -u -r1.2 Activator.java --- org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/Activator.java 20 Dec 2010 13:00:11 - 0000 1.2 +++ org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/Activator.java 21 Mar 2011 18:43:11 - 0000 @@ -19,7 +19,7 @@ import org.osgi.service.coordinator.Coordinator; public class Activator implements BundleActivator { - // Static so the factory can be used by both DS and standard OSGi. + // Static so the factory can be used by both DS and standard OSGi. Hello! static volatile CoordinatorServiceFactory factory; private ServiceRegistration<Coordinator> registration; $ cvs version Client: Concurrent Versions System (CVS) 1.12.13 (client/server) Server: Concurrent Versions System (CVS) 1.12.12 (client/server) Given the same change, using the create patch wizard produces the following in the CVS console. *** cvs diff -N -u -l "/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/Activator.java" Index: src/org/eclipse/equinox/coordinator/Activator.java =================================================================== RCS file: /cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/Activator.java,v retrieving revision 1.2 diff -u -r1.2 Activator.java --- src/org/eclipse/equinox/coordinator/Activator.java 20 Dec 2010 13:00:11 -0000 1.2 +++ src/org/eclipse/equinox/coordinator/Activator.java 21 Mar 2011 18:59:53 -0000 @@ -1,47 +1,47 @@ -/******************************************************************************* - * Copyright (c) 2010 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.equinox.coordinator; - -import java.util.Dictionary; -import java.util.Hashtable; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceRegistration; -import org.osgi.service.coordinator.Coordinator; - -public class Activator implements BundleActivator { - // Static so the factory can be used by both DS and standard OSGi. - static volatile CoordinatorServiceFactory factory; - - private ServiceRegistration<Coordinator> registration; - - public void start(BundleContext bundleContext) throws Exception { - // Instantiate the factory to be used by both DS and standard OSGi. In the case of DS, the - // start method is guaranteed to be called before any components are created. - factory = new CoordinatorServiceFactory(bundleContext); - if (Boolean.valueOf(bundleContext.getProperty("equinox.use.ds")).booleanValue()) //$NON-NLS-1$ - return; // If this property is set we assume DS is being used. - Dictionary<String, Object> properties = new Hashtable<String, Object>(); - // TODO Add desired properties (bundle vendor, etc.). - @SuppressWarnings({"unchecked"}) - // Use local variable to avoid suppressing unchecked warnings at method level. - ServiceRegistration<Coordinator> reg = (ServiceRegistration<Coordinator>) bundleContext.registerService(Coordinator.class.getName(), factory, properties); - this.registration = reg; - } - - public void stop(BundleContext bundleContext) throws Exception { - // Will be null when using DS. - if (registration != null) - registration.unregister(); - factory.shutdown(); - } -} +/******************************************************************************* + * Copyright (c) 2010 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.equinox.coordinator; + +import java.util.Dictionary; +import java.util.Hashtable; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; +import org.osgi.service.coordinator.Coordinator; + +public class Activator implements BundleActivator { + // Static so the factory can be used by both DS and standard OSGi. Hello! + static volatile CoordinatorServiceFactory factory; + + private ServiceRegistration<Coordinator> registration; + + public void start(BundleContext bundleContext) throws Exception { + // Instantiate the factory to be used by both DS and standard OSGi. In the case of DS, the + // start method is guaranteed to be called before any components are created. + factory = new CoordinatorServiceFactory(bundleContext); + if (Boolean.valueOf(bundleContext.getProperty("equinox.use.ds")).booleanValue()) //$NON-NLS-1$ + return; // If this property is set we assume DS is being used. + Dictionary<String, Object> properties = new Hashtable<String, Object>(); + // TODO Add desired properties (bundle vendor, etc.). + @SuppressWarnings({"unchecked"}) + // Use local variable to avoid suppressing unchecked warnings at method level. + ServiceRegistration<Coordinator> reg = (ServiceRegistration<Coordinator>) bundleContext.registerService(Coordinator.class.getName(), factory, properties); + this.registration = reg; + } + + public void stop(BundleContext bundleContext) throws Exception { + // Will be null when using DS. + if (registration != null) + registration.unregister(); + factory.shutdown(); + } +} The server reported an error while performing the "cvs diff" command which may only indicate that a difference exists. (took 0:00.172) Error: org.eclipse.equinox.coordinator: The server did not provide any additional information. ***
We (Tom and I) directly examined the files on the Eclipse CVS server (Linux) underneath the org.eclipse.equinox.coordinator project and noticed that some had CRLF line terminators while others had LF. We checked out the project on a Linux box and converted all CRLF to LF using dos2unix, then checked in those changes. We then retrieved those changes on a Windows box and reran the scenario in comment 2. The create patch wizard no longer reports the entire file as having been changed, only those changes that actually occurred.
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. If you have further information on the current state of the bug, please add it. 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. If the bug is still relevant please remove the stalebug whiteboard tag.