Implemented code search feature
Created by: coveralls
Coverage decreased (-47.03%) when pulling 5aef194ae911d075963e791e843ee9415b0a37f0 on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-14T17:20:13 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-41.72%) when pulling 44a3bbbd90a92ff3398aabdc3e6cfc7e52a43092 on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-14T19:37:35 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-37.36%) when pulling a46bb60eca1be62ce20821e27df0ff48550902b5 on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-15T00:52:12 (imported from GitLab project)
Created by: hiroponz
GitLab uses patch version of Grit, so that you should fork from https://github.com/gitlabhq/grit.
By Administrator on 2013-04-15T03:16:13 (imported from GitLab project)
Created by: coveralls
Coverage remained the same when pulling d029f559f35a408ce3b7367a580ce0389f45d218 on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-15T13:03:20 (imported from GitLab project)
Created by: hiroponz
Broken tests by https://github.com/gitlabhq/grit/pull/19. I think that you need to fix grit test before gitlab PR.
By Administrator on 2013-04-15T14:24:59 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-12.24%) when pulling f4107cc3c7d01be8bcf49bc1993ef27caff939fc on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-15T21:27:10 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-12.03%) when pulling 0da5c20537f0af38da747b6f263d08bad033a0fd on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-15T22:20:45 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-0.0%) when pulling 5a37538860e35bfcaef53ee04845b383dd637903 on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-16T03:04:31 (imported from GitLab project)
Created by: coveralls
Coverage increased (+0.04%) when pulling e5601d5d0e89f4e4e49ce57de0d28aba0d9e84db on jacargentina:code-search into 63b78a39 on gitlabhq:master.
By Administrator on 2013-04-17T12:29:43 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-0.14%) when pulling 94e3e80de81bedf4049e1d8a5016185d40e6d33e on jacargentina:code-search into 26befdc7 on gitlabhq:master.
By Administrator on 2013-04-18T00:24:42 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-0.17%) when pulling 2f5dccaec56147e80b18b3234c6460beb9e3e5b0 on jacargentina:code-search into 44d63b4c on gitlabhq:master.
By Administrator on 2013-04-20T22:33:58 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-0.18%) when pulling db31886cfa321c79d9375fa86d711f36a339d6c3 on jacargentina:code-search into 44d63b4c on gitlabhq:master.
By Administrator on 2013-04-25T00:48:09 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-0.17%) when pulling c503709fbe41facebe7f0be30334d958c13c24f3 on jacargentina:code-search into 75fbdc40 on gitlabhq:master.
By Administrator on 2013-04-26T01:14:10 (imported from GitLab project)
Created by: jacargentina
@akzhan @randx @hiroponz
I really, really want this feature on gitlab. Any advice on how to help with getting that done?
Maybe if some of you have a little time to see my code in action, can point me some ideas/details to make it better, etc. I have some spare time to do that, so i can work on this.
Please?
Cheers!
By Administrator on 2013-04-26T01:10:31 (imported from GitLab project)
Created by: hiroponz
@jacargentina I think that the gitlab core members don't have much time to review your PR. There are too many issues and PR to review by them. So I think that you need to wait for a while.
To save thier time, adding detailed description, screenshots and spinach test case about PR are good practices.
Sorry, my English may be confusing.
By Administrator on 2013-04-26T03:59:22 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-0.11%) when pulling bb5297137b38f1af4b1d5b7dcd80a5d3eec638a9 on jacargentina:code-search into 75fbdc40 on gitlabhq:master.
By Administrator on 2013-04-28T19:15:50 (imported from GitLab project)
Created by: coveralls
Coverage decreased (-12.62%) when pulling 2c481fc14e54302f2b4a59b0489a82f3eaae81b7 on jacargentina:code-search into 65b601fe on gitlabhq:master.
By Administrator on 2013-04-29T12:18:34 (imported from GitLab project)
Created by: hiroponz
@jacargentina It looks good, but I think that editing and attaching screenshots to top comment of PR are better. And I have some questions.
- What is searched? I suppose the file names and the file contents.
- Which branch is searched? I suppose the default branch of the project.
- It seems all projects are searched by default. So if there are many projects, it would occur performance problem. Are these right?
By Administrator on 2013-04-30T14:08:32 (imported from GitLab project)
Created by: jacargentina
@hiroponz Sorry, mi first big PR on gitlab, unexperienced on github collaboring best practices.
- and 2. The "current" branch. If u are looking at a given tree, it will look there; else it will look on the project default branch. Basically the search goes through git grep and shows a context (by default 3 lines) for each file matching the grep (u can search regular expressions too!)
- Only the "current" browsed project is searched so far. I mean, if u try to search for code on the dashboard, it will not do any search. So basically there is not any "global repo code search" performance problem.
By Administrator on 2013-04-30T14:16:52 (imported from GitLab project)
Created by: hiroponz
@jacargentina It sounds great! You can edit the top comment of PR by clicking "Edit" button any time. I think that it looks good if previous comments move to top comment of PR.
BTW, can you add some spinach test cases? 95b82607 may be of some help.
By Administrator on 2013-04-30T14:54:04 (imported from GitLab project)
Created by: YenZi
Code search looks good ! But I have some small comment. We have gitlab running in a company context, so I think usage is a bit different to a community way of usage. So, from my perspective, I would like to have issues and wikis searched in the first place. Not so much the code (since I have the repo on my harddrive anyway ;-) ) I am a bit afraid that the code search will slow down the common search, although I am not interested in the code most of the time. Is there a way to explicitly search for code If I want to ? Otherwise only search for issues and wikis ?
By Administrator on 2013-04-30T15:09:45 (imported from GitLab project)
Created by: jacargentina
@hiroponz I've looked at https://github.com/gitlabhq/gitlabhq/commit/95b8260 as you pointed, but i dont understand. Will i need the .feature file with those @javascript marks, or just the .rb file with the spinach tests ? BTW, never did a spinach test, so i think it will take me some time to do it.
@YenZi May be we can add a setting on the project for enabling code search by default on that specific project? I receive any ideas or code for this!
Thanks for the feedback!
By Administrator on 2013-04-30T15:18:59 (imported from GitLab project)
Created by: hiroponz
@jacargentina Both .feature and .rb file need for spinach test.
@javascript
marks only need if javascript needs when rendering pages.Spinach is similar with cucumber. So searching for cucumber may be helpful for you. http://thechangelog.com/spinach-like-cucumber-but-with-more-ruby-less-regex/
By Administrator on 2013-05-03T01:03:47 (imported from GitLab project)
409 409 !(forked_project_link.nil? || forked_project_link.forked_from_project.nil?) 410 410 end 411 411 412 def files(query, treeish) 413 snippets = [] 414 tree = treeish.present? ? treeish : default_branch 415 if repository && !tree.nil? 416 greps = repository.repo.grep(query, 3, tree) Created by: jacargentina
Yes, your changes are very welcome, as i'm not a gitlab expert, i just tried to make it work.
On the gitlab_git gem, it didn't existed when i first approached this patch, as it was born a week ago or so.
By Administrator on 2013-05-09T12:02:14 (imported from GitLab project)