-
Notifications
You must be signed in to change notification settings - Fork 127
gitbase: add support for siva files #224
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
Conversation
cmd/gitbase/server.go
Outdated
cmd | ||
|
||
Git string `short:"g" long:"git" description:"Path where the git repositories are located, one per dir"` | ||
Git string `short:"g" long:"git" description:"Path where the git repositories are located"` | ||
Siva string `long:"siva" description:"PAth where the siva repositories are located"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/PAth/Path/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Add support in RepositoryPool for handling siva files as repositories. Added a new `AddSivaDir` method to `RepositoryPool`, which adds all the siva files inside that directory (a siva file is considered to be any file whose extension is `.siva`) and the direct child directories to allow bucketing. Also some minor changes related to the RepositoryPool: - NewRepositoryFromPath returns now *Repository for convenience. - NewRepositoryPool returns now *RepositoryPool, as it always needs to be used with a pointer. - Fixed golint warning about returning an unexported type in an exported method, which may be annoying by replacing the type with `sql.RowIter`. Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@@ -44,12 +45,12 @@ func (c *cmdServer) buildDatabase() error { | |||
logrus.WithField("dir", c.Git).Debug("added folder containing git repositories") | |||
} | |||
|
|||
var err error | |||
c.pool = gitbase.NewRepositoryPool() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, now you can have mixed repositories on the same execution, standard ones and siva ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I can restrict that if we want to only have one type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's ok, LGTM!
Closes #216
Depends on #223 (will probably rebase and remove the dependency tomorrow)
Add support in RepositoryPool for handling siva files as repositories.
Added a new
AddSivaDir
method toRepositoryPool
, which adds all the siva files inside that directory (a siva file is considered to be any file whose extension is.siva
) and the direct child directories to allow bucketing.Also some minor changes related to the RepositoryPool:
sql.RowIter
.