-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle situation where there is a directory or Symbolic link which is a directory in the project source folder. #689
Conversation
… a directory in the project source folder.
shouldn't we fix the accept method instead this workaround? |
there is a
|
oh ... and I guess we need a test case for this (so it won't ever happen) |
+1 Once the test case is added, I'd like to get this into 0.12-rc3. |
Please could someone merge this pull request into the main code base? OpenGrok is pretty much unusable for me without this change. Thanks! |
I think there are the following outstanding problems:
|
@precisemath - the merge failed the build, see above link |
(it's actually below link, this: https://travis-ci.org/OpenGrok/OpenGrok/builds/32809906 ) |
Hey I am not sure why the test failed. Tried analyzing the logs but was not too successful :(. I am withdrawing the pull request until I fully understand why the unit test failed and how to fix it. Would appreciate any pointers if any. |
can you add a test case for YOUR code change?
|
-N option to the indexer works for Symbolic links which are files. When I add the -N option and point to Symbolic links which are directories, it has no effect at all. When I look at the failures in the build (given below). I couldn't figure out how those failures are related to my change. Would appreciate some pointers in this regard: Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.581 sec <<< FAILURE! - in org.opensolaris.opengrok.search.SearchTest testSearch(org.opensolaris.opengrok.search.SearchEngineTest) Time elapsed: 0.286 sec <<< FAILURE! |
let me reopen, in a sense what you want to achieve is to get -N to accept directory symlinks too |
fwiw - I checked the test and it says: SearchTest.testSearch:146 Search for main~ in testdata sources expected:8 but was: 10 SearchEngineTest.testSearch:176 expected:8 but was:11 so your code change basically breaks tests so they now find more results then they should - the Q is whether this is ok, or not |
the link to travis build: https://travis-ci.org/OpenGrok/OpenGrok/builds/35792450 |
I have reviewed and tested the changes.
To be more concise:
Before Change: If the project folder had a symbolic link pointing to a directory, then the directory would not be indexed.
After Change: The directory to which the symbolic link is pointing to will be indexed.
This fixes Issue #469.
Please let me know if any other info is required for you to merge these changes.