Skip to content
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

Support for local VCS allowing to index local path #156

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

olczykkrzysztof
Copy link

Support for local VCS allowing to index local path not necessarily being a part of the version-controller repository.

Non-copying version of #138.

@olczykkrzysztof olczykkrzysztof changed the title Support for local VCS allowing to index local path not necessarily be… Support for local VCS allowing to index local path Sep 21, 2015
@jklein
Copy link
Member

jklein commented Sep 21, 2015

This looks good to me, thanks. I'll let @kellegous take a look and merge when ready.

@kellegous
Copy link
Member

@gemignani Sorry, I have been really behind on pull requests. I'll take a closer look at this soon. I'll leave some minor comments now. I think the one thing that is missing in the local support is that local vcs really shouldn't poll by default because it introduces the possibility that the repo will be indexed while it is being mutated. However, that's a thing I can easily help out with.

@@ -367,6 +365,13 @@ func newSearcher(
SpecialFiles: wd.SpecialFiles(),
}

var vcsDir string
if (wd.IsLocal()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would better separate concerns if the vcs interface had a function kind of like this:

WorkDirFrom(dbpath string, repo *config.Repo) string

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like in in vcs.Driver?
Then each driver (apart from local) will need to implement basically the same code to get the working dir.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I'm saying that Driver should not have IsLocal. Rather than having the Searcher have special knowledge of what IsLocal means, it would be better to just move the path creation into the driver. That does mean that this new method will have identical implementations for all the existing drivers, but that's also the case with IsLocal.

…ing a part of the version-controller repository.
…rily being a part of the version-controller repository.
@snagytx
Copy link

snagytx commented Apr 3, 2017

Any plans to finish this support?

@olczykkrzysztof
Copy link
Author

@snagytx, I'd love to, but very short time recently. :(

ollyja added a commit to ollyja/hound that referenced this pull request Oct 19, 2018
* Implementation of a simple rsync vcs provider.
ollyja added a commit to ollyja/hound that referenced this pull request Oct 20, 2018
Base automatically changed from master to main February 24, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants