|
@ -6,6 +6,7 @@ import (
|
6
|
6
|
"io"
|
7
|
7
|
"os"
|
8
|
8
|
"os/exec"
|
|
9
|
"path"
|
9
|
10
|
"strings"
|
10
|
11
|
)
|
11
|
12
|
|
|
@ -45,7 +46,7 @@ var (
|
45
|
46
|
|
46
|
47
|
"CODE_TF_ADD": "add",
|
47
|
48
|
"CODE_TF_CHECK": "branches .",
|
48
|
|
"CODE_TF_INCOMING": "history -r -stopafter:1 -version:W~T .",
|
|
49
|
"CODE_TF_INCOMING": fmt.Sprintf("history -r -stopafter:1 -version:W%s~T .", path.Base(GetWorkingDirectory())),
|
49
|
50
|
"CODE_TF_MERGE": "merge",
|
50
|
51
|
"CODE_TF_MV": "rename",
|
51
|
52
|
"CODE_TF_PULL": "get -preview",
|
|
@ -138,10 +139,8 @@ func isVersionControlled(vcs, directory string) error {
|
138
|
139
|
}
|
139
|
140
|
|
140
|
141
|
// Execute the command and swallow any output
|
141
|
|
//var out bytes.Buffer
|
142
|
142
|
actions := strings.Split(env, " ")
|
143
|
143
|
cmd := exec.Command(vcs, actions...)
|
144
|
|
//cmd.Stdout = &out
|
145
|
144
|
|
146
|
145
|
return cmd.Run()
|
147
|
146
|
}
|