This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | With IDE open, sometimes .git/MERGE_HEAD missing after CLI git merge | ||
---|---|---|---|
Product: | versioncontrol | Reporter: | Jesse Glick <jglick> |
Component: | Git | Assignee: | Ondrej Vrabec <ovrabec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | everheul, git, markiewb, mmirilovic |
Priority: | P1 | ||
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jesse Glick
2014-03-06 17:54:37 UTC
AFAIK MERGE_HEAD is deleted only when a commit or reset is called from NetBeans and only when that command succeeds. I doubt NB deletes the file while you're working in shell. It might be that CLI git does not even create that file, maybe because a potential read/write conflict when NB is checking for the file's existence (though i doubt it, it sounds like a coincidence with probability closing to zero). And even then it would probably be git's fault.
> Note that not only I am not trying to initiate the merge from the IDE, I am not
> even switching to the IDE’s window or using it in any way; it is apparently
> noticing the changes on disk and doing something in the background which winds
> up deleting MERGE_HEAD.
i will try it several times, but again, i am not aware of any background task deleting the file.
i cannot reproduce, but as you said it does not always happen. I can try and delay calls to code responsible for checking/reading MREGE_HEAD file for later when the repository is currently locked. fixed: core-main #8f67177d2224 Integrated into 'main-silver', will be available in build *201403100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8f67177d2224 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: Issue #242625 - With IDE open, sometimes .git/MERGE_HEAD missing after CLI git merge refresh repository info later when the repository contains index.lock file. Happens also in Product Version: NetBeans IDE 8.0 (Build 201403101706) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb) Which is very bad. I lost hours realize that NB is the cause. I will try a dev build and give you feedback (In reply to markiewb from comment #4) > Happens also in > Product Version: NetBeans IDE 8.0 (Build 201403101706) > Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 > Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 > System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb) > > Which is very bad. I lost hours realize that NB is the cause. > I will try a dev build and give you feedback Reopen. Issue is still present in Dev Build 201403270001 Product Version: NetBeans IDE Dev (Build 201403270001) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb) (In reply to markiewb from comment #5) > Reopen. Issue is still present in Dev Build 201403270001 That's bad. I have no idea how to reproduce, i am not aware of any place we might delete such a file. If you can reproduce, point me to a specific project i can try it with and provide steps to reproduce (what branches you merge etc.) Trying another round, there was still a chance that a locked repository was refreshed (metadata read) and CLI process interrupted by NetBeans. Please let me know if you can reproduce it again. fix: http://hg.netbeans.org/core-main/rev/41ff10528665 Integrated into 'main-silver', will be available in build *201404060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/41ff10528665 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #242625 - With IDE open, sometimes .git/MERGE_HEAD missing after CLI git merge Never start any JGit command while another process is touching the repository. Instead wait for the lock to be released and refresh repository state in NetBeans later. I think i found it. Happens always when you create new file in IDE. fix: http://hg.netbeans.org/core-main/rev/38a75766c601 Integrated into 'main-silver', will be available in build *201406190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/38a75766c601 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #242625 - With IDE open, sometimes .git/MERGE_HEAD missing after CLI git merge Never delete the metadata files when running mere reset -- PATHS command |