Browse Source

Added hg support when package use it as VCS

pull/103/head
Unknown 11 years ago
parent
commit
23538cf9a6
  1. 17
      cmd/get.go

17
cmd/get.go

@ -350,7 +350,24 @@ func updateByVcs(vcs, dirPath string) error {
log.Error("", "Error occurs when 'git pull origin "+branch+"'")
log.Error("", "\t"+err.Error())
}
case "hg":
stdout, stderr, err := com.ExecCmd("hg", "pull")
if err != nil {
log.Error("", "Error occurs when 'hg pull'")
log.Error("", "\t"+err.Error())
}
if len(stderr) > 0 {
log.Error("", "Error: "+stderr)
}
stdout, stderr, err = com.ExecCmd("hg", "up")
if err != nil {
log.Error("", "Error occurs when 'hg up'")
log.Error("", "\t"+err.Error())
}
if len(stderr) > 0 {
log.Error("", "Error: "+stderr)
}
}
return nil
}

Loading…
Cancel
Save