Quellcode durchsuchen

fix for incoming check using team explorer everywhere (kind of hackish)

bmallred vor 10 Jahren
Ursprung
Commit
1876132d10
1 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen
  1. 7 1
      cmd/app.go

+ 7 - 1
cmd/app.go

7
	"os"
7
	"os"
8
	"os/exec"
8
	"os/exec"
9
	"path"
9
	"path"
10
	"runtime"
10
	"strings"
11
	"strings"
11
)
12
)
12
13
46
47
47
		"CODE_TF_ADD":      "add",
48
		"CODE_TF_ADD":      "add",
48
		"CODE_TF_CHECK":    "branches .",
49
		"CODE_TF_CHECK":    "branches .",
49
		"CODE_TF_INCOMING": fmt.Sprintf("history -r -stopafter:1 -version:W%s~T .", path.Base(GetWorkingDirectory())),
50
		"CODE_TF_INCOMING": "history -r -version:W~T .",
50
		"CODE_TF_MERGE":    "merge",
51
		"CODE_TF_MERGE":    "merge",
51
		"CODE_TF_MV":       "rename",
52
		"CODE_TF_MV":       "rename",
52
		"CODE_TF_PULL":     "get -preview",
53
		"CODE_TF_PULL":     "get -preview",
156
		command = append(command, subcommand)
157
		command = append(command, subcommand)
157
		command = append(command, args...)
158
		command = append(command, args...)
158
	} else {
159
	} else {
160
		// I didn't want to do this but TEE on non-windows sucks
161
		if vcs == "tf" && subcommand == "incoming" && (runtime.GOOS == "darwin" || runtime.GOOS == "linux") {
162
			env = strings.Replace(env, "W~T", fmt.Sprintf("W%s~T", path.Base(a.Directory)), -1)
163
		}
164
159
		actions := strings.Split(env, " ")
165
		actions := strings.Split(env, " ")
160
		command = append(command, actions...)
166
		command = append(command, actions...)
161
		command = append(command, args...)
167
		command = append(command, args...)