oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.34k stars 745 forks source link

Need some clarity about OPENGROK_SCAN_DEPTH and OPENGROK_REMOTE_REPOS #857

Closed AlexandrSergei4 closed 5 years ago

AlexandrSergei4 commented 10 years ago

What actually do OPENGROK_SCAN_DEPTH when using remote repos ? I've used to think, that variable OPENGROK_SCAN_DEPTH influence only on depth of scan source root directory, but if we are using remote repos, how then opengrok will be apply OPENGROK_SCAN_DEPTH ?

tarzanek commented 10 years ago

https://github.com/OpenGrok/OpenGrok/blob/master/OpenGrok#L54

https://github.com/OpenGrok/OpenGrok/blob/master/src/org/opensolaris/opengrok/index/CommandLineOptions.java#L115

we basically scan for repositories (or nested repositories), not deeper than this

tarzanek commented 10 years ago

(so there is no connection with remote repos really, it's just where do we search for repos - e.g.

/1/2/3/4/myrepo.git - won't be found by default depth 3 but /1/2/myrepo.hg - will be found since it sits below level 3 )
AlexandrSergei4 commented 10 years ago

I have remote svn with structure like project1/ ----------/branches ----------/----------/branchfile1 ----------/----------/branchfile2 ----------/----------/branchfile3 ----------/trunk ----------/----------/trunkfile1 ----------/----------/trunkfile2 ----------/----------/trunkfile3 project2/ ----------/branches ----------/----------/branchfile1 ----------/----------/branchfile2 ----------/----------/branchfile3 ----------/trunk ----------/----------/trunkfile1 ----------/----------/trunkfile2 ----------/----------/trunkfile3 project3/ ----------/branches ----------/----------/branchfile1 ----------/----------/branchfile2 ----------/----------/branchfile3 ----------/trunk ----------/----------/trunkfile1 ----------/----------/trunkfile2 ----------/----------/trunkfile3 etc, and on local storage i have working copies of trunks, organized by following structure: srcroot/ ----------/project1/ ----------/----------/.svn/ ----------/----------/trunkfile1 ----------/----------/trunkfile2 ----------/----------/trunkfile3 ----------/project2 ----------/----------/.svn/ ----------/----------/trunkfile1 ----------/----------/trunkfile2 ----------/----------/trunkfile3 ----------/project3 ----------/----------/.svn/ ----------/----------/trunkfile1 ----------/----------/trunkfile2 ----------/----------/trunkfile3 etc So, when i run indexing with default depth and remote repos = on, i get FINER t7625 SubversionHistoryParser$Handler.endElement: Skipping file outside repository: /branches/branchfile1 FINER t7625 SubversionHistoryParser$Handler.endElement: Skipping file outside repository: /branches/branchfile2 FINER t7625 SubversionHistoryParser$Handler.endElement: Skipping file outside repository: /branches/branchfile3 etc Why here is /branches/branchfile3, despite on SRC_ROOT not contains branches at all ?

tarzanek commented 10 years ago

there could be some links in history, anyways that message can be ignored, it just means some link in history log is pointing to a file(branch link) outside of repo unless it breaks history for you - if it does, then it's a bug, can you validate history generated ? (and ideally check index with luke if hist table has all the terms - luke for 0.12.1 is here: https://java.net/projects/opengrok/downloads/download/lukeall-4.7.1.jar )

tulinkry commented 5 years ago

No reactions for years. Env variables are no longer part of our routine. A candidate for closing.