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: | on OS X, IDE does not add or commit files beginning with a dot to version control | ||
---|---|---|---|
Product: | platform | Reporter: | athompson <athompson> |
Component: | Filesystems | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | athompson, issues, mmirilovic, ovrabec, shadyyx, vkvashin, vv159170 |
Priority: | P1 | Keywords: | 8.0.1_WAIVER_APPROVED |
Version: | 8.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Proposed Patch |
Description
athompson
2014-08-18 16:09:40 UTC
hmm, you're right, files such as .bowerrc, .jshintrc and other .* files are not added/committed to a repo. That's because they are by default marked as NOT_SHARABLE (excluded from version control) by the GlobalSharabilityQueryImpl. It's behavior is really strange and should be reviewed. > It's behavior is really strange and should be reviewed.
OK. Thank you, Ondra, for evaluation.
As a workaround, please add file names beginning with dots that you use in your projects to Ignored Files Pattern:
Main menu -> Tools -> Options -> Miscellaneous -> Files -> Ignored Files Pattern
For example, the string can look like this (bowerrc and jshintrc were added to the default value):
^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!(htaccess|git.+|hgignore|bowerrc|jshintrc)$).*$
Note that the IDE should be restarted after this change of the pattern.
Thank you for reporting.
Ok, we will not fix it for 8.0.1 (too late), let's target it for one of the patches or 8.1 bump... Already fixed, see bug 248464. > That's because they are by default marked as NOT_SHARABLE (excluded from > version control) by the GlobalSharabilityQueryImpl. It's behavior is really > strange and should be reviewed. Not ignoring hidden files would be a significant change. Let's use the current fix. If more similar problems appear, we should try to find some general solution. *** This bug has been marked as a duplicate of bug 248464 *** Sorry, but there are two major reasons why this bug should not be marked as a duplicate of issue #248464. First, the pedantic reason: while you can argue that the fix for 248464 also fixes this issue, this issue is clearly not a duplicate of that one. Second, the fix for 248464 does not actually fix this issue. The scope for 248464 is limited to making items that the IDE knows about and can handle visible--not all items that belong in source control. I'm not sure when this issue was downgraded to a P2, but it should be a P1. Not only is there a clear risk of data loss, but the data is by definition important enough to be placed in version control. Even worse, it may not be readily apparent that the data has been lost until much later, if ever. Created attachment 154652 [details]
Proposed Patch
Your arguments seem valid. We should try to resolve this problem in general.
This bug is quite controversial, it is contrary to bug 67900, which requests invisible files not to be added to version control system. The problem is that times has changed. While it was rare to have hidden files among Java sources, various languages and frameworks that are supported by NetBeans today store some info in hidden files. Thus, default handling of them should be adjusted. Old behavior: - ignore all hidden files (starting with a dot), except for some well-known ones (.htaccess) - the ignored files pattern was: ^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!(htaccess|git.+|hgignore|npmignore|jshintrc|bowerrc|travis\.yml)$).*$ New behavior: - ignore only well-known files (.git, .hg) - the ignored files pattern will be: ^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(git|hg|svn|cache|DS_store)$|^Thumbs.db$ We will now assume that hidden files may be important to users. Probably, the only place where showing hidden files could be disturbing is user's home directory (e.g. in Favorites window), as it usually contains many configuration files and folders with application data. So we've added new option to ignore hidden files in home folder. This option is enabled by default. CCing Vladimir Voskresensky and Vladimir Kvashin. Can you please check whether this change would be risky for CND modules or Oracle Solaris Studio IDE? Do you know about any files that should be ignored by the IDE (and added to default ignored pattern)? Thank you very much. I am OK with the patch, let's please integrate before Beta so any negative feedback can be resolved before 8.1 release. If there are no objections from the cnd team, let's integrate on Monday. Let's integrate and see test results. Thank you. Integrated: http://hg.netbeans.org/core-main/rev/6dfa04cc9975. I've created a wiki page with information about this change: http://wiki.netbeans.org/HiddenFilesInNB81 Integrated into 'main-silver', will be available in build *201507210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6dfa04cc9975 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #246521: Show .dotted files (by default) *** Bug 262258 has been marked as a duplicate of this bug. *** yup |