func (b *base) LocalPath() string {
	return b.local
}
LocalPath retrieves the local file system location for a repo.
package vcs
import (
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"os/exec"
	"regexp"
	"strings"
	"time"
)
var Logger *log.Logger
func init() {
	Logger = log.New(ioutil.Discard, "go-vcs", log.LstdFlags)
}
const longForm = "2006-01-02 15:04:05 -0700"
type Type string
const (
	NoVCS Type = ""
	Git   Type = "git"
	Svn   Type = "svn"
	Bzr   Type = "bzr"
	Hg    Type = "hg"
)
type Repo interface {
	Vcs() Type
	Remote() string
	LocalPath() string
	Get() error
	Init() error
	Update() error
	UpdateVersion(string) error
	Version() (string, error)
	Current() (string, error)
	Date() (time.Time, error)
	CheckLocal() bool
	Branches() ([]string, error)
	Tags() ([]string, error)
	IsReference(string) bool
	IsDirty() bool
	CommitInfo(string) (*CommitInfo, error)
	TagsFromCommit(string) ([]string, error)
	Ping() bool
	RunFromDir(cmd string, args ...string) ([]byte, error)
	ExportDir(string) error
}
func NewRepo(remote, local string) (Repo, error) {
	vtype, remote, err := detectVcsFromRemote(remote)
	if err == ErrCannotDetectVCS {
		vtype, err = DetectVcsFromFS(local)
	}
	if err != nil {
		return nil, err
	}
	switch vtype {
	case Git:
		return NewGitRepo(remote, local)
	case Svn:
		return NewSvnRepo(remote, local)
	case Hg:
		return NewHgRepo(remote, local)
	case Bzr:
		return NewBzrRepo(remote, local)
	}
	return nil, ErrCannotDetectVCS
}
type CommitInfo struct {
	Commit string
	Author string
	Date time.Time
	Message string
}
type base struct {
	remote, local string
	Logger        *log.Logger
}
func (b *base) log(v interface{}) {
	b.Logger.Printf("%s", v)
}
func (b *base) Remote() string {
	return b.remote
}