Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367916

Summary: jgit merge does not work on OpenVMS systems
Product: [Technology] JGit Reporter: Jouk Jansen <joukj>
Component: JGitAssignee: Project Inbox <jgit.core-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 CC: matthias.sohn, ruediger.herrmann
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: other   
Whiteboard:

Description Jouk Jansen CLA 2012-01-05 03:21:11 EST
Build Identifier: 1.2.0.201112221803-r

On an OpenVMS 8.4 (IA64) on which JAVA 1.6.0-3.p1 is installed I get the following error when I try the merge command of jgit:

bolero-jj) jgit version
jgit version 1.2.0.201112221803-r
bolero-jj) jgit fetch
remote: Counting objects: 13
remote: Compressing objects: 100% (7/7)
Receiving objects:      100% (7/7)
Resolving deltas:       100% (6/6)
Updating references:    100% (1/1)
remote: Total 7 (delta 6), reused 0 (delta 0)
From git://git.jedsoft.org/git/jed.git
   31f10a9..7a116fe  master     -> origin/master
bolero-jj) jgit merge "origin/master"
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execu
tion of merge command. java.io.IOException: Cannot lock /$disk6/JOUKJ/git/jed/je
d/.git/index
        at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:260)
        at org.eclipse.jgit.pgm.Merge.run(Merge.java:85)
        at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:148)
        at org.eclipse.jgit.pgm.Main.execute(Main.java:191)
        at org.eclipse.jgit.pgm.Main.run(Main.java:120)
        at org.eclipse.jgit.pgm.Main.main(Main.java:94)
Caused by: java.io.IOException: Cannot lock /$disk6/JOUKJ/git/jed/jed/.git/index
        at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:193)
        at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:239)
        at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:873)
        at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:181)
        ... 5 more


Reproducible: Always

Steps to Reproduce:
1.jgit fetch
2.jgit merge "origin/master"
3.
Comment 1 Kevin Sawicki CLA 2012-01-05 15:46:00 EST
Does a index.lock file exist in the /$disk6/JOUKJ/git/jed/jed/.git directory?
Comment 2 Jouk Jansen CLA 2012-01-06 03:39:13 EST
Yes, index does exist

Note that file access on an OpenVMS system is quite different from i.e. linux:
If you open a file, by default it is locked for all other use, except when you explicitly open it as "shared". My guess is that the file is already in use by some other instance of jgit.
Comment 3 Jouk Jansen CLA 2012-01-06 05:22:19 EST
I deleted the index.lock file manually.
After that the merge command worked.

the index.lock file was created when I did the original "clone" of the repository.
Comment 4 Matthias Sohn CLA 2012-06-14 08:31:23 EDT
can we close this bug ?
Comment 5 Jouk Jansen CLA 2012-06-18 03:47:12 EDT
Still the only work-around is deleting the index.lock manually. 
Is this going to be solved?

             Jouk