Skip to content

Commit a4a1136

Browse files
authored
Merge pull request #405 from x-motemen/chisel
add ChiselRepository
2 parents d311cb9 + 333c153 commit a4a1136

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

misc/author/integration_test.sh

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export GHQ_ROOT=$tmpdir
1919
ghq get www.mercurial-scm.org/repo/hello
2020
ghq get https://launchpad.net/shutter
2121
ghq get --vcs fossil https://www.sqlite.org/src
22+
ghq get http://chiselapp.com/user/sti/repository/fossil-gui
2223
ghq get --shallow --vcs=git-svn https://svn.apache.org/repos/asf/httpd/httpd
2324
ghq get https://svn.apache.org/repos/asf/subversion
2425
ghq get --shallow hub.darcs.net/byorgey/split
@@ -28,14 +29,17 @@ export GHQ_ROOT=$tmpdir
2829
test -d $tmpdir/www.mercurial-scm.org/repo/hello/.hg
2930
test -d $tmpdir/launchpad.net/shutter/.bzr
3031
test -f $tmpdir/www.sqlite.org/src/.fslckout
32+
test -f $tmpdir/chiselapp.com/user/sti/repository/fossil-gui/.fslckout
3133
test -d $tmpdir/svn.apache.org/repos/asf/httpd/httpd/.git/svn
3234
test -d $tmpdir/svn.apache.org/repos/asf/subversion/.svn
3335
test -d $tmpdir/hub.darcs.net/byorgey/split/_darcs
3436
test -d $tmpdir/github.com/x-motemen/gore.git/refs
3537

3638
: testing 'ghq list'
3739
cat <<EOF | sort > $tmpdir/expect
40+
chiselapp.com/user/sti/repository/fossil-gui
3841
github.com/x-motemen/ghq
42+
github.com/x-motemen/gore.git
3943
www.mercurial-scm.org/repo/hello
4044
launchpad.net/shutter
4145
www.sqlite.org/src

remote_repository.go

+21
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,25 @@ func (repo *CodeCommitRepository) VCS() (*VCSBackend, *url.URL, error) {
134134
return GitBackend, &u, nil
135135
}
136136

137+
type ChiselRepository struct {
138+
url *url.URL
139+
}
140+
141+
// URL returns URL of the repository
142+
func (repo *ChiselRepository) URL() *url.URL {
143+
return repo.url
144+
}
145+
146+
// IsValid determine if the repository is valid or not
147+
func (repo *ChiselRepository) IsValid() bool {
148+
return true
149+
}
150+
151+
// VCS returns VCSBackend of the repository
152+
func (repo *ChiselRepository) VCS() (*VCSBackend, *url.URL, error) {
153+
return FossilBackend, repo.URL(), nil
154+
}
155+
137156
// OtherRepository represents other repository
138157
type OtherRepository struct {
139158
url *url.URL
@@ -219,6 +238,8 @@ func NewRemoteRepository(u *url.URL) (RemoteRepository, error) {
219238
return &DarksHubRepository{u}
220239
case "nest.pijul.com":
221240
return &NestPijulRepository{u}
241+
case "chiselapp.com":
242+
return &ChiselRepository{u}
222243
default:
223244
return &OtherRepository{u}
224245
}

0 commit comments

Comments
 (0)