Add support for Mercurial repositories
Review Request #9409 — Created Nov. 29, 2017 and submitted
RB Gateway now supports Mercurial repositories. Setting
scm
tohg
in a repository entry in the configuration file will enable this
behaviour.Co-authored-by: Henri-Philippe Marceau hmarceau@laurentian.ca
Ran
go fmt ./...
.
Rango test ./...
.Configured a Mercurial repository and made HTTP requests to verify
API responses were correct.
Description | From | Last Updated |
---|---|---|
This is a small nitpick but I've looked in a few other files, and I think there should be a … |
RC rcreagha | |
Not sure if this applies to go but this line is longer than 78 characters. |
GR GrahamS | |
I think this import list should be alphabetical. |
RC rcreagha | |
This line is also longer than 78 characters. |
GR GrahamS | |
Should be "On success" rather than "On a success" |
david | |
Shouldn't this be returning false, err? |
david | |
Shouldn't this be returning false, err? |
david | |
This should have documentation. |
david | |
Typo: repsonsible -> responsible |
david | |
Can we say "Mercurial repository" instead of "Hg repository", so it's less of a tautology? |
david |
- Description:
-
Added the
hg
case toLoadConfig
, this allows Hg repos to be definedin the config file. The HgRepository
type has been created and~ currently supports GetName
,GetPath
,GetFile
,GetFileByCommit
&~ GetBranches
. Interactions with Hg repos are done through Mercurial's~ command server through gohg. ~ currently supports GetName
,GetPath
,GetFile
,GetFileByCommit
,~ GetBranches
&GetCommits
. Interactions with Hg repos are done through~ Mercurial's command server through gohg. - Testing Done:
-
httpie
was used to sendGetName
,GetPath
,GetFile
,~ GetFileByCommit
&GetBranches
GET requests requesting information~ from an Hg repo. Each request yielded the expected result. A unit test ~ was also written and can be found in hg_repository_test.go
under~ TestHgGetBranches
.~ GetFileByCommit
,GetBranches
&GetCommits
GET requests requesting~ information from an Hg repo. Each request yielded the expected result. A ~ unit test was also written and can be found in hg_repository_test.go
~ under TestHgGetBranches
. - Commit:
-
6fca13ed1dea43979f295641d071757b6907e33a012ce9cc49d93ddf4400adc03c10265087db2982
Checks run (2 succeeded)
- Summary:
-
[WIP]Adding support for Mercurial repositories to RB-Gateway.Adding support for Mercurial repositories to RB-Gateway.
- Description:
-
~ Added the
hg
case toLoadConfig
, this allows Hg repos to be defined~ in the config file. The HgRepository
type has been created and~ currently supports GetName
,GetPath
,GetFile
,GetFileByCommit
,~ GetBranches
&GetCommits
. Interactions with Hg repos are done through~ Mercurial's command server through gohg. ~ hg_repository.go
, a Mercurial specific implementation ofrepository.go
~ was created. The hg
case was added toLoadConfig
inutil.go
to~ allow Mercurial repositories to be defined in the config file. ~ hg_repository_test.go
was created, it contains unit tests for every~ method implemented in hg_repository.go
. - Testing Done:
-
httpie
was used to sendGetName
,GetPath
,GetFile
,~ GetFileByCommit
,GetBranches
&GetCommits
GET requests requesting~ information from an Hg repo. Each request yielded the expected result. A ~ unit test was also written and can be found in hg_repository_test.go
~ under TestHgGetBranches
.~ GetFileByCommit
,GetBranches
,GetCommits
&GetCommit
requests to~ a tester Hg repo. Each request yielded the expected result. Unit tests ~ were also written and can be found in hg_repository_test.go
. All of the~ test were run and all were passed. Also, Review Board successfully + accessed a Mercurial Repository through RB-Gateway. - Commit:
-
012ce9cc49d93ddf4400adc03c10265087db2982503541274300d195c08e04f59daab0c625d64d5c
Checks run (2 succeeded)
-
-
This is a small nitpick but I've looked in a few other files, and I think there should be a space between 'import' and the parenthesis.
Also I think this import list should be alphabetical.
-
There are a few spots like this where a few more line breaks could make this a little nicer looking.
I've been comparing againstgit_repository.go
and that file has linebreaks after most if-statements.
However, I don't understand Go, so there may be a valid reason to group it together in some places. -
This is another example of where I think an extra line would be good to have, just between the end of the if block and the last return statement
-
-
All in all the styling is nice and the comments are good. Good work!
- Commit:
-
503541274300d195c08e04f59daab0c625d64d5c3d7e3b75fc222c369b0565ebc4aee98895671bc1
Checks run (2 succeeded)
- Change Summary:
-
Re-assign to self for final cleanup.
- Change Summary:
-
Clean up work by Henri-Philippe.
This is pending RB getting HG support for rb-gateway.
- Summary:
-
Adding support for Mercurial repositories to RB-Gateway.Add support for Mercurial repositories
- Description:
-
~ hg_repository.go
, a Mercurial specific implementation ofrepository.go
~ was created. The hg
case was added toLoadConfig
inutil.go
to~ allow Mercurial repositories to be defined in the config file. ~ hg_repository_test.go
was created, it contains unit tests for every~ method implemented in hg_repository.go
.~ RB Gateway now supports Mercurial repositories. Setting
scm
tohg
~ in a repository entry in the configuration file will enable this ~ behaviour. ~ ~ Co-authored-by: Henri-Philippe Marceau hmarceau@laurentian.ca
- Testing Done:
-
~ httpie
was used to sendGetName
,GetPath
,GetFile
,~ GetFileByCommit
,GetBranches
,GetCommits
&GetCommit
requests to~ a tester Hg repo. Each request yielded the expected result. Unit tests ~ were also written and can be found in hg_repository_test.go
. All of the~ test were run and all were passed. Also, Review Board successfully ~ Ran
go fmt ./...
.~ Ran go test ./...
.~ ~ Configured a Mercurial repository and made HTTP requests to verify
~ API responses were correct. - accessed a Mercurial Repository through RB-Gateway. - Depends On:
-
- Commit:
3d7e3b75fc222c369b0565ebc4aee98895671bc170fa666365bbd9aec93cb6665735531bd126d47b- Diff:
Revision 5 (+584 -9)
Checks run (2 succeeded)
flake8 passed.JSHint passed.
- Change Summary:
-
Address issues
- Commit:
-
70fa666365bbd9aec93cb6665735531bd126d47b9817bc6f7f596bd58c073c9dc602329a482c1528
Checks run (2 succeeded)
- Change Summary:
-
go fmt ./...
- Commit:
-
9817bc6f7f596bd58c073c9dc602329a482c1528e22ad3f4eea0dfe7e99d2228585f3b9b4ffb0d81
Checks run (2 succeeded)
- Change Summary:
-
Split strings more nicely
- Commit:
-
e22ad3f4eea0dfe7e99d2228585f3b9b4ffb0d8177e4450e41064474ad8fdc7ec808d25e2709c532
Checks run (2 succeeded)
- Change Summary:
-
Rename CreateHgBookmark to SeedHgBookmark
- Commit:
-
77e4450e41064474ad8fdc7ec808d25e2709c532b4cef109ede01bd6b5d4ef7cc664d64f1ba89aec
Checks run (2 succeeded)
- Change Summary:
-
refactor
- Commit:
-
b4cef109ede01bd6b5d4ef7cc664d64f1ba89aec942e44c8860cff0e7f382b7391ed365eec1b0819
Checks run (2 succeeded)
- Change Summary:
-
Address issues
- Commit:
-
942e44c8860cff0e7f382b7391ed365eec1b081907dc8a7be2a9399d77bda2f2dc20c873311d837f
Checks run (2 succeeded)
- Change Summary:
-
Address issues
- Commit:
-
07dc8a7be2a9399d77bda2f2dc20c873311d837fe47f975d6b4cbbdce13deef08771fb3a9ce0d0c3
Checks run (2 succeeded)
- Change Summary:
-
Rebase
- Commit:
-
e47f975d6b4cbbdce13deef08771fb3a9ce0d0c3962c914be14967551b3f6df60a4a8ef7ab1272e4