[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [jgit-dev] JGit checkout of multiple tags fails with "Could not rename file"
- From: "Andrey Loskutov" <loskutov@xxxxxx>
- Date: Fri, 19 Sep 2014 16:57:36 +0200
- Delivered-to: email@example.com
- Importance: normal
- Sensitivity: Normal
I've observed not the same but similar issue during tests on Linux NFS mount, where jgit was not (always) cleaning up the opened temporary pack file streams, see  for more details.
I didn't found the root cause however. I suspect that if you would add some delay between two checkout calls your issue would disappear, because this was what I've observed in debugger.
> Gesendet: Freitag, 19. September 2014 um 16:39 Uhr
> Von: "Sascha Vogt" <sascha.vogt@xxxxxxxxx>
> An: jgit-dev@xxxxxxxxxxx
> Betreff: [jgit-dev] JGit checkout of multiple tags fails with "Could not rename file"
> Hi all,
> since a few days I'm banging my head against a (JGit) wall ;) Maybe
> somebody here understands my issue.
> I'm trying to checkout a few tags one after another (to archive some
> source code), but switching from one tag to another gives a strange
> "Could not rename file" JGitInternalException.
> Basically what I want to do (in cmd line commands):
> 1. git clone <url>
> 2. git checkout -b <tag-1> <tag-1>
> 3. git checkout -b <tag-2> <tag-2>
> On cmd line this works, in JGit I'm using the following commands:
> The error I'm getting (full stack at the end of the mail):
> org.eclipse.jgit.api.errors.JGitInternalException: Could not rename file
> to D:\dev\tmp\unit-test\git\base\common\locator\pom.xml
> Strange thing: It doesn't fail always, but around 90-95% of the time.
> Also I'm on Windows as the path above suggests ;) TortoiseGit is
> installed but I have disabled the TGitCache process. Also no explorer
> was open on the used directory.
> I also did git status commands in between checkouts -> no changed files.
> I did also insert a git.clean().setCleanDirectories(true).call() and
> git.reset().setRef("HEAD").setMode(ResetType.HARD).call() between
> checkouts, no differences.
> I tried JGit 2.3.1, 3.2, 3.4.1 and 3.5.0-rc1, also no differences.
> When I check the state after such a failed checkout of tag-2 I'm seeing:
> "git status":
> HEAD detached at ef1edf8
> nothing to commit, working directory clean
> "git branch" gives:
> * (detached from ef1edf8)
> Has anybody any idea? I've no idea where to search next.