示例#1
0
文件: repo.go 项目: emil2k/go-vcs
func init() {
	// Overwrite the git opener to return repositories that use the
	// gogits native-go implementation.
	vcs.RegisterOpener("git", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
}
示例#2
0
文件: repo.go 项目: shazow/go-vcs
func init() {
	// Overwrite the hg opener to return repositories that use the
	// faster native-Go hg implementation.
	vcs.RegisterOpener("hg", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
}
示例#3
0
func init() {
	vcs.RegisterOpener("hg", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
	vcs.RegisterCloner("hg", func(url, dir string, opt vcs.CloneOpt) (vcs.Repository, error) {
		return CloneHgRepository(url, dir, opt)
	})
}