Browse Source

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

bmallred 10 years ago
parent
commit
1876132d10
1 changed files with 7 additions and 1 deletions
  1. 7 1
      cmd/app.go

+ 7 - 1
cmd/app.go

@ -7,6 +7,7 @@ import (
7 7
	"os"
8 8
	"os/exec"
9 9
	"path"
10
	"runtime"
10 11
	"strings"
11 12
)
12 13
@ -46,7 +47,7 @@ var (
46 47
47 48
		"CODE_TF_ADD":      "add",
48 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 51
		"CODE_TF_MERGE":    "merge",
51 52
		"CODE_TF_MV":       "rename",
52 53
		"CODE_TF_PULL":     "get -preview",
@ -156,6 +157,11 @@ func (a *App) executeSubcommand(vcs, subcommand string, args ...string) error {
156 157
		command = append(command, subcommand)
157 158
		command = append(command, args...)
158 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 165
		actions := strings.Split(env, " ")
160 166
		command = append(command, actions...)
161 167
		command = append(command, args...)