You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@allura.apache.org by Rohan Verma <ro...@gmail.com> on 2016/07/07 12:22:44 UTC

[allura:tickets] #8095 Search for files in ForgeGit



---

** [tickets:#8095] Search for files in ForgeGit**

**Status:** open
**Milestone:** unreleased
**Created:** Thu Jul 07, 2016 12:22 PM UTC by Rohan Verma
**Last Updated:** Thu Jul 07, 2016 12:22 PM UTC
**Owner:** Rohan Verma
**Attachments:**

- [patch](https://forge-allura.apache.org/p/allura/tickets/8095/attachment/patch) (1.1 kB; application/octet-stream)


https://github.com/blog/793-introducing-the-file-finder

I have currently started to implement this by searching for blobs in the root tree with matching file names. This can be extended by searching the child trees to a certain depth to find the file.  This is in the patch attached below. 

So yesterday, I was looking to further implement this patch on the internet and was able to read the documentation of git python to use the git ls-files command and found this http://gitpython.readthedocs.io/en/stable/reference.html#git.cmd.Git

But i'm not sure if this is the way to go about it.

Also, I'm thinking that we should just expose this function via REST and use JS to display the search results instead on demand.

Would like to know suggestions on how to further go about this.



---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] #8095 Search for files in ForgeGit

Posted by Dave Brondsema <da...@brondsema.net>.
In general we have been slowly working to use repo commands directly (like git ls-files) and implement each variation (git, hg, svn) rather than relying indexing of data into mongo (like the blob objects).  Some simple caching in mongo might still be necessary though.  More info at https://forge-allura.apache.org/p/allura/wiki/Goals/#make-githgsvn-repositories-indexless

But since the blob data is already there, that is of course is going to be a lot easier than implementing direct access (like git python `ls-files` command, and svn and hg too).  So I would suggestion adding an `all_files` method to `RepositoryImplementation` which uses the blobs for now.  And then later if we want to change it we can just change the `all_files` implementation (and not have to modify the file search code)

Doing it via REST and JS makes a lot of sense to me.  Instead of doing the search on the server, what if the rest api returned all the files in the repo, and the JS filtered through them?  Then the JS would be able to show partial matches and autocomplete and things like that if we wanted.


---

** [tickets:#8095] Search for files in ForgeGit**

**Status:** open
**Milestone:** unreleased
**Created:** Thu Jul 07, 2016 12:22 PM UTC by Rohan Verma
**Last Updated:** Thu Jul 07, 2016 12:24 PM UTC
**Owner:** Rohan Verma
**Attachments:**

- [patch](https://forge-allura.apache.org/p/allura/tickets/8095/attachment/patch) (1.1 kB; application/octet-stream)


https://github.com/blog/793-introducing-the-file-finder

I have currently started to implement this by searching for blobs in the root tree with matching file names. This can be extended by searching the child trees to a certain depth to find the file.  This is in the patch attached below. 

So yesterday, I was looking to further implement this patch on the internet and was able to read the documentation of git python to use the git ls-files command and found this http://gitpython.readthedocs.io/en/stable/reference.html#git.cmd.Git

But i'm not sure if this is the way to go about it since this will be limited to git repositories and I guess the previous method will be useful for all SCM repos.

Also, I'm thinking that we should just expose this function via REST and use JS to display the search results instead on demand.

Would like to know suggestions on how to further go about this.



---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] #8095 Search for files in ForgeGit

Posted by Rohan Verma <ro...@gmail.com>.
- Description has changed:

Diff:

~~~~

--- old
+++ new
@@ -4,7 +4,7 @@
 
 So yesterday, I was looking to further implement this patch on the internet and was able to read the documentation of git python to use the git ls-files command and found this http://gitpython.readthedocs.io/en/stable/reference.html#git.cmd.Git
 
-But i'm not sure if this is the way to go about it.
+But i'm not sure if this is the way to go about it since this will be limited to git repositories and I guess the previous method will be useful for all SCM repos.
 
 Also, I'm thinking that we should just expose this function via REST and use JS to display the search results instead on demand.
 

~~~~

- **Component**: General --> SCM



---

** [tickets:#8095] Search for files in ForgeGit**

**Status:** open
**Milestone:** unreleased
**Created:** Thu Jul 07, 2016 12:22 PM UTC by Rohan Verma
**Last Updated:** Thu Jul 07, 2016 12:22 PM UTC
**Owner:** Rohan Verma
**Attachments:**

- [patch](https://forge-allura.apache.org/p/allura/tickets/8095/attachment/patch) (1.1 kB; application/octet-stream)


https://github.com/blog/793-introducing-the-file-finder

I have currently started to implement this by searching for blobs in the root tree with matching file names. This can be extended by searching the child trees to a certain depth to find the file.  This is in the patch attached below. 

So yesterday, I was looking to further implement this patch on the internet and was able to read the documentation of git python to use the git ls-files command and found this http://gitpython.readthedocs.io/en/stable/reference.html#git.cmd.Git

But i'm not sure if this is the way to go about it since this will be limited to git repositories and I guess the previous method will be useful for all SCM repos.

Also, I'm thinking that we should just expose this function via REST and use JS to display the search results instead on demand.

Would like to know suggestions on how to further go about this.



---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.