From fdd1ac930e702760456b1cca69c415b404be1ca3 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 19 Aug 2013 01:12:10 +0200 Subject: [PATCH 01/15] Prepare 3.0.2-SNAPSHOT builds Change-Id: I3287609a90f068017cc62f4fd7738651e0663081 Signed-off-by: Matthias Sohn --- .../META-INF/MANIFEST.MF | 10 +-- org.eclipse.jgit.ant.test/pom.xml | 2 +- org.eclipse.jgit.ant/META-INF/MANIFEST.MF | 6 +- org.eclipse.jgit.ant/pom.xml | 2 +- org.eclipse.jgit.console/META-INF/MANIFEST.MF | 12 ++-- org.eclipse.jgit.console/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 24 +++---- org.eclipse.jgit.http.server/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 32 ++++----- org.eclipse.jgit.http.test/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 8 +-- org.eclipse.jgit.java7.test/pom.xml | 2 +- org.eclipse.jgit.java7/META-INF/MANIFEST.MF | 6 +- .../META-INF/SOURCE-MANIFEST.MF | 4 +- org.eclipse.jgit.java7/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 20 +++--- org.eclipse.jgit.junit.http/pom.xml | 2 +- org.eclipse.jgit.junit/META-INF/MANIFEST.MF | 30 ++++---- org.eclipse.jgit.junit/pom.xml | 2 +- .../org.eclipse.jgit.feature/feature.xml | 2 +- .../org.eclipse.jgit.feature/pom.xml | 2 +- .../feature.xml | 2 +- .../org.eclipse.jgit.java7.feature/pom.xml | 2 +- .../feature.xml | 2 +- .../org.eclipse.jgit.junit.feature/pom.xml | 2 +- .../org.eclipse.jgit.pgm.feature/feature.xml | 4 +- .../org.eclipse.jgit.pgm.feature/pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../org.eclipse.jgit.repository/pom.xml | 2 +- .../feature.xml | 2 +- .../org.eclipse.jgit.source.feature/pom.xml | 2 +- org.eclipse.jgit.packaging/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 28 ++++---- org.eclipse.jgit.pgm.test/pom.xml | 2 +- org.eclipse.jgit.pgm/META-INF/MANIFEST.MF | 58 +++++++-------- .../META-INF/SOURCE-MANIFEST.MF | 4 +- org.eclipse.jgit.pgm/pom.xml | 2 +- org.eclipse.jgit.test/META-INF/MANIFEST.MF | 70 +++++++++---------- org.eclipse.jgit.test/pom.xml | 2 +- org.eclipse.jgit.ui/META-INF/MANIFEST.MF | 18 ++--- org.eclipse.jgit.ui/pom.xml | 2 +- org.eclipse.jgit/META-INF/MANIFEST.MF | 62 ++++++++-------- org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF | 4 +- org.eclipse.jgit/pom.xml | 2 +- pom.xml | 2 +- 46 files changed, 228 insertions(+), 228 deletions(-) diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index a0d78e3c5..3994448ad 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -3,14 +3,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ant.test -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.ant.tasks;version="3.0.0", - org.eclipse.jgit.internal.storage.file;version="3.0.0", + org.eclipse.jgit.ant.tasks;version="3.0.2", + org.eclipse.jgit.internal.storage.file;version="3.0.2", org.eclipse.jgit.junit, - org.eclipse.jgit.lib;version="3.0.0", - org.eclipse.jgit.util;version="3.0.0", + org.eclipse.jgit.lib;version="3.0.2", + org.eclipse.jgit.util;version="3.0.2", org.hamcrest;version="1.1.0", org.junit;version="[4.0.0,5.0.0)" diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml index ee51ec043..b6717a25e 100644 --- a/org.eclipse.jgit.ant.test/pom.xml +++ b/org.eclipse.jgit.ant.test/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.ant.test diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF index 3343dacf3..467417962 100644 --- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.ant -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.storage.file;version="[3.0.0,3.1.0)" + org.eclipse.jgit.storage.file;version="[3.0.2,3.1.0)" Bundle-Localization: plugin Bundle-Vendor: %Provider-Name -Export-Package: org.eclipse.jgit.ant.tasks;version="3.0.0" +Export-Package: org.eclipse.jgit.ant.tasks;version="3.0.2" diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index 5593c169c..1e6b35575 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -48,7 +48,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.ant diff --git a/org.eclipse.jgit.console/META-INF/MANIFEST.MF b/org.eclipse.jgit.console/META-INF/MANIFEST.MF index b9a52d2a0..820af8c83 100644 --- a/org.eclipse.jgit.console/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.console/META-INF/MANIFEST.MF @@ -3,11 +3,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.console -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: org.eclipse.jgit.console;version="3.0.0" -Import-Package: org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.nls;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)" +Export-Package: org.eclipse.jgit.console;version="3.0.2" +Import-Package: org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.nls;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)" diff --git a/org.eclipse.jgit.console/pom.xml b/org.eclipse.jgit.console/pom.xml index 7486bced0..1e64d74b1 100644 --- a/org.eclipse.jgit.console/pom.xml +++ b/org.eclipse.jgit.console/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.console diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index c02eb4fc9..aa70cc5dd 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -2,22 +2,22 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.server -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Export-Package: - org.eclipse.jgit.http.server;version="3.0.0", - org.eclipse.jgit.http.server.glue;version="3.0.0", - org.eclipse.jgit.http.server.resolver;version="3.0.0" + org.eclipse.jgit.http.server;version="3.0.2", + org.eclipse.jgit.http.server.glue;version="3.0.2", + org.eclipse.jgit.http.server.resolver;version="3.0.2" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: javax.servlet;version="[2.5.0,3.0.0)", javax.servlet.http;version="[2.5.0,3.0.0)", - org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.nls;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport.resolver;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)" + org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.nls;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport.resolver;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)" diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index 5c619efba..71e4a4afa 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.http.server diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index 3f30d5838..a778795da 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.test -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 @@ -22,20 +22,20 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)", org.eclipse.jetty.util.log;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.security;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.thread;version="[7.6.0,8.0.0)", - org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.http.server;version="[3.0.0,3.1.0)", - org.eclipse.jgit.http.server.glue;version="[3.0.0,3.1.0)", - org.eclipse.jgit.http.server.resolver;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.junit;version="[3.0.0,3.1.0)", - org.eclipse.jgit.junit.http;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.nls;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport.resolver;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)", + org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.http.server;version="[3.0.2,3.1.0)", + org.eclipse.jgit.http.server.glue;version="[3.0.2,3.1.0)", + org.eclipse.jgit.http.server.resolver;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.junit;version="[3.0.2,3.1.0)", + org.eclipse.jgit.junit.http;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.nls;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport.resolver;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)", org.hamcrest.core;version="[1.1.0,2.0.0)", org.junit;version="[4.0.0,5.0.0)" diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index 83c645b3a..4614d63ce 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -51,7 +51,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.http.test diff --git a/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF index cf143b7c9..6b992ff90 100644 --- a/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.java7.test -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Import-Package: org.eclipse.jgit.junit;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)" +Import-Package: org.eclipse.jgit.junit;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)" diff --git a/org.eclipse.jgit.java7.test/pom.xml b/org.eclipse.jgit.java7.test/pom.xml index c395669e3..c6b25d4ab 100644 --- a/org.eclipse.jgit.java7.test/pom.xml +++ b/org.eclipse.jgit.java7.test/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.java7.test diff --git a/org.eclipse.jgit.java7/META-INF/MANIFEST.MF b/org.eclipse.jgit.java7/META-INF/MANIFEST.MF index 911b00873..4251e5f71 100644 --- a/org.eclipse.jgit.java7/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.java7/META-INF/MANIFEST.MF @@ -1,10 +1,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Fragment-Host: org.eclipse.jgit;bundle-version="3.0.0" +Fragment-Host: org.eclipse.jgit;bundle-version="3.0.2" Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.java7 -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Export-Package: org.eclipse.jgit.util;version="3.0.0" +Export-Package: org.eclipse.jgit.util;version="3.0.2" diff --git a/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF index fcdf443c5..fdadca14c 100644 --- a/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.java7 - Sources Bundle-SymbolicName: org.eclipse.jgit.java7.source;singleton:=true Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 3.0.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.java7;version="3.0.0";roots="." +Bundle-Version: 3.0.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.java7;version="3.0.2";roots="." diff --git a/org.eclipse.jgit.java7/pom.xml b/org.eclipse.jgit.java7/pom.xml index 3bd83313c..978674fd1 100644 --- a/org.eclipse.jgit.java7/pom.xml +++ b/org.eclipse.jgit.java7/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.java7 diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index d7cf2c29d..26a51b97c 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit.http -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy @@ -19,13 +19,13 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)", org.eclipse.jetty.util.component;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.log;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.security;version="[7.6.0,8.0.0)", - org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.http.server;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.junit;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport.resolver;version="[3.0.0,3.1.0)", + org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.http.server;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.junit;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport.resolver;version="[3.0.2,3.1.0)", org.junit;version="[4.0.0,5.0.0)" -Export-Package: org.eclipse.jgit.junit.http;version="3.0.0" +Export-Package: org.eclipse.jgit.junit.http;version="3.0.2" diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index 78c1ca3ca..0382f244d 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.junit.http diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF index 98d8e363d..14baebfe1 100644 --- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF @@ -2,23 +2,23 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.eclipse.jgit.api;version="[3.0.0,3.1.0)", - org.eclipse.jgit.api.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.dircache;version="[3.0.0,3.1.0)", - org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.pack;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.treewalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.treewalk.filter;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util.io;version="[3.0.0,3.1.0)", +Import-Package: org.eclipse.jgit.api;version="[3.0.2,3.1.0)", + org.eclipse.jgit.api.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.dircache;version="[3.0.2,3.1.0)", + org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.pack;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.treewalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.treewalk.filter;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util.io;version="[3.0.2,3.1.0)", org.junit;version="[4.0.0,5.0.0)" -Export-Package: org.eclipse.jgit.junit;version="3.0.0" +Export-Package: org.eclipse.jgit.junit;version="3.0.2" diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml index bb6b4ced8..743faaf88 100644 --- a/org.eclipse.jgit.junit/pom.xml +++ b/org.eclipse.jgit.junit/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.junit diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml index 5f94674a8..5ba3d57ed 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml index 33a90a652..f38059c82 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml index af3bd252f..29348e509 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml index df58462ee..ba2024e7a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml index 1994295c3..e324028b3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml index 652bc1fd5..0647d27ea 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml index f1d983054..ad3dcad4a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml @@ -2,7 +2,7 @@ @@ -23,7 +23,7 @@ - + org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml index 4fa30db8f..55d5b863f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml index 7740c2422..132943455 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml index 9df3ab05e..50e51ecdf 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.repository diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml index 813bbcce6..b9795efb9 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml index c8783e301..64cc3ceb8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index 042e05e7b..a0f57aa39 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -53,7 +53,7 @@ org.eclipse.jgit jgit.tycho.parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT pom JGit Tycho Parent diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF index 4d8215930..e69c988d7 100644 --- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF @@ -2,24 +2,24 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm.test -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.eclipse.jgit.api;version="[3.0.0,3.1.0)", - org.eclipse.jgit.dircache;version="[3.0.0,3.1.0)", - org.eclipse.jgit.java7;version="[3.0.0,3.1.0)";resolution:=optional, - org.eclipse.jgit.junit;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.merge;version="[3.0.0,3.1.0)", - org.eclipse.jgit.pgm;version="[3.0.0,3.1.0)", - org.eclipse.jgit.pgm.internal;version="[3.0.0,3.1.0)", - org.eclipse.jgit.pgm.opt;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util.io;version="[3.0.0,3.1.0)", +Import-Package: org.eclipse.jgit.api;version="[3.0.2,3.1.0)", + org.eclipse.jgit.dircache;version="[3.0.2,3.1.0)", + org.eclipse.jgit.java7;version="[3.0.2,3.1.0)";resolution:=optional, + org.eclipse.jgit.junit;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.merge;version="[3.0.2,3.1.0)", + org.eclipse.jgit.pgm;version="[3.0.2,3.1.0)", + org.eclipse.jgit.pgm.internal;version="[3.0.2,3.1.0)", + org.eclipse.jgit.pgm.opt;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util.io;version="[3.0.2,3.1.0)", org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", org.junit;version="[4.4.0,5.0.0)", org.kohsuke.args4j;version="[2.0.12,2.1.0)" diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml index ab72c1d71..0c59b8d37 100644 --- a/org.eclipse.jgit.pgm.test/pom.xml +++ b/org.eclipse.jgit.pgm.test/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.pgm.test diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index a6e5e2191..4ef612e1c 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -2,41 +2,41 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.apache.commons.compress.archivers;version="[1.3,2.0)", org.apache.commons.compress.archivers.tar;version="[1.3,2.0)", org.apache.commons.compress.archivers.zip;version="[1.3,2.0)", - org.eclipse.jgit.api;version="[3.0.0,3.1.0)", - org.eclipse.jgit.api.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.awtui;version="[3.0.0,3.1.0)", - org.eclipse.jgit.blame;version="[3.0.0,3.1.0)", - org.eclipse.jgit.diff;version="[3.0.0,3.1.0)", - org.eclipse.jgit.dircache;version="[3.0.0,3.1.0)", - org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.pack;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.merge;version="3.0.0", - org.eclipse.jgit.nls;version="[3.0.0,3.1.0)", - org.eclipse.jgit.notes;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revplot;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk.filter;version="[3.0.0,3.1.0)", - org.eclipse.jgit.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.storage.pack;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport.resolver;version="[3.0.0,3.1.0)", - org.eclipse.jgit.treewalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.treewalk.filter;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util.io;version="[3.0.0,3.1.0)", + org.eclipse.jgit.api;version="[3.0.2,3.1.0)", + org.eclipse.jgit.api.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.awtui;version="[3.0.2,3.1.0)", + org.eclipse.jgit.blame;version="[3.0.2,3.1.0)", + org.eclipse.jgit.diff;version="[3.0.2,3.1.0)", + org.eclipse.jgit.dircache;version="[3.0.2,3.1.0)", + org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.pack;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.merge;version="3.0.2", + org.eclipse.jgit.nls;version="[3.0.2,3.1.0)", + org.eclipse.jgit.notes;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revplot;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk.filter;version="[3.0.2,3.1.0)", + org.eclipse.jgit.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.storage.pack;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport.resolver;version="[3.0.2,3.1.0)", + org.eclipse.jgit.treewalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.treewalk.filter;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util.io;version="[3.0.2,3.1.0)", org.kohsuke.args4j;version="[2.0.12,2.1.0)", org.kohsuke.args4j.spi;version="[2.0.12,2.1.0)" Bundle-ActivationPolicy: lazy -Export-Package: org.eclipse.jgit.pgm;version="3.0.0"; +Export-Package: org.eclipse.jgit.pgm;version="3.0.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.nls, org.eclipse.jgit.treewalk, @@ -45,8 +45,8 @@ Export-Package: org.eclipse.jgit.pgm;version="3.0.0"; org.eclipse.jgit.pgm.opt, org.eclipse.jgit.awtui, org.eclipse.jgit.transport", - org.eclipse.jgit.pgm.debug;version="3.0.0", - org.eclipse.jgit.pgm.internal;version="3.0.0";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test", - org.eclipse.jgit.pgm.opt;version="3.0.0" + org.eclipse.jgit.pgm.debug;version="3.0.2", + org.eclipse.jgit.pgm.internal;version="3.0.2";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test", + org.eclipse.jgit.pgm.opt;version="3.0.2" Main-Class: org.eclipse.jgit.pgm.Main Implementation-Title: JGit Command Line Interface diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF index 02522a239..bb255c560 100644 --- a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.pgm - Sources Bundle-SymbolicName: org.eclipse.jgit.pgm.source;singleton:=true Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 3.0.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="3.0.0";roots="." +Bundle-Version: 3.0.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="3.0.2";roots="." diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index b51019c18..d6fb1b874 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.pgm diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index cd81fd6ba..d95538b3f 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -2,46 +2,46 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.test -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: javaewah;version="0.5.6", - org.eclipse.jgit.api;version="[3.0.0,3.1.0)", - org.eclipse.jgit.api.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.awtui;version="[3.0.0,3.1.0)", - org.eclipse.jgit.blame;version="[3.0.0,3.1.0)", - org.eclipse.jgit.console;version="[3.0.0,3.1.0)", - org.eclipse.jgit.diff;version="[3.0.0,3.1.0)", - org.eclipse.jgit.dircache;version="[3.0.0,3.1.0)", - org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.events;version="[3.0.0,3.1.0)", - org.eclipse.jgit.fnmatch;version="[3.0.0,3.1.0)", - org.eclipse.jgit.ignore;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.internal.storage.pack;version="[3.0.0,3.1.0)", - org.eclipse.jgit.java7;version="[3.0.0,3.1.0)";resolution:=optional, - org.eclipse.jgit.junit;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.merge;version="[3.0.0,3.1.0)", - org.eclipse.jgit.nls;version="[3.0.0,3.1.0)", - org.eclipse.jgit.notes;version="[3.0.0,3.1.0)", - org.eclipse.jgit.patch;version="[3.0.0,3.1.0)", - org.eclipse.jgit.pgm;version="[3.0.0,3.1.0)", - org.eclipse.jgit.pgm.internal;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revplot;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk.filter;version="[3.0.0,3.1.0)", - org.eclipse.jgit.storage.file;version="[3.0.0,3.1.0)", - org.eclipse.jgit.storage.pack;version="[3.0.0,3.1.0)", - org.eclipse.jgit.submodule;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport;version="[3.0.0,3.1.0)", - org.eclipse.jgit.treewalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.treewalk.filter;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util.io;version="[3.0.0,3.1.0)", + org.eclipse.jgit.api;version="[3.0.2,3.1.0)", + org.eclipse.jgit.api.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.awtui;version="[3.0.2,3.1.0)", + org.eclipse.jgit.blame;version="[3.0.2,3.1.0)", + org.eclipse.jgit.console;version="[3.0.2,3.1.0)", + org.eclipse.jgit.diff;version="[3.0.2,3.1.0)", + org.eclipse.jgit.dircache;version="[3.0.2,3.1.0)", + org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.events;version="[3.0.2,3.1.0)", + org.eclipse.jgit.fnmatch;version="[3.0.2,3.1.0)", + org.eclipse.jgit.ignore;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.internal.storage.pack;version="[3.0.2,3.1.0)", + org.eclipse.jgit.java7;version="[3.0.2,3.1.0)";resolution:=optional, + org.eclipse.jgit.junit;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.merge;version="[3.0.2,3.1.0)", + org.eclipse.jgit.nls;version="[3.0.2,3.1.0)", + org.eclipse.jgit.notes;version="[3.0.2,3.1.0)", + org.eclipse.jgit.patch;version="[3.0.2,3.1.0)", + org.eclipse.jgit.pgm;version="[3.0.2,3.1.0)", + org.eclipse.jgit.pgm.internal;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revplot;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk.filter;version="[3.0.2,3.1.0)", + org.eclipse.jgit.storage.file;version="[3.0.2,3.1.0)", + org.eclipse.jgit.storage.pack;version="[3.0.2,3.1.0)", + org.eclipse.jgit.submodule;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport;version="[3.0.2,3.1.0)", + org.eclipse.jgit.treewalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.treewalk.filter;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util.io;version="[3.0.2,3.1.0)", org.hamcrest;version="[1.1.0,2.0.0)", org.junit;version="[4.4.0,5.0.0)", org.junit.experimental.theories;version="[4.4.0,5.0.0)", diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index 4d9eae99b..36eac88c5 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.test diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF index 289f3f3a0..74c35741f 100644 --- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF @@ -3,14 +3,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ui -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: org.eclipse.jgit.awtui;version="3.0.0" -Import-Package: org.eclipse.jgit.errors;version="[3.0.0,3.1.0)", - org.eclipse.jgit.lib;version="[3.0.0,3.1.0)", - org.eclipse.jgit.nls;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revplot;version="[3.0.0,3.1.0)", - org.eclipse.jgit.revwalk;version="[3.0.0,3.1.0)", - org.eclipse.jgit.transport;version="[3.0.0,3.1.0)", - org.eclipse.jgit.util;version="[3.0.0,3.1.0)" +Export-Package: org.eclipse.jgit.awtui;version="3.0.2" +Import-Package: org.eclipse.jgit.errors;version="[3.0.2,3.1.0)", + org.eclipse.jgit.lib;version="[3.0.2,3.1.0)", + org.eclipse.jgit.nls;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revplot;version="[3.0.2,3.1.0)", + org.eclipse.jgit.revwalk;version="[3.0.2,3.1.0)", + org.eclipse.jgit.transport;version="[3.0.2,3.1.0)", + org.eclipse.jgit.util;version="[3.0.2,3.1.0)" diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml index 4fbd08e71..6a4200ae8 100644 --- a/org.eclipse.jgit.ui/pom.xml +++ b/org.eclipse.jgit.ui/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit.ui diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index aad02c3dd..52512fdfc 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -2,40 +2,40 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name -Export-Package: org.eclipse.jgit.api;version="3.0.0", - org.eclipse.jgit.api.errors;version="3.0.0", - org.eclipse.jgit.blame;version="3.0.0", - org.eclipse.jgit.diff;version="3.0.0", - org.eclipse.jgit.dircache;version="3.0.0", - org.eclipse.jgit.errors;version="3.0.0", - org.eclipse.jgit.events;version="3.0.0", - org.eclipse.jgit.fnmatch;version="3.0.0", - org.eclipse.jgit.ignore;version="3.0.0", - org.eclipse.jgit.internal;version="3.0.0";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test", - org.eclipse.jgit.internal.storage.dfs;version="3.0.0";x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.storage.file;version="3.0.0";x-friends:="org.eclipse.jgit.test, +Export-Package: org.eclipse.jgit.api;version="3.0.2", + org.eclipse.jgit.api.errors;version="3.0.2", + org.eclipse.jgit.blame;version="3.0.2", + org.eclipse.jgit.diff;version="3.0.2", + org.eclipse.jgit.dircache;version="3.0.2", + org.eclipse.jgit.errors;version="3.0.2", + org.eclipse.jgit.events;version="3.0.2", + org.eclipse.jgit.fnmatch;version="3.0.2", + org.eclipse.jgit.ignore;version="3.0.2", + org.eclipse.jgit.internal;version="3.0.2";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test", + org.eclipse.jgit.internal.storage.dfs;version="3.0.2";x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.internal.storage.file;version="3.0.2";x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.junit,org.eclipse.jgit.junit.http,org.eclipse.jgit.http.server", - org.eclipse.jgit.internal.storage.pack;version="3.0.0";x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.lib;version="3.0.0", - org.eclipse.jgit.merge;version="3.0.0", - org.eclipse.jgit.nls;version="3.0.0", - org.eclipse.jgit.notes;version="3.0.0", - org.eclipse.jgit.patch;version="3.0.0", - org.eclipse.jgit.revplot;version="3.0.0", - org.eclipse.jgit.revwalk;version="3.0.0", - org.eclipse.jgit.revwalk.filter;version="3.0.0", - org.eclipse.jgit.storage.file;version="3.0.0", - org.eclipse.jgit.storage.pack;version="3.0.0", - org.eclipse.jgit.submodule;version="3.0.0", - org.eclipse.jgit.transport;version="3.0.0", - org.eclipse.jgit.transport.resolver;version="3.0.0", - org.eclipse.jgit.treewalk;version="3.0.0", - org.eclipse.jgit.treewalk.filter;version="3.0.0", - org.eclipse.jgit.util;version="3.0.0", - org.eclipse.jgit.util.io;version="3.0.0" + org.eclipse.jgit.internal.storage.pack;version="3.0.2";x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.lib;version="3.0.2", + org.eclipse.jgit.merge;version="3.0.2", + org.eclipse.jgit.nls;version="3.0.2", + org.eclipse.jgit.notes;version="3.0.2", + org.eclipse.jgit.patch;version="3.0.2", + org.eclipse.jgit.revplot;version="3.0.2", + org.eclipse.jgit.revwalk;version="3.0.2", + org.eclipse.jgit.revwalk.filter;version="3.0.2", + org.eclipse.jgit.storage.file;version="3.0.2", + org.eclipse.jgit.storage.pack;version="3.0.2", + org.eclipse.jgit.submodule;version="3.0.2", + org.eclipse.jgit.transport;version="3.0.2", + org.eclipse.jgit.transport.resolver;version="3.0.2", + org.eclipse.jgit.treewalk;version="3.0.2", + org.eclipse.jgit.treewalk.filter;version="3.0.2", + org.eclipse.jgit.util;version="3.0.2", + org.eclipse.jgit.util.io;version="3.0.2" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Require-Bundle: com.jcraft.jsch;bundle-version="[0.1.37,0.2.0)" diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF index 10d0f12ae..8a8f1e701 100644 --- a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit - Sources Bundle-SymbolicName: org.eclipse.jgit.source;singleton:=true Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 3.0.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit;version="3.0.0";roots="." +Bundle-Version: 3.0.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit;version="3.0.2";roots="." diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index 4966e92a5..6bd18acb7 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -53,7 +53,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT org.eclipse.jgit diff --git a/pom.xml b/pom.xml index ee1e45f40..af90298a0 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ org.eclipse.jgit org.eclipse.jgit-parent pom - 3.0.0-SNAPSHOT + 3.0.2-SNAPSHOT JGit - Parent ${jgit-url} From f94b258717015157e69c10ed316a07fa44ea2196 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 1 Jun 2013 00:36:17 +0200 Subject: [PATCH 02/15] Add jgit target platform to define dependencies more precisely Avoid that the packaging build picks an older jgit version coming with eclipse platform by using a target platform which allows to define the dependencies more precisely. Change-Id: I39bba3baa4517e2b5e5fe0de096e756f2904e3e9 Signed-off-by: Matthias Sohn --- .../org.eclipse.jgit.target/.classpath | 7 ++ .../org.eclipse.jgit.target/.project | 17 +++++ .../META-INF/MANIFEST.MF | 5 ++ .../org.eclipse.jgit.target/build.properties | 4 ++ .../org.eclipse.jgit.target.target | 72 +++++++++++++++++++ .../org.eclipse.jgit.target/pom.xml | 58 +++++++++++++++ org.eclipse.jgit.packaging/pom.xml | 31 +++----- 7 files changed, 171 insertions(+), 23 deletions(-) create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath new file mode 100644 index 000000000..64c5e31b7 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project new file mode 100644 index 000000000..18caf2c7e --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project @@ -0,0 +1,17 @@ + + + org.eclipse.jgit.target + + + + + + org.eclipse.pde.ManifestBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF new file mode 100644 index 000000000..99a880f2b --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: JGit Target Platform Bundle +Bundle-SymbolicName: org.eclipse.jgit.target +Bundle-Version: 3.0.2.qualifier diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties new file mode 100644 index 000000000..34d2e4d2d --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target new file mode 100644 index 000000000..11e651dba --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml new file mode 100644 index 000000000..5ff35ba5b --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml @@ -0,0 +1,58 @@ + + + + 4.0.0 + + + org.eclipse.jgit + jgit.tycho.parent + 3.0.2-SNAPSHOT + + + org.eclipse.jgit.target + eclipse-target-definition + JGit Target Platform + \ No newline at end of file diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index a0f57aa39..84037883c 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -60,14 +60,10 @@ 0.17.0 - 7.6.0.v20120127 - 2.0.21.v201301150030 - 0.1.46.v201205102330 - http://download.eclipse.org/releases/juno - http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository/ + org.eclipse.jgit.target org.eclipse.jgit.feature org.eclipse.jgit.java7.feature org.eclipse.jgit.pgm.feature @@ -77,24 +73,6 @@ org.eclipse.jgit.repository - - - indigo - p2 - ${eclipse-site} - - - jetty - p2 - http://archive.eclipse.org/jetty/updates/jetty-bundles-7.x/${jetty-version}/ - - - orbit - p2 - ${orbit-site} - - - repo.eclipse.org @@ -167,6 +145,13 @@ p2 consider + + + org.eclipse.jgit + org.eclipse.jgit.target + ${project.version} + + linux From 4b41b68bc2cc111a34c46e088caf5a80dd85359d Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 2 Jun 2013 00:26:59 +0200 Subject: [PATCH 03/15] Update build to use Tycho 0.18 Change-Id: I66ffb2b6416dbbd5da11ad789dd58060b7ab09f2 Signed-off-by: Matthias Sohn --- org.eclipse.jgit.packaging/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index 84037883c..b52011133 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -59,7 +59,7 @@ JGit Tycho Parent - 0.17.0 + 0.18.0 From ec2202f563b56e55c7e18e36edc0a64aab0d9d26 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sat, 30 Mar 2013 11:03:33 +0100 Subject: [PATCH 04/15] Recognize CRLF when parsing the short message of a commit or tag Bug: 400707 Change-Id: I9b09bb88528af465018fc0278f5441f7e6b75986 --- .../jgit/revwalk/RevCommitParseTest.java | 13 ++++++++++ .../eclipse/jgit/util/StringUtilsTest.java | 12 +++++++++ .../org/eclipse/jgit/revwalk/RevCommit.java | 3 ++- .../src/org/eclipse/jgit/revwalk/RevTag.java | 3 ++- .../org/eclipse/jgit/util/RawParseUtils.java | 8 +++--- .../org/eclipse/jgit/util/StringUtils.java | 26 +++++++++++++++++++ 6 files changed, 60 insertions(+), 5 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java index 574f85c91..beda2a7b9 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java @@ -383,6 +383,19 @@ public class RevCommitParseTest extends RepositoryTestCase { assertEquals(src.getMessage(), p.getFullMessage()); } + @Test + public void testParse_GitStyleMessageWithCRLF() throws Exception { + final String shortMsgIn = "This fixes a\r\nbug.\r\n\r\n"; + final String shortMsg = "This fixes a bug."; + final String body = "We do it with magic and pixie dust\r\nand stuff.\r\n" + + "\r\n\r\n" + + "Signed-off-by: A U. Thor \r\n"; + final String fullMsg = shortMsgIn + "\r\n" + "\r\n" + body; + final RevCommit c = create(fullMsg); + assertEquals(fullMsg, c.getFullMessage()); + assertEquals(shortMsg, c.getShortMessage()); + } + private static ObjectId id(final String str) { return ObjectId.fromString(str); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java index d7b92ade9..86fed22af 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java @@ -91,4 +91,16 @@ public class StringUtilsTest { assertTrue(StringUtils.equalsIgnoreCase("A", "a")); assertTrue(StringUtils.equalsIgnoreCase("a", "A")); } + + @Test + public void testReplaceLineBreaks() { + assertEquals("a b c ", + StringUtils.replaceLineBreaksWithSpace("a b\nc\r")); + assertEquals("a b c ", + StringUtils.replaceLineBreaksWithSpace("a b\nc\n")); + assertEquals("a b c ", + StringUtils.replaceLineBreaksWithSpace("a b\nc\r\n")); + assertEquals("a b c d", + StringUtils.replaceLineBreaksWithSpace("a\r\nb\nc d")); + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java index 9f2ccfd97..93d28aaf5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java @@ -59,6 +59,7 @@ import org.eclipse.jgit.lib.ObjectInserter; import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.util.RawParseUtils; +import org.eclipse.jgit.util.StringUtils; /** A commit reference to a commit in the DAG. */ public class RevCommit extends RevObject { @@ -421,7 +422,7 @@ public class RevCommit extends RevObject { final int msgE = RawParseUtils.endOfParagraph(raw, msgB); String str = RawParseUtils.decode(enc, raw, msgB, msgE); if (hasLF(raw, msgB, msgE)) - str = str.replace('\n', ' '); + str = StringUtils.replaceLineBreaksWithSpace(str); return str; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java index 12693a03e..1a59b440c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java @@ -58,6 +58,7 @@ import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.util.MutableInteger; import org.eclipse.jgit.util.RawParseUtils; +import org.eclipse.jgit.util.StringUtils; /** An annotated tag. */ public class RevTag extends RevObject { @@ -234,7 +235,7 @@ public class RevTag extends RevObject { final int msgE = RawParseUtils.endOfParagraph(raw, msgB); String str = RawParseUtils.decode(enc, raw, msgB, msgE); if (RevCommit.hasLF(raw, msgB, msgE)) - str = str.replace('\n', ' '); + str = StringUtils.replaceLineBreaksWithSpace(str); return str; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java index 9114d500e..2f9a6d12c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java @@ -1058,7 +1058,7 @@ public final class RawParseUtils { /** * Locate the end of a paragraph. *

- * A paragraph is ended by two consecutive LF bytes. + * A paragraph is ended by two consecutive LF bytes or CRLF pairs * * @param b * buffer to scan. @@ -1072,9 +1072,11 @@ public final class RawParseUtils { public static final int endOfParagraph(final byte[] b, final int start) { int ptr = start; final int sz = b.length; - while (ptr < sz && b[ptr] != '\n') + while (ptr < sz && (b[ptr] != '\n' && b[ptr] != '\r')) ptr = nextLF(b, ptr); - while (0 < ptr && start < ptr && b[ptr - 1] == '\n') + if (ptr > start && b[ptr - 1] == '\n') + ptr--; + if (ptr > start && b[ptr - 1] == '\r') ptr--; return ptr; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java index cb4895025..bfefc50c3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java @@ -279,4 +279,30 @@ public final class StringUtils { public static boolean isEmptyOrNull(String stringValue) { return stringValue == null || stringValue.length() == 0; } + + /** + * Replace CRLF, CR or LF with a single space. + * + * @param in + * A string with line breaks + * @return in without line breaks + */ + public static String replaceLineBreaksWithSpace(String in) { + char[] buf = new char[in.length()]; + int o = 0; + for (int i = 0; i < buf.length; ++i) { + char ch = in.charAt(i); + if (ch == '\r') { + if (i + 1 < buf.length && in.charAt(i + 1) == '\n') { + buf[o++] = ' '; + ++i; + } else + buf[o++] = ' '; + } else if (ch == '\n') + buf[o++] = ' '; + else + buf[o++] = ch; + } + return new String(buf, 0, o); + } } From 423f7227cdd5f4ff9607daf063d15c2b290aa5b8 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sun, 16 Jun 2013 11:28:36 +0200 Subject: [PATCH 05/15] Fix running maven http tests on OS X In 36144e12d8 tests were changed to use the system tmp directory as defined by java.io.tmpdir, which was then overridden in the pom files to usea custom directory that made som tests work, but not all. Change-Id: I2fa04878f8830ad9c9b32a6f3fe8d2e2d66fe411 --- org.eclipse.jgit.http.test/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index 4614d63ce..31382bcc6 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -111,5 +111,13 @@ tst-rsrc/ + + + maven-surefire-plugin + + -Djava.io.tmpdir=${project.build.directory} + + + From 8a7f4864d8189ddb19fb3f03de686e19e51bd02c Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sun, 16 Jun 2013 12:02:14 +0200 Subject: [PATCH 06/15] Fix tests for OS X when the tmpdir is the default /tmp /tmp is a symbolic link and some tests break when the path gets canonicalized by JGit or Jetty. Allow Jetty to serve symlinks by setting init parameter "aliases" to true [1]. [1] http://wiki.eclipse.org/Jetty/Howto/How_to_serve_symbolically_linked_files Change-Id: I45359a40435e8a33def6e0bb6784b4d8637793ac Signed-off-by: Matthias Sohn --- .../eclipse/jgit/http/test/DumbClientDumbServerTest.java | 6 ++++-- .../org/eclipse/jgit/http/test/GitServletInitTest.java | 4 ++++ .../tst/org/eclipse/jgit/http/test/HttpClientTests.java | 4 +++- .../internal/storage/file/FileRepositoryBuilderTest.java | 9 +++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java index fbf4d075a..1726dc5eb 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java @@ -60,6 +60,7 @@ import java.util.Map; import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jgit.errors.NotSupportedException; import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.junit.http.AccessEvent; @@ -97,8 +98,9 @@ public class DumbClientDumbServerTest extends HttpTestCase { ServletContextHandler app = server.addContext("/git"); app.setResourceBase(base.toString()); - app.addServlet(DefaultServlet.class, "/"); - + ServletHolder holder = app.addServlet(DefaultServlet.class, "/"); + // The tmp directory is symlinked on OS X + holder.setInitParameter("aliases", "true"); server.setUp(); remoteRepository = src.getRepository(); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java index 9dfb19942..6cbb41e98 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java @@ -101,6 +101,8 @@ public class GitServletInitTest { ServletHolder s = app.addServlet(GitServlet.class, "/git"); s.setInitOrder(1); s.getServletHandler().setStartWithUnavailable(false); + // The tmp directory is symlinked on OS X + s.setInitParameter("aliases", "true"); try { server.setUp(); @@ -133,6 +135,8 @@ public class GitServletInitTest { s.setInitOrder(1); s.setInitParameter("base-path", "."); s.setInitParameter("export-all", "true"); + // The tmp directory is symlinked on OS X + s.setInitParameter("aliases", "true"); server.setUp(); assertTrue("no warnings", RecordingLogger.getWarnings().isEmpty()); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java index 8bdaf2cb6..b686d160b 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java @@ -123,7 +123,9 @@ public class HttpClientTests extends HttpTestCase { ServletContextHandler ctx = server.addContext(path); ctx.setResourceBase(base.toString()); - ctx.addServlet(DefaultServlet.class, "/"); + ServletHolder holder = ctx.addServlet(DefaultServlet.class, "/"); + // The tmp directory is symlinked on OS X + holder.setInitParameter("aliases", "true"); return ctx; } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java index 0655415a9..efdcfeb47 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java @@ -148,7 +148,10 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase { builder.setMustExist(true); Repository repo2 = builder.build(); - assertEquals(repo1.getDirectory(), repo2.getDirectory()); + // The tmp directory may be a symlink so the actual path + // may not + assertEquals(repo1.getDirectory().getCanonicalPath(), repo2 + .getDirectory().getCanonicalPath()); assertEquals(dir, repo2.getWorkTree()); } @@ -168,7 +171,9 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase { builder.setMustExist(true); Repository repo2 = builder.build(); - assertEquals(repo1.getDirectory(), repo2.getDirectory()); + // The tmp directory may be a symlink + assertEquals(repo1.getDirectory().getCanonicalPath(), repo2 + .getDirectory().getCanonicalPath()); assertEquals(dir, repo2.getWorkTree()); } } From bbea37a9e354bf5f7c2e673cfd0b0f1ef92f80d3 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Fri, 21 Jun 2013 16:14:30 -0700 Subject: [PATCH 07/15] Don't skip want validation when the client sends no haves Change-Id: I5e80b3befca5cf1dcb06075862d6d48e6491cc0f --- .../src/org/eclipse/jgit/transport/UploadPack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java index 5347eb713..808cd73df 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -786,10 +786,10 @@ public class UploadPack { private ObjectId processHaveLines(List peerHas, ObjectId last) throws IOException { preUploadHook.onBeginNegotiateRound(this, wantIds, peerHas.size()); - if (peerHas.isEmpty()) - return last; if (wantAll.isEmpty() && !wantIds.isEmpty()) parseWants(); + if (peerHas.isEmpty()) + return last; sentReady = false; int haveCnt = 0; From 81db591034880fca639b3cd07b10666bdfed650f Mon Sep 17 00:00:00 2001 From: Alex Rukhlin Date: Wed, 6 Mar 2013 16:35:52 -0500 Subject: [PATCH 08/15] Fix HTTP response processing for WWW-Authenticate headers The original code was able to process only one WWW-Authenticate header in an HTTP response, and if this header was not one of two expected, authentication failed regardless of that there could be other headers in the response. All WWW-Authenticate headers in an HTTP response have to be browsed to find one of supported, i.e. Basic or Digest. By that if both are present, the Digest one should be used as more preferable. Bug: 357719 Change-Id: Icf601a41fec63f7d40308f3c85aaa4f71a7c095b Signed-off-by: Alex Rukhlin Signed-off-by: Matthias Sohn --- .../eclipse/jgit/transport/HttpAuthTest.java | 162 ++++++++++++++++++ .../jgit/transport/HttpAuthMethod.java | 55 ++++-- 2 files changed, 200 insertions(+), 17 deletions(-) create mode 100644 org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java new file mode 100644 index 000000000..c142bc23a --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpAuthTest.java @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2013, Microsoft Corporation + * + * This program and the accompanying materials are made available + * under the terms of the Eclipse Distribution License v1.0 which + * accompanies this distribution, is reproduced below, and is + * available at http://www.eclipse.org/org/documents/edl-v10.php + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * - Neither the name of the Eclipse Foundation, Inc. nor the + * names of its contributors may be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.eclipse.jgit.transport; + +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.junit.Test; + +public class HttpAuthTest { + private static String digestHeader = "WWW-Authenticate: Digest qop=\"auth\",algorithm=MD5-sess,nonce=\"+Upgraded+v1b9...ba\",charset=utf-8,realm=\"Digest\""; + + private static String basicHeader = "WWW-Authenticate: Basic realm=\"everyones.loves.git\""; + + private static String ntlmHeader = "WWW-Authenticate: NTLM"; + + private static String bearerHeader = "WWW-Authenticate: Bearer"; + + private static String URL_SAMPLE = "http://everyones.loves.git/u/2"; + + private static String BASIC = "Basic"; + + private static String DIGEST = "Digest"; + + @Test + public void testHttpAuthScanResponse() throws MalformedURLException { + checkResponse(new String[] { basicHeader }, BASIC); + checkResponse(new String[] { digestHeader }, DIGEST); + checkResponse(new String[] { basicHeader, digestHeader }, DIGEST); + checkResponse(new String[] { digestHeader, basicHeader }, DIGEST); + checkResponse(new String[] { ntlmHeader, basicHeader, digestHeader, + bearerHeader }, DIGEST); + checkResponse(new String[] { ntlmHeader, basicHeader, bearerHeader }, + BASIC); + } + + private static void checkResponse(String[] headers, + String expectedAuthMethod) throws MalformedURLException { + + AuthHeadersResponse responce = new AuthHeadersResponse(headers); + HttpAuthMethod authMethod = HttpAuthMethod.scanResponse(responce); + + if (!expectedAuthMethod.equals(getAuthMethodName(authMethod))) { + fail("Wrong authentication method: expected " + expectedAuthMethod + + ", but received " + getAuthMethodName(authMethod)); + } + } + + private static String getAuthMethodName(HttpAuthMethod authMethod) { + return authMethod.getClass().getSimpleName(); + } + + private static class AuthHeadersResponse extends HttpURLConnection { + Map> headerFields = new HashMap>(); + + public AuthHeadersResponse(String[] authHeaders) + throws MalformedURLException { + super(new URL(URL_SAMPLE)); + parseHeaders(authHeaders); + } + + @Override + public void disconnect() { + fail("The disconnect method shouldn't be invoked"); + } + + @Override + public boolean usingProxy() { + return false; + } + + @Override + public void connect() throws IOException { + fail("The connect method shouldn't be invoked"); + } + + @Override + public String getHeaderField(String name) { + if (!headerFields.containsKey(name)) + return null; + else { + int n = headerFields.get(name).size(); + + if (n > 0) + return headerFields.get(name).get(n - 1); + else + return null; + } + } + + @Override + public Map> getHeaderFields() { + return headerFields; + } + + private void parseHeaders(String[] headers) { + for (String header : headers) { + int i = header.indexOf(':'); + + if (i < 0) + continue; + + String key = header.substring(0, i); + String value = header.substring(i + 1).trim(); + + if (!headerFields.containsKey(key)) + headerFields.put(key, new ArrayList()); + + List values = headerFields.get(key); + values.add(value); + } + } + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java index 4ab7998f5..8acba21bd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, Google Inc. + * Copyright (C) 2010, 2013, Google Inc. * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -55,7 +55,9 @@ import java.security.NoSuchAlgorithmException; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Random; import org.eclipse.jgit.util.Base64; @@ -69,6 +71,8 @@ import org.eclipse.jgit.util.Base64; abstract class HttpAuthMethod { /** No authentication is configured. */ static final HttpAuthMethod NONE = new None(); + static final String EMPTY_STRING = ""; //$NON-NLS-1$ + static final String SCHEMA_NAME_SEPARATOR = " "; //$NON-NLS-1$ /** * Handle an authentication failure and possibly return a new response. @@ -77,22 +81,39 @@ abstract class HttpAuthMethod { * the connection that failed. * @return new authentication method to try. */ - static HttpAuthMethod scanResponse(HttpURLConnection conn) { - String hdr = conn.getHeaderField(HDR_WWW_AUTHENTICATE); - if (hdr == null || hdr.length() == 0) - return NONE; - - int sp = hdr.indexOf(' '); - if (sp < 0) - return NONE; - - String type = hdr.substring(0, sp); - if (Basic.NAME.equalsIgnoreCase(type)) - return new Basic(); - else if (Digest.NAME.equalsIgnoreCase(type)) - return new Digest(hdr.substring(sp + 1)); - else - return NONE; + static HttpAuthMethod scanResponse(final HttpURLConnection conn) { + final Map> headers = conn.getHeaderFields(); + HttpAuthMethod authentication = NONE; + + for (final Entry> entry : headers.entrySet()) { + if (HDR_WWW_AUTHENTICATE.equalsIgnoreCase(entry.getKey())) { + if (entry.getValue() != null) { + for (final String value : entry.getValue()) { + if (value != null && value.length() != 0) { + final String[] valuePart = value.split( + SCHEMA_NAME_SEPARATOR, 2); + + if (Digest.NAME.equalsIgnoreCase(valuePart[0])) { + final String param; + if (valuePart.length == 1) + param = EMPTY_STRING; + else + param = valuePart[1]; + + authentication = new Digest(param); + break; + } + + if (Basic.NAME.equalsIgnoreCase(valuePart[0])) + authentication = new Basic(); + } + } + } + break; + } + } + + return authentication; } /** From 27c1c51079e1bd36c82203a6f89d1daa6cbef848 Mon Sep 17 00:00:00 2001 From: Hiroshi Tomita Date: Mon, 1 Jul 2013 01:07:10 +0900 Subject: [PATCH 09/15] Update HEAD in cherry-picking several commits Without update, index is wrongly detected to be dirty when picking the second commit. Change-Id: Idf47ecb33e8bd38340d760806d629f67be92d2d5 Signed-off-by: Hiroshi Tomita Bug: 411963 --- .../jgit/api/CherryPickCommandTest.java | 36 +++++++++++++++++++ .../eclipse/jgit/api/CherryPickCommand.java | 9 +++-- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java index f66661a52..2668c116a 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java @@ -111,6 +111,42 @@ public class CherryPickCommandTest extends RepositoryTestCase { assertFalse(history.hasNext()); } + @Test + public void testSequentialCherryPick() throws IOException, JGitInternalException, + GitAPIException { + Git git = new Git(db); + + writeTrashFile("a", "first line\nsec. line\nthird line\n"); + git.add().addFilepattern("a").call(); + RevCommit firstCommit = git.commit().setMessage("create a").call(); + + writeTrashFile("a", "first line\nsec. line\nthird line\nfourth line\n"); + git.add().addFilepattern("a").call(); + RevCommit enlargingA = git.commit().setMessage("enlarged a").call(); + + writeTrashFile("a", + "first line\nsecond line\nthird line\nfourth line\n"); + git.add().addFilepattern("a").call(); + RevCommit fixingA = git.commit().setMessage("fixed a").call(); + + git.branchCreate().setName("side").setStartPoint(firstCommit).call(); + checkoutBranch("refs/heads/side"); + + writeTrashFile("b", "nothing to do with a"); + git.add().addFilepattern("b").call(); + git.commit().setMessage("create b").call(); + + CherryPickResult result = git.cherryPick().include(enlargingA).include(fixingA).call(); + assertEquals(CherryPickResult.CherryPickStatus.OK, result.getStatus()); + + Iterator history = git.log().call().iterator(); + assertEquals("fixed a", history.next().getFullMessage()); + assertEquals("enlarged a", history.next().getFullMessage()); + assertEquals("create b", history.next().getFullMessage()); + assertEquals("create a", history.next().getFullMessage()); + assertFalse(history.hasNext()); + } + @Test public void testCherryPickDirtyIndex() throws Exception { Git git = new Git(db); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java index d5d955929..2ebff14f9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java @@ -122,9 +122,8 @@ public class CherryPickCommand extends GitCommand { if (headRef == null) throw new NoHeadException( JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported); - RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId()); - newHead = headCommit; + newHead = revWalk.parseCommit(headRef.getObjectId()); // loop through all refs to be cherry-picked for (Ref src : commits) { @@ -156,12 +155,12 @@ public class CherryPickCommand extends GitCommand { merger.setBase(srcParent.getTree()); merger.setCommitNames(new String[] { "BASE", ourName, cherryPickName }); - if (merger.merge(headCommit, srcCommit)) { - if (AnyObjectId.equals(headCommit.getTree().getId(), merger + if (merger.merge(newHead, srcCommit)) { + if (AnyObjectId.equals(newHead.getTree().getId(), merger .getResultTreeId())) continue; DirCacheCheckout dco = new DirCacheCheckout(repo, - headCommit.getTree(), repo.lockDirCache(), + newHead.getTree(), repo.lockDirCache(), merger.getResultTreeId()); dco.setFailOnConflict(true); dco.checkout(); From 781b0b5735f8be2db2a2d4072a17ed7fdeeab36e Mon Sep 17 00:00:00 2001 From: Hiroshi Tomita Date: Fri, 5 Jul 2013 09:04:00 +0900 Subject: [PATCH 10/15] Check parentFile is not null parentFile becomes null when f is relative path, such as ".". This patch avoids NullPointerException in such case. Change-Id: I4752674b1daab6eedd7c3650c7749462810eaffd Signed-off-by: Hiroshi Tomita --- .../src/org/eclipse/jgit/dircache/DirCacheCheckout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 6fb56ed1b..684cf21ae 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -475,7 +475,7 @@ public class DirCacheCheckout { private void removeEmptyParents(File f) { File parentFile = f.getParentFile(); - while (!parentFile.equals(repo.getWorkTree())) { + while (parentFile != null && !parentFile.equals(repo.getWorkTree())) { if (!parentFile.delete()) break; parentFile = parentFile.getParentFile(); From c222b1880861e80898befff17ee3cf0d5414521e Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Mon, 8 Jul 2013 10:48:45 +0200 Subject: [PATCH 11/15] Refactor PathSuffixFilterTest to remove duplication Makes it possible to add new test cases without copying lots of lines. Change-Id: I66db3bc0cbd18fb5a07748905c60384b86b1c162 Signed-off-by: Robin Stocker --- .../treewalk/filter/PathSuffixFilterTest.java | 92 +++++++------------ 1 file changed, 31 insertions(+), 61 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java index 6c3b62a62..3ec159198 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009, Google Inc. + * Copyright (C) 2009, 2013 Google Inc. * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -43,11 +43,11 @@ package org.eclipse.jgit.treewalk.filter; -import static org.eclipse.jgit.lib.Constants.OBJ_BLOB; import static org.junit.Assert.assertEquals; import java.io.IOException; -import java.util.LinkedList; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.eclipse.jgit.dircache.DirCache; @@ -64,84 +64,54 @@ public class PathSuffixFilterTest extends RepositoryTestCase { @Test public void testNonRecursiveFiltering() throws IOException { - final ObjectInserter odi = db.newObjectInserter(); - final ObjectId aSth = odi.insert(OBJ_BLOB, "a.sth".getBytes()); - final ObjectId aTxt = odi.insert(OBJ_BLOB, "a.txt".getBytes()); - final DirCache dc = db.readDirCache(); - final DirCacheBuilder builder = dc.builder(); - final DirCacheEntry aSthEntry = new DirCacheEntry("a.sth"); - aSthEntry.setFileMode(FileMode.REGULAR_FILE); - aSthEntry.setObjectId(aSth); - final DirCacheEntry aTxtEntry = new DirCacheEntry("a.txt"); - aTxtEntry.setFileMode(FileMode.REGULAR_FILE); - aTxtEntry.setObjectId(aTxt); - builder.add(aSthEntry); - builder.add(aTxtEntry); - builder.finish(); - final ObjectId treeId = dc.writeTree(odi); - odi.flush(); + ObjectId treeId = createTree("a.sth", "a.txt"); + List paths = getMatchingPaths(".txt", treeId); + List expected = Arrays.asList("a.txt"); - final TreeWalk tw = new TreeWalk(db); - tw.setFilter(PathSuffixFilter.create(".txt")); - tw.addTree(treeId); + assertEquals(expected, paths); + } - List paths = new LinkedList(); - while (tw.next()) { - paths.add(tw.getPathString()); - } + @Test + public void testRecursiveFiltering() throws IOException { + ObjectId treeId = createTree("a.sth", "a.txt", "sub/b.sth", "sub/b.txt"); - List expected = new LinkedList(); - expected.add("a.txt"); + List paths = getMatchingPaths(".txt", treeId, true); + List expected = Arrays.asList("a.txt", "sub/b.txt"); assertEquals(expected, paths); } - @Test - public void testRecursiveFiltering() throws IOException { + private ObjectId createTree(String... paths) throws IOException { final ObjectInserter odi = db.newObjectInserter(); - final ObjectId aSth = odi.insert(OBJ_BLOB, "a.sth".getBytes()); - final ObjectId aTxt = odi.insert(OBJ_BLOB, "a.txt".getBytes()); - final ObjectId bSth = odi.insert(OBJ_BLOB, "b.sth".getBytes()); - final ObjectId bTxt = odi.insert(OBJ_BLOB, "b.txt".getBytes()); final DirCache dc = db.readDirCache(); final DirCacheBuilder builder = dc.builder(); - final DirCacheEntry aSthEntry = new DirCacheEntry("a.sth"); - aSthEntry.setFileMode(FileMode.REGULAR_FILE); - aSthEntry.setObjectId(aSth); - final DirCacheEntry aTxtEntry = new DirCacheEntry("a.txt"); - aTxtEntry.setFileMode(FileMode.REGULAR_FILE); - aTxtEntry.setObjectId(aTxt); - builder.add(aSthEntry); - builder.add(aTxtEntry); - final DirCacheEntry bSthEntry = new DirCacheEntry("sub/b.sth"); - bSthEntry.setFileMode(FileMode.REGULAR_FILE); - bSthEntry.setObjectId(bSth); - final DirCacheEntry bTxtEntry = new DirCacheEntry("sub/b.txt"); - bTxtEntry.setFileMode(FileMode.REGULAR_FILE); - bTxtEntry.setObjectId(bTxt); - builder.add(bSthEntry); - builder.add(bTxtEntry); + for (String path : paths) { + DirCacheEntry entry = createEntry(path, FileMode.REGULAR_FILE); + builder.add(entry); + } builder.finish(); final ObjectId treeId = dc.writeTree(odi); odi.flush(); + return treeId; + } + private List getMatchingPaths(String suffixFilter, + final ObjectId treeId) throws IOException { + return getMatchingPaths(suffixFilter, treeId, false); + } + private List getMatchingPaths(String suffixFilter, + final ObjectId treeId, boolean recursiveWalk) throws IOException { final TreeWalk tw = new TreeWalk(db); - tw.setRecursive(true); - tw.setFilter(PathSuffixFilter.create(".txt")); + tw.setFilter(PathSuffixFilter.create(suffixFilter)); + tw.setRecursive(recursiveWalk); tw.addTree(treeId); - List paths = new LinkedList(); - while (tw.next()) { + List paths = new ArrayList(); + while (tw.next()) paths.add(tw.getPathString()); - } - - List expected = new LinkedList(); - expected.add("a.txt"); - expected.add("sub/b.txt"); - - assertEquals(expected, paths); + return paths; } } From c128100800edf6d2cf9c3106a8dc97b04b96f099 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Mon, 8 Jul 2013 10:51:52 +0200 Subject: [PATCH 12/15] Fix bugs in TreeWalk#isPathSuffix used by PathSuffixFilter * It didn't check the first character in the pattern due to a off-by-one error. Spotted by James Roper. * It returned true even when pattern was longer than current path, e.g. it returned that ".txt" is suffix of "txt". Bug: 411999 Change-Id: I9fbcd68a11fb57cc49956b70c387a47271a0424f Signed-off-by: Robin Stocker --- .../jgit/treewalk/filter/PathSuffixFilterTest.java | 10 ++++++++++ .../src/org/eclipse/jgit/treewalk/TreeWalk.java | 10 +++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java index 3ec159198..d871c5ec1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java @@ -82,6 +82,16 @@ public class PathSuffixFilterTest extends RepositoryTestCase { assertEquals(expected, paths); } + @Test + public void testEdgeCases() throws IOException { + ObjectId treeId = createTree("abc", "abcd", "bcd", "c"); + assertEquals(new ArrayList(), getMatchingPaths("xbcd", treeId)); + assertEquals(new ArrayList(), getMatchingPaths("abcx", treeId)); + assertEquals(Arrays.asList("abcd"), getMatchingPaths("abcd", treeId)); + assertEquals(Arrays.asList("abcd", "bcd"), getMatchingPaths("bcd", treeId)); + assertEquals(Arrays.asList("abc", "c"), getMatchingPaths("c", treeId)); + } + private ObjectId createTree(String... paths) throws IOException { final ObjectInserter odi = db.newObjectInserter(); final DirCache dc = db.readDirCache(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java index 627df927b..90850eafd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java @@ -835,13 +835,17 @@ public class TreeWalk { final AbstractTreeIterator t = currentHead; final byte[] c = t.path; final int cLen = t.pathLen; - int ci; - for (ci = 1; ci < cLen && ci < pLen; ci++) { - if (c[cLen-ci] != p[pLen-ci]) + for (int i = 1; i <= pLen; i++) { + // Pattern longer than current path + if (i > cLen) + return false; + // Current path doesn't match pattern + if (c[cLen - i] != p[pLen - i]) return false; } + // Whole pattern tested -> matches return true; } From ab4ade41c401c2030e78cd92e7c7ee2e2d2f0696 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 5 Jul 2013 00:06:05 +0200 Subject: [PATCH 13/15] Update to Jetty 7.6.11.v20130520 Change-Id: I76d32444c9cf9f086a013e410a88d37a359272fd Signed-off-by: Matthias Sohn --- .../org.eclipse.jgit.target.target | 34 +++++++++---------- pom.xml | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target index 11e651dba..3a19cca24 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/org.eclipse.jgit.target.target @@ -11,23 +11,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index af90298a0..f71b5d117 100644 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,7 @@ 2.0.12 1.4.1 2.5 - 7.6.0.v20120127 + 7.6.11.v20130520 2.4 From bd57789735b6f80378db7284470f867e04cbd2b4 Mon Sep 17 00:00:00 2001 From: Christian Halstrick Date: Mon, 9 Jan 2012 16:15:12 +0100 Subject: [PATCH 14/15] Make sure checkout is not deleting folders outside the workingtree There was a chance that jgit deletes symbolic links which point to the folder on top of the working tree. Make sure not to touch these resources. Thanks to Cedric Darloy who reported this bug on http://www.eclipse.org/forums/index.php/m/776910/#msg_776910 and to Ondrej Vrabec who reported bug 412489. Bug: 412489 Change-Id: I81735ba0394ef6794e9b2b8bdd8bd7e8b9c6460f Signed-off-by: Christian Halstrick Signed-off-by: Robin Stocker --- .../src/org/eclipse/jgit/dircache/DirCacheCheckout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 684cf21ae..5458426b1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -417,7 +417,7 @@ public class DirCacheCheckout { builder.finish(); File file = null; - String last = ""; //$NON-NLS-1$ + String last = null; // when deleting files process them in the opposite order as they have // been reported. This ensures the files are deleted before we delete // their parent folders @@ -433,7 +433,7 @@ public class DirCacheCheckout { if (!file.isDirectory()) toBeDeleted.add(r); } else { - if (!isSamePrefix(r, last)) + if (last != null && !isSamePrefix(r, last)) removeEmptyParents(new File(repo.getWorkTree(), last)); last = r; } From 99d981ce35d66b89cdd5d539513bf0ec070b7b34 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Mon, 6 May 2013 01:39:25 +0200 Subject: [PATCH 15/15] Update reflog like C Git during rebase (non-interactive) Bug: 346350 Change-Id: I119766a00bc52a810c51cffaa19207cb8555ca22 Signed-off-by: Chris Aniszczyk --- .../jgit/junit/RepositoryTestCase.java | 1 + .../eclipse/jgit/api/RebaseCommandTest.java | 92 ++++++++++++++++++- .../eclipse/jgit/api/CherryPickCommand.java | 22 ++++- .../org/eclipse/jgit/api/RebaseCommand.java | 31 +++++-- 4 files changed, 131 insertions(+), 15 deletions(-) diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index 397fb6151..1f1962a7b 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -415,6 +415,7 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { walk.release(); // update the HEAD RefUpdate refUpdate = db.updateRef(Constants.HEAD); + refUpdate.setRefLogMessage("checkout: moving to " + branchName, false); refUpdate.link(branchName); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java index 9aa13caf9..ef5a1eaa0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java @@ -74,6 +74,7 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.RefUpdate; +import org.eclipse.jgit.lib.ReflogEntry; import org.eclipse.jgit.lib.RepositoryState; import org.eclipse.jgit.merge.MergeStrategy; import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason; @@ -107,6 +108,8 @@ public class RebaseCommandTest extends RepositoryTestCase { // update the HEAD RefUpdate refUpdate = db.updateRef(Constants.HEAD, true); refUpdate.setNewObjectId(commit); + refUpdate.setRefLogMessage("checkout: moving to " + head.getName(), + false); refUpdate.forceUpdate(); } @@ -123,7 +126,7 @@ public class RebaseCommandTest extends RepositoryTestCase { // create file2 on master File file2 = writeTrashFile("file2", "file2"); git.add().addFilepattern("file2").call(); - git.commit().setMessage("Add file2").call(); + RevCommit second = git.commit().setMessage("Add file2").call(); assertTrue(new File(db.getWorkTree(), "file2").exists()); checkoutBranch("refs/heads/topic"); @@ -133,6 +136,22 @@ public class RebaseCommandTest extends RepositoryTestCase { assertTrue(new File(db.getWorkTree(), "file2").exists()); checkFile(file2, "file2"); assertEquals(Status.FAST_FORWARD, res.getStatus()); + + List headLog = db.getReflogReader(Constants.HEAD) + .getReverseEntries(); + List topicLog = db.getReflogReader("refs/heads/topic") + .getReverseEntries(); + List masterLog = db.getReflogReader("refs/heads/master") + .getReverseEntries(); + assertEquals("rebase finished: returning to refs/heads/topic", headLog + .get(0).getComment()); + assertEquals("checkout: moving from topic to " + second.getName(), + headLog.get(1).getComment()); + assertEquals(2, masterLog.size()); + assertEquals(2, topicLog.size()); + assertEquals( + "rebase finished: refs/heads/topic onto " + second.getName(), + topicLog.get(0).getComment()); } @Test @@ -153,7 +172,8 @@ public class RebaseCommandTest extends RepositoryTestCase { // write a second commit writeTrashFile("file2", "file2 new content"); git.add().addFilepattern("file2").call(); - git.commit().setMessage("Change content of file2").call(); + RevCommit second = git.commit().setMessage("Change content of file2") + .call(); checkoutBranch("refs/heads/topic"); assertFalse(new File(db.getWorkTree(), "file2").exists()); @@ -162,6 +182,22 @@ public class RebaseCommandTest extends RepositoryTestCase { assertTrue(new File(db.getWorkTree(), "file2").exists()); checkFile(file2, "file2 new content"); assertEquals(Status.FAST_FORWARD, res.getStatus()); + + List headLog = db.getReflogReader(Constants.HEAD) + .getReverseEntries(); + List topicLog = db.getReflogReader("refs/heads/topic") + .getReverseEntries(); + List masterLog = db.getReflogReader("refs/heads/master") + .getReverseEntries(); + assertEquals("rebase finished: returning to refs/heads/topic", headLog + .get(0).getComment()); + assertEquals("checkout: moving from topic to " + second.getName(), + headLog.get(1).getComment()); + assertEquals(3, masterLog.size()); + assertEquals(2, topicLog.size()); + assertEquals( + "rebase finished: refs/heads/topic onto " + second.getName(), + topicLog.get(0).getComment()); } /** @@ -242,6 +278,29 @@ public class RebaseCommandTest extends RepositoryTestCase { assertDerivedFrom(rw.next(), c); assertEquals(b, rw.next()); assertEquals(a, rw.next()); + + List headLog = db.getReflogReader(Constants.HEAD) + .getReverseEntries(); + List sideLog = db.getReflogReader("refs/heads/side") + .getReverseEntries(); + List topicLog = db.getReflogReader("refs/heads/topic") + .getReverseEntries(); + List masterLog = db.getReflogReader("refs/heads/master") + .getReverseEntries(); + assertEquals("rebase finished: returning to refs/heads/topic", headLog + .get(0).getComment()); + assertEquals("rebase: update file2 on side", headLog.get(1) + .getComment()); + assertEquals("rebase: Add file2", headLog.get(2).getComment()); + assertEquals("rebase: update file3 on topic", headLog.get(3) + .getComment()); + assertEquals("checkout: moving from topic to " + b.getName(), headLog + .get(4).getComment()); + assertEquals(2, masterLog.size()); + assertEquals(2, sideLog.size()); + assertEquals(5, topicLog.size()); + assertEquals("rebase finished: refs/heads/topic onto " + b.getName(), + topicLog.get(0).getComment()); } static void assertDerivedFrom(RevCommit derived, RevCommit original) { @@ -261,6 +320,11 @@ public class RebaseCommandTest extends RepositoryTestCase { RebaseResult result = git.rebase().setUpstream(parent).call(); assertEquals(Status.UP_TO_DATE, result.getStatus()); + + assertEquals(2, db.getReflogReader(Constants.HEAD).getReverseEntries() + .size()); + assertEquals(2, db.getReflogReader("refs/heads/master") + .getReverseEntries().size()); } @Test @@ -274,6 +338,11 @@ public class RebaseCommandTest extends RepositoryTestCase { RebaseResult res = git.rebase().setUpstream(first).call(); assertEquals(Status.UP_TO_DATE, res.getStatus()); + + assertEquals(1, db.getReflogReader(Constants.HEAD).getReverseEntries() + .size()); + assertEquals(1, db.getReflogReader("refs/heads/master") + .getReverseEntries().size()); } @Test @@ -328,6 +397,18 @@ public class RebaseCommandTest extends RepositoryTestCase { assertEquals(lastMasterChange, new RevWalk(db).parseCommit( db.resolve(Constants.HEAD)).getParent(0)); assertEquals(origHead, db.readOrigHead()); + List headLog = db.getReflogReader(Constants.HEAD) + .getReverseEntries(); + List topicLog = db.getReflogReader("refs/heads/topic") + .getReverseEntries(); + List masterLog = db.getReflogReader("refs/heads/master") + .getReverseEntries(); + assertEquals(2, masterLog.size()); + assertEquals(3, topicLog.size()); + assertEquals("rebase finished: refs/heads/topic onto " + + lastMasterChange.getName(), topicLog.get(0).getComment()); + assertEquals("rebase finished: returning to refs/heads/topic", headLog + .get(0).getComment()); } @Test @@ -366,6 +447,13 @@ public class RebaseCommandTest extends RepositoryTestCase { assertEquals(lastMasterChange, new RevWalk(db).parseCommit( db.resolve(Constants.HEAD)).getParent(0)); + List headLog = db.getReflogReader(Constants.HEAD) + .getReverseEntries(); + assertEquals(8, headLog.size()); + assertEquals("rebase: change file1 in topic", headLog.get(0) + .getComment()); + assertEquals("checkout: moving from " + topicCommit.getName() + " to " + + lastMasterChange.getName(), headLog.get(1).getComment()); } @Test diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java index 2ebff14f9..1b8441170 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java @@ -82,6 +82,8 @@ import org.eclipse.jgit.treewalk.FileTreeIterator; * >Git documentation about cherry-pick */ public class CherryPickCommand extends GitCommand { + private String reflogPrefix = "cherry-pick:"; //$NON-NLS-1$ + private List commits = new LinkedList(); private String ourCommitName = null; @@ -166,9 +168,8 @@ public class CherryPickCommand extends GitCommand { dco.checkout(); newHead = new Git(getRepository()).commit() .setMessage(srcCommit.getFullMessage()) - .setReflogComment( - "cherry-pick: " //$NON-NLS-1$ - + srcCommit.getShortMessage()) + .setReflogComment(reflogPrefix + " " //$NON-NLS-1$ + + srcCommit.getShortMessage()) .setAuthor(srcCommit.getAuthorIdent()).call(); cherryPickedRefs.add(src); } else { @@ -242,6 +243,21 @@ public class CherryPickCommand extends GitCommand { return this; } + /** + * Set the prefix to use in the reflog. + *

+ * This is primarily needed for implementing rebase in terms of + * cherry-picking + * + * @param prefix + * including ":" + * @return {@code this} + */ + public CherryPickCommand setReflogPrefix(final String prefix) { + this.reflogPrefix = prefix; + return this; + } + private String calculateOurName(Ref headRef) { if (ourCommitName != null) return ourCommitName; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java index 911a4e629..592a01287 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -319,7 +319,8 @@ public class RebaseCommand extends GitCommand { String ourCommitName = getOurCommitName(); CherryPickResult cherryPickResult = new Git(repo) .cherryPick().include(commitToPick) - .setOurCommitName(ourCommitName).call(); + .setOurCommitName(ourCommitName) + .setReflogPrefix("rebase:").call(); //$NON-NLS-1$ switch (cherryPickResult.getStatus()) { case FAILED: if (operation == Operation.BEGIN) @@ -353,7 +354,7 @@ public class RebaseCommand extends GitCommand { } if (newHead != null) { String headName = rebaseState.readFile(HEAD_NAME); - updateHead(headName, newHead); + updateHead(headName, newHead, upstreamCommit); FileUtils.delete(rebaseState.getDir(), FileUtils.RECURSIVE); if (lastStepWasForward) return RebaseResult.FAST_FORWARD_RESULT; @@ -370,18 +371,20 @@ public class RebaseCommand extends GitCommand { private String getOurCommitName() { // If onto is different from upstream, this should say "onto", but // RebaseCommand doesn't support a different "onto" at the moment. - String ourCommitName = "Upstream, based on " + String ourCommitName = "Upstream, based on " //$NON-NLS-1$ + Repository.shortenRefName(upstreamCommitName); return ourCommitName; } - private void updateHead(String headName, RevCommit newHead) + private void updateHead(String headName, RevCommit newHead, RevCommit onto) throws IOException { // point the previous head (if any) to the new commit if (headName.startsWith(Constants.R_REFS)) { RefUpdate rup = repo.updateRef(headName); rup.setNewObjectId(newHead); + rup.setRefLogMessage("rebase finished: " + headName + " onto " //$NON-NLS-1$ + + onto.getName(), false); Result res = rup.forceUpdate(); switch (res) { case FAST_FORWARD: @@ -392,6 +395,8 @@ public class RebaseCommand extends GitCommand { throw new JGitInternalException("Updating HEAD failed"); } rup = repo.updateRef(Constants.HEAD); + rup.setRefLogMessage("rebase finished: returning to " + headName, //$NON-NLS-1$ + false); res = rup.link(headName); switch (res) { case FAST_FORWARD: @@ -614,7 +619,7 @@ public class RebaseCommand extends GitCommand { if (head.isSymbolic()) headName = head.getTarget().getName(); else - headName = "detached HEAD"; + headName = head.getObjectId().getName(); ObjectId headId = head.getObjectId(); if (headId == null) throw new RefNotFoundException(MessageFormat.format( @@ -629,10 +634,10 @@ public class RebaseCommand extends GitCommand { monitor.beginTask(MessageFormat.format( JGitText.get().resettingHead, upstreamCommit.getShortMessage()), ProgressMonitor.UNKNOWN); - checkoutCommit(upstreamCommit); + checkoutCommit(headName, upstreamCommit); monitor.endTask(); - updateHead(headName, upstreamCommit); + updateHead(headName, upstreamCommit, upstream); return RebaseResult.FAST_FORWARD_RESULT; } @@ -691,7 +696,7 @@ public class RebaseCommand extends GitCommand { upstreamCommit.getShortMessage()), ProgressMonitor.UNKNOWN); boolean checkoutOk = false; try { - checkoutOk = checkoutCommit(upstreamCommit); + checkoutOk = checkoutCommit(headName, upstreamCommit); } finally { if (!checkoutOk) FileUtils.delete(rebaseState.getDir(), FileUtils.RECURSIVE); @@ -732,7 +737,7 @@ public class RebaseCommand extends GitCommand { if (head.isSymbolic()) headName = head.getTarget().getName(); else - headName = "detached HEAD"; + headName = head.getObjectId().getName(); return tryFastForward(headName, headCommit, newCommit); } @@ -843,6 +848,7 @@ public class RebaseCommand extends GitCommand { // update the HEAD RefUpdate refUpdate = repo.updateRef(Constants.HEAD, false); + refUpdate.setRefLogMessage("rebase: aborting", false); //$NON-NLS-1$ Result res = refUpdate.link(headName); switch (res) { case FAST_FORWARD: @@ -864,7 +870,8 @@ public class RebaseCommand extends GitCommand { } } - private boolean checkoutCommit(RevCommit commit) throws IOException, + private boolean checkoutCommit(String headName, RevCommit commit) + throws IOException, CheckoutConflictException { try { RevCommit head = walk.parseCommit(repo.resolve(Constants.HEAD)); @@ -880,6 +887,10 @@ public class RebaseCommand extends GitCommand { RefUpdate refUpdate = repo.updateRef(Constants.HEAD, true); refUpdate.setExpectedOldObjectId(head); refUpdate.setNewObjectId(commit); + refUpdate.setRefLogMessage( + "checkout: moving from " //$NON-NLS-1$ + + Repository.shortenRefName(headName) + + " to " + commit.getName(), false); //$NON-NLS-1$ Result res = refUpdate.forceUpdate(); switch (res) { case FAST_FORWARD: