Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions misc/author/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export GHQ_ROOT=$tmpdir
ghq get www.mercurial-scm.org/repo/hello
ghq get https://launchpad.net/shutter
ghq get --vcs fossil https://www.sqlite.org/src
ghq get http://chiselapp.com/user/sti/repository/fossil-gui
ghq get --shallow --vcs=git-svn https://svn.apache.org/repos/asf/httpd/httpd
ghq get https://svn.apache.org/repos/asf/subversion
ghq get --shallow hub.darcs.net/byorgey/split
Expand All @@ -28,14 +29,17 @@ export GHQ_ROOT=$tmpdir
test -d $tmpdir/www.mercurial-scm.org/repo/hello/.hg
test -d $tmpdir/launchpad.net/shutter/.bzr
test -f $tmpdir/www.sqlite.org/src/.fslckout
test -f $tmpdir/chiselapp.com/user/sti/repository/fossil-gui/.fslckout
test -d $tmpdir/svn.apache.org/repos/asf/httpd/httpd/.git/svn
test -d $tmpdir/svn.apache.org/repos/asf/subversion/.svn
test -d $tmpdir/hub.darcs.net/byorgey/split/_darcs
test -d $tmpdir/github.com/x-motemen/gore.git/refs

: testing 'ghq list'
cat <<EOF | sort > $tmpdir/expect
chiselapp.com/user/sti/repository/fossil-gui
github.com/x-motemen/ghq
github.com/x-motemen/gore.git
www.mercurial-scm.org/repo/hello
launchpad.net/shutter
www.sqlite.org/src
Expand Down
21 changes: 21 additions & 0 deletions remote_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,25 @@ func (repo *CodeCommitRepository) VCS() (*VCSBackend, *url.URL, error) {
return GitBackend, &u, nil
}

type ChiselRepository struct {
url *url.URL
}

// URL returns URL of the repository
func (repo *ChiselRepository) URL() *url.URL {
return repo.url
}

// IsValid determine if the repository is valid or not
func (repo *ChiselRepository) IsValid() bool {
return true
}

// VCS returns VCSBackend of the repository
func (repo *ChiselRepository) VCS() (*VCSBackend, *url.URL, error) {
return FossilBackend, repo.URL(), nil
}

// OtherRepository represents other repository
type OtherRepository struct {
url *url.URL
Expand Down Expand Up @@ -219,6 +238,8 @@ func NewRemoteRepository(u *url.URL) (RemoteRepository, error) {
return &DarksHubRepository{u}
case "nest.pijul.com":
return &NestPijulRepository{u}
case "chiselapp.com":
return &ChiselRepository{u}
default:
return &OtherRepository{u}
}
Expand Down
Loading