Skip to content

Commit dc307af

Browse files
committed
Switched from result.Error to result.HasErrors
1 parent fc17bc4 commit dc307af

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

Editor/ContextMenus/SnailSVNContextMenus.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public override void Update(IEnumerable<string> assetPaths, bool includeMeta, bo
7070
return;
7171

7272
var result = ExecuteCommand("update", GetWorkingPath(assetPaths), wait);
73-
if (!string.IsNullOrEmpty(result.Error)) {
73+
if (result.HasErrors) {
7474
Debug.LogError($"SVN Error: {result.Error}");
7575
}
7676
}
@@ -88,7 +88,7 @@ public override void Commit(IEnumerable<string> assetPaths, bool includeMeta, bo
8888
);
8989

9090
var result = ExecuteCommand("commit", GetWorkingPath(assetPaths), wait);
91-
if (!string.IsNullOrEmpty(result.Error)) {
91+
if (result.HasErrors) {
9292
Debug.LogError($"SVN Error: {result.Error}");
9393
}
9494
}
@@ -112,7 +112,7 @@ public override void Add(IEnumerable<string> assetPaths, bool includeMeta, bool
112112
var pathsArg = AssetPathsToContextPaths(includeMeta ? assetPaths.Concat(metas) : assetPaths, false);
113113

114114
var result = ExecuteCommand("add", pathsArg, WiseSVNIntegration.ProjectRootNative, wait);
115-
if (!string.IsNullOrEmpty(result.Error)) {
115+
if (result.HasErrors) {
116116
Debug.LogError($"SVN Error: {result.Error}");
117117
}
118118
}
@@ -130,7 +130,7 @@ public override void Revert(IEnumerable<string> assetPaths, bool includeMeta, bo
130130
);
131131

132132
var result = ExecuteCommand("revert", GetWorkingPath(assetPaths), wait);
133-
if (!string.IsNullOrEmpty(result.Error)) {
133+
if (result.HasErrors) {
134134
Debug.LogError($"SVN Error: {result.Error}");
135135
}
136136
}
@@ -154,7 +154,7 @@ public override void GetLocks(IEnumerable<string> assetPaths, bool includeMeta,
154154
return;
155155

156156
var result = ExecuteCommand("lock", AssetPathsToContextPaths(assetPaths, includeMeta), WiseSVNIntegration.ProjectRootNative, wait);
157-
if (!string.IsNullOrEmpty(result.Error)) {
157+
if (result.HasErrors) {
158158
Debug.LogError($"SVN Error: {result.Error}");
159159
}
160160
}
@@ -165,7 +165,7 @@ public override void ReleaseLocks(IEnumerable<string> assetPaths, bool includeMe
165165
return;
166166

167167
var result = ExecuteCommand("unlock", AssetPathsToContextPaths(assetPaths, includeMeta), WiseSVNIntegration.ProjectRootNative, wait);
168-
if (!string.IsNullOrEmpty(result.Error)) {
168+
if (result.HasErrors) {
169169
Debug.LogError($"SVN Error: {result.Error}");
170170
}
171171
}
@@ -178,7 +178,7 @@ public override void ShowLog(string assetPath, bool wait = false)
178178
var pathArg = Directory.Exists(assetPath) ? assetPath : Path.GetDirectoryName(assetPath);
179179

180180
var result = ExecuteCommand("log", pathArg, wait);
181-
if (!string.IsNullOrEmpty(result.Error)) {
181+
if (result.HasErrors) {
182182
Debug.LogError($"SVN Error: {result.Error}");
183183
}
184184
}
@@ -191,7 +191,7 @@ public override void Blame(string assetPath, bool wait = false)
191191
// Support only one file.
192192

193193
var result = ExecuteCommand("blame", assetPath, WiseSVNIntegration.ProjectRootNative, wait);
194-
if (!string.IsNullOrEmpty(result.Error)) {
194+
if (result.HasErrors) {
195195
Debug.LogError($"SVN Error: {result.Error}");
196196
}
197197
}
@@ -200,7 +200,7 @@ public override void Cleanup(bool wait = false)
200200
{
201201
// NOTE: SnailSVN doesn't pop up dialog for clean up. It just does some shady stuff in the background and a notification is shown some time later.
202202
var result = ExecuteCommand("cleanup", WiseSVNIntegration.ProjectRootNative, wait);
203-
if (!string.IsNullOrEmpty(result.Error)) {
203+
if (result.HasErrors) {
204204
Debug.LogError($"SVN Error: {result.Error}");
205205
}
206206
}
@@ -211,15 +211,15 @@ public override void RepoBrowser(string url, bool wait = false)
211211
Debug.LogError($"SnailSVN doesn't support Repo-Browser very well. Opening Repo-Browser for the current working copy.");
212212

213213
var result = ExecuteCommand("repo-browser", string.Empty, WiseSVNIntegration.ProjectRootNative, wait);
214-
if (!string.IsNullOrEmpty(result.Error)) {
214+
if (result.HasErrors) {
215215
Debug.LogError($"SVN Error: {result.Error}");
216216
}
217217
}
218218

219219
public override void Switch(string localPath, string url, bool wait = false)
220220
{
221221
var result = ExecuteCommand("switch", string.Empty, WiseSVNIntegration.ProjectRootNative, wait);
222-
if (!string.IsNullOrEmpty(result.Error)) {
222+
if (result.HasErrors) {
223223
Debug.LogError($"SVN Error: {result.Error}");
224224
}
225225
}

Editor/ContextMenus/TortoiseSVNContextMenus.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public override void CheckChanges(IEnumerable<string> assetPaths, bool includeMe
2626
return;
2727

2828
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:repostatus /path:\"{pathsArg}\"", wait);
29-
if (!string.IsNullOrEmpty(result.Error)) {
29+
if (result.HasErrors) {
3030
Debug.LogError($"SVN Error: {result.Error}");
3131
}
3232
}
@@ -38,7 +38,7 @@ public override void DiffChanges(string assetPath, bool wait = false)
3838
return;
3939

4040
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:diff /path:\"{pathsArg}\"", wait);
41-
if (!string.IsNullOrEmpty(result.Error)) {
41+
if (result.HasErrors) {
4242
Debug.LogError($"SVN Error: {result.Error}");
4343
}
4444
}
@@ -53,7 +53,7 @@ public override void Update(IEnumerable<string> assetPaths, bool includeMeta, bo
5353
return;
5454

5555
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:update /path:\"{pathsArg}\"", wait);
56-
if (!string.IsNullOrEmpty(result.Error)) {
56+
if (result.HasErrors) {
5757
Debug.LogError($"SVN Error: {result.Error}");
5858
}
5959
}
@@ -68,7 +68,7 @@ public override void Commit(IEnumerable<string> assetPaths, bool includeMeta, bo
6868
return;
6969

7070
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:commit /path:\"{pathsArg}\"", wait);
71-
if (!string.IsNullOrEmpty(result.Error)) {
71+
if (result.HasErrors) {
7272
Debug.LogError($"SVN Error: {result.Error}");
7373
}
7474
}
@@ -96,7 +96,7 @@ public override void Add(IEnumerable<string> assetPaths, bool includeMeta, bool
9696
return;
9797

9898
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:add /path:\"{pathsArg}\"", wait);
99-
if (!string.IsNullOrEmpty(result.Error)) {
99+
if (result.HasErrors) {
100100
Debug.LogError($"SVN Error: {result.Error}");
101101
}
102102
}
@@ -111,7 +111,7 @@ public override void Revert(IEnumerable<string> assetPaths, bool includeMeta, bo
111111
return;
112112

113113
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:revert /path:\"{pathsArg}\"", wait);
114-
if (!string.IsNullOrEmpty(result.Error)) {
114+
if (result.HasErrors) {
115115
Debug.LogError($"SVN Error: {result.Error}");
116116
}
117117
}
@@ -121,7 +121,7 @@ public override void Revert(IEnumerable<string> assetPaths, bool includeMeta, bo
121121
public override void ResolveAll(bool wait = false)
122122
{
123123
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:resolve /path:\"{WiseSVNIntegration.ProjectRootNative}\"", wait);
124-
if (!string.IsNullOrEmpty(result.Error)) {
124+
if (result.HasErrors) {
125125
Debug.LogError($"SVN Error: {result.Error}");
126126
}
127127
}
@@ -138,7 +138,7 @@ public override void Resolve(string assetPath, bool wait = false)
138138
}
139139

140140
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:conflicteditor /path:\"{AssetPathToContextPaths(assetPath, false)}\"", wait);
141-
if (!string.IsNullOrEmpty(result.Error)) {
141+
if (result.HasErrors) {
142142
Debug.LogError($"SVN Error: {result.Error}");
143143
}
144144
}
@@ -155,7 +155,7 @@ public override void GetLocks(IEnumerable<string> assetPaths, bool includeMeta,
155155
return;
156156

157157
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:lock /path:\"{pathsArg}\"", wait);
158-
if (!string.IsNullOrEmpty(result.Error)) {
158+
if (result.HasErrors) {
159159
Debug.LogError($"SVN Error: {result.Error}");
160160
}
161161
}
@@ -170,7 +170,7 @@ public override void ReleaseLocks(IEnumerable<string> assetPaths, bool includeMe
170170
return;
171171

172172
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:unlock /path:\"{pathsArg}\"", wait);
173-
if (!string.IsNullOrEmpty(result.Error)) {
173+
if (result.HasErrors) {
174174
Debug.LogError($"SVN Error: {result.Error}");
175175
}
176176
}
@@ -185,7 +185,7 @@ public override void ShowLog(string assetPath, bool wait = false)
185185
return;
186186

187187
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:log /path:\"{pathsArg}\"", wait);
188-
if (!string.IsNullOrEmpty(result.Error)) {
188+
if (result.HasErrors) {
189189
Debug.LogError($"SVN Error: {result.Error}");
190190
}
191191
}
@@ -202,7 +202,7 @@ public override void Blame(string assetPath, bool wait = false)
202202
return;
203203

204204
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:blame /path:\"{pathsArg}\"", wait);
205-
if (!string.IsNullOrEmpty(result.Error)) {
205+
if (result.HasErrors) {
206206
Debug.LogError($"SVN Error: {result.Error}");
207207
}
208208
}
@@ -212,7 +212,7 @@ public override void Blame(string assetPath, bool wait = false)
212212
public override void Cleanup(bool wait = false)
213213
{
214214
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:cleanup /path:\"{WiseSVNIntegration.ProjectRootNative}\"", wait);
215-
if (!string.IsNullOrEmpty(result.Error)) {
215+
if (result.HasErrors) {
216216
Debug.LogError($"SVN Error: {result.Error}");
217217
}
218218
}
@@ -224,7 +224,7 @@ public override void RepoBrowser(string url, bool wait = false)
224224
return;
225225

226226
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:repobrowser /path:\"{url}\"", wait);
227-
if (!string.IsNullOrEmpty(result.Error)) {
227+
if (result.HasErrors) {
228228
Debug.LogError($"SVN Error: {result.Error}");
229229
}
230230
}
@@ -235,7 +235,7 @@ public override void Switch(string localPath, string url, bool wait = false)
235235
return;
236236

237237
var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:switch /path:\"{localPath}\" /url:\"{url}\"", wait);
238-
if (!string.IsNullOrEmpty(result.Error)) {
238+
if (result.HasErrors) {
239239
Debug.LogError($"SVN Error: {result.Error}");
240240
}
241241
}

0 commit comments

Comments
 (0)