Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

package org.netbeans.libs.git.jgit.commands;

import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.text.MessageFormat;
import org.eclipse.jgit.lib.Repository;
import org.netbeans.libs.git.GitException;
Expand Down Expand Up @@ -49,17 +46,7 @@ public final void execute () throws GitException {
if (prepareCommand()) {
try {
monitor.started(getCommandDescription());
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
@Override
public Void run () throws GitException {
GitCommand.this.run();
return null;
}
});
} catch (PrivilegedActionException e) {
throw (GitException) e.getException();
}
run();
} catch (RuntimeException ex) {
if (ex.getMessage() != null && ex.getMessage().contains("Unknown repository format")) { //NOI18N
throw new GitException("It seems the config file for repository at [" + repository.getWorkTree() + "] is corrupted.\nEnsure it's valid.", ex); //NOI18N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public class LogCommand extends GitCommand {
private final boolean fetchBranchInfo;
private static final Logger LOG = Logger.getLogger(LogCommand.class.getName());

/// see RevWalk.newFlag(); note: don't trust the doc! check RevWalk.RESERVED_FLAGS
static final int MAX_REVWALK_FLAGS = 23;

public LogCommand (Repository repository, GitClassFactory gitFactory, SearchCriteria criteria,
boolean fetchBranchInfo, ProgressMonitor monitor, RevisionInfoListener listener) {
super(repository, gitFactory, monitor);
Expand Down Expand Up @@ -210,7 +213,7 @@ private void markBranchFlags (Map<String, GitBranch> allBranches, RevWalk walk,
}
} else {
usedFlags.add(flagId);
if (i <= 23) { // leave one spare flag for the run method, see RevWalk.newFlag()
if (i <= MAX_REVWALK_FLAGS - 1) { // leave one spare flag for the run method
i++;
RevFlag flag = walk.newFlag(flagId);
List<GitBranch> branches = new ArrayList<>(allBranches.size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.Date;
import java.util.Map;
import org.eclipse.jgit.api.Git;
Expand Down Expand Up @@ -59,6 +60,15 @@ protected void setUp() throws Exception {
repository = getRepository(getLocalGitRepository());
}

// doc promises 24, but the actual number was observed to be lower since 7.5
// this is a tripwire test to detect changes
public void testMaxApplicationFlagCount() throws Exception {
Field field = RevWalk.class.getDeclaredField("RESERVED_FLAGS");
field.setAccessible(true);
int available = 32 - (int) field.get(null);
assertEquals(LogCommand.MAX_REVWALK_FLAGS, available); // if this fails, adjust the value
}

public void testLogRevision () throws Exception {
File f = new File(workDir, "testcat1");
write(f, "initial content");
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.gpg.bc/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
F1A7C31962EEF791DDA4FF91043DF531F06F5F04 org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.2.1.202505142326-r
FD8967B5C67D63796C4665116AFA85F3D0A4D130 org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.6.0.202603022253-r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: JGit Library
Origin: Eclipse
Version: 7.2.1.202505142326-r
Version: 7.6.0.202603022253-r
Description: Integration library for Git client
License: EDL-1.0-jgit
URL: http://www.eclipse.org/jgit/download/
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.gpg.bc/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

is.autoload=true

release.external/org.eclipse.jgit.gpg.bc-7.2.1.202505142326-r.jar=modules/org-eclipse-jgit-gpg-bc.jar
release.external/org.eclipse.jgit.gpg.bc-7.6.0.202603022253-r.jar=modules/org-eclipse-jgit-gpg-bc.jar
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.gpg.bc/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-eclipse-jgit-gpg-bc.jar</runtime-relative-path>
<binary-origin>external/org.eclipse.jgit.gpg.bc-7.2.1.202505142326-r.jar</binary-origin>
<binary-origin>external/org.eclipse.jgit.gpg.bc-7.6.0.202603022253-r.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.lfs/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
C599E6652B31273A8668982082916E1AC1C5FEC6 org.eclipse.jgit:org.eclipse.jgit.lfs:7.2.1.202505142326-r
EA88518D6722FA4B3A7BBA8FE8233BC2B22B02C9 org.eclipse.jgit:org.eclipse.jgit.lfs:7.6.0.202603022253-r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: JGit Library
Origin: Eclipse
Version: 7.2.1.202505142326-r
Version: 7.6.0.202603022253-r
Description: Integration library for Git client
License: EDL-1.0-jgit
URL: http://www.eclipse.org/jgit/download/
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.lfs/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

is.autoload=true

release.external/org.eclipse.jgit.lfs-7.2.1.202505142326-r.jar=modules/org-eclipse-jgit-lfs.jar
release.external/org.eclipse.jgit.lfs-7.6.0.202603022253-r.jar=modules/org-eclipse-jgit-lfs.jar
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.lfs/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-eclipse-jgit-lfs.jar</runtime-relative-path>
<binary-origin>external/org.eclipse.jgit.lfs-7.2.1.202505142326-r.jar</binary-origin>
<binary-origin>external/org.eclipse.jgit.lfs-7.6.0.202603022253-r.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.ssh.jsch/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
23322F5C4845608DA32006F45F4D1E910C2FE5C5 org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:7.2.1.202505142326-r
14EACE6ABE51838AF11890D54161ADC5D0FE9D1F org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:7.6.0.202603022253-r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: JGit Library
Origin: Eclipse
Version: 7.2.1.202505142326-r
Version: 7.6.0.202603022253-r
Description: Integration library for Git client
License: EDL-1.0-jgit
URL: http://www.eclipse.org/jgit/download/
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.ssh.jsch/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

is.autoload=true

release.external/org.eclipse.jgit.ssh.jsch-7.2.1.202505142326-r.jar=modules/org-eclipse-jgit-ssh-jsch.jar
release.external/org.eclipse.jgit.ssh.jsch-7.6.0.202603022253-r.jar=modules/org-eclipse-jgit-ssh-jsch.jar
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.ssh.jsch/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-eclipse-jgit-ssh-jsch.jar</runtime-relative-path>
<binary-origin>external/org.eclipse.jgit.ssh.jsch-7.2.1.202505142326-r.jar</binary-origin>
<binary-origin>external/org.eclipse.jgit.ssh.jsch-7.6.0.202603022253-r.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
4E1E47B134371A9F7EA17779164EA5110DA1CD4D org.eclipse.jgit:org.eclipse.jgit:7.2.1.202505142326-r
1C6D9F63581D24C9A7D9C50A6DBE6AB6DF13DC0F org.eclipse.jgit:org.eclipse.jgit:7.6.0.202603022253-r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: JGit Library
Origin: Eclipse
Version: 7.2.1.202505142326-r
Version: 7.6.0.202603022253-r
Description: Integration library for Git client
License: EDL-1.0-jgit
URL: http://www.eclipse.org/jgit/download/
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

is.autoload=true

release.external/org.eclipse.jgit-7.2.1.202505142326-r.jar=modules/org-eclipse-jgit.jar
release.external/org.eclipse.jgit-7.6.0.202603022253-r.jar=modules/org-eclipse-jgit.jar
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-eclipse-jgit.jar</runtime-relative-path>
<binary-origin>external/org.eclipse.jgit-7.2.1.202505142326-r.jar</binary-origin>
<binary-origin>external/org.eclipse.jgit-7.6.0.202603022253-r.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ide/db.sql.visualeditor/external/javacc-7.0.10.jar java/performance/external/jav
# bundled maven conflicts with other libraries
java/maven.embedder/external/apache-maven-3.9.14-bin.zip ide/slf4j.api/external/slf4j-api-1.7.36.jar
java/maven.embedder/external/apache-maven-3.9.14-bin.zip platform/libs.asm/external/asm-9.9.jar
java/maven.embedder/external/apache-maven-3.9.14-bin.zip platform/o.apache.commons.codec/external/commons-codec-1.18.0.jar
java/maven.embedder/external/apache-maven-3.9.14-bin.zip platform/o.apache.commons.codec/external/commons-codec-1.21.0.jar
java/maven.embedder/external/apache-maven-3.9.14-bin.zip ide/c.google.guava.failureaccess/external/failureaccess-1.0.3.jar
java/maven.embedder/external/apache-maven-3.9.14-bin.zip ide/c.google.guava/external/guava-33.4.6-jre.jar
java/maven.embedder/external/apache-maven-3.9.14-bin.zip ide/c.google.gson/external/gson-2.13.2.jar
Expand Down
8 changes: 4 additions & 4 deletions platform/o.apache.commons.codec/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
<project name="platform/o.apache.commons.codec" default="build" basedir=".">
<import file="../../nbbuild/templates/projectized.xml"/>
<target name="jar" depends="-define-FileCRC32Calculator">
<FileCRC32Calculator file="external/commons-codec-1.18.0.jar" property="o.apache.commons.codec.crc32" />
<FileCRC32Calculator file="external/commons-codec-1.21.0.jar" property="o.apache.commons.codec.crc32" />
<jar jarfile="${cluster}/${module.jar}">
<zipfileset src="external/commons-codec-1.18.0.jar"/>
<zipfileset src="external/commons-codec-1.21.0.jar"/>
<manifest>
<attribute name="Bundle-SymbolicName" value="org.apache.commons.codec"/>
<attribute name="Bundle-Version" value="1.18.0"/>
<attribute name="Export-Package" value="org.apache.commons.codec;version=&quot;1.18.0.0&quot;,org.apache.commons.codec.binary;version=&quot;1.18.0&quot;,org.apache.commons.codec.digest;version=&quot;1.18.0&quot;,org.apache.commons.codec.language;version=&quot;1.18.0&quot;,org.apache.commons.codec.net;version=&quot;1.18.0&quot;"/>
<attribute name="Bundle-Version" value="1.21.0"/>
<attribute name="Export-Package" value="org.apache.commons.codec;version=&quot;1.21.0.0&quot;,org.apache.commons.codec.binary;version=&quot;1.21.0&quot;,org.apache.commons.codec.digest;version=&quot;1.21.0&quot;,org.apache.commons.codec.language;version=&quot;1.21.0&quot;,org.apache.commons.codec.net;version=&quot;1.21.0&quot;"/>
<attribute name="NB-Original-CRC" value="${o.apache.commons.codec.crc32}"/>
</manifest>
</jar>
Expand Down
2 changes: 1 addition & 1 deletion platform/o.apache.commons.codec/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
EE45D1CF6EC2CC2B809FF04B4DC7AEC858E0DF8F commons-codec:commons-codec:1.18.0
D95F998DB5F89900FE895DAF6CD2CDDCB2F1D64B commons-codec:commons-codec:1.21.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: Apache Commons Codec
Description: General encoding/decoding algorithms (for example phonetic, base64, URL).
Origin: https://commons.apache.org/proper/commons-codec/
Version: 1.18.0
Version: 1.21.0
License: Apache-2.0

Apache License
Expand Down
2 changes: 1 addition & 1 deletion platform/o.apache.commons.codec/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-apache-commons-codec.jar</runtime-relative-path>
<binary-origin>external/commons-codec-1.18.0.jar</binary-origin>
<binary-origin>external/commons-codec-1.21.0.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
Loading