forked from jakubgarfield/Bonobo-Git-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMsysgitResources.cs
76 lines (67 loc) · 3.31 KB
/
MsysgitResources.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bonobo.Git.Server.Test
{
public class MsysgitResources
{
public enum Definition
{
CloneEmptyRepositoryOutput,
CloneEmptyRepositoryError,
PushFilesError,
PushTagError,
PullBranchError,
PullTagError,
PullRepositoryError,
CloneRepositoryOutput,
CloneRepositoryError,
PushBranchError,
}
private readonly Dictionary<Definition, String> _resources;
public string this[Definition definition]
{
get
{
return _resources[definition];
}
}
public MsysgitResources(string version)
{
_resources = new Dictionary<Definition, string>
{
{ Definition.CloneEmptyRepositoryOutput, "Cloning into Integration...\n" },
{ Definition.CloneEmptyRepositoryError, "warning: You appear to have cloned an empty repository.\n" },
{ Definition.PushFilesError, "To {0}\n * [new branch] master -> master\n" },
{ Definition.PushTagError, "To {0}\n * [new tag] v1.4 -> v1.4\n" },
{ Definition.PullBranchError, "From {0}\n * branch TestBranch -> FETCH_HEAD\n" },
{ Definition.PullTagError, "From {0}\n * [new branch] TestBranch -> origin/TestBranch\n * [new branch] master -> origin/master\n * [new tag] v1.4 -> v1.4\n" },
{ Definition.PullRepositoryError, "From {0}\n * branch master -> FETCH_HEAD\n" },
{ Definition.CloneRepositoryOutput, "Cloning into Integration...\n" },
{ Definition.CloneRepositoryError,"" },
{ Definition.PushBranchError, "To {0}\n * [new branch] TestBranch -> TestBranch\n" },
};
if (String.Equals(version, "1.7.8")
|| String.Equals(version, "1.7.9")
|| String.Equals(version, "1.8.0")
|| String.Equals(version, "1.8.1.2")
|| String.Equals(version, "1.8.3"))
{
_resources[Definition.CloneRepositoryOutput] = "Cloning into 'Integration'...\n";
_resources[Definition.CloneRepositoryError] = "";
_resources[Definition.CloneEmptyRepositoryOutput] = "Cloning into 'Integration'...\n";
}
if(string.Equals(version,"1.9.5"))
{
_resources[Definition.CloneEmptyRepositoryOutput] = "";
_resources[Definition.CloneEmptyRepositoryError] = "Cloning into 'Integration'...\nwarning: You appear to have cloned an empty repository.\n";
_resources[Definition.CloneRepositoryOutput] = "";
_resources[Definition.CloneRepositoryError] = "Cloning into 'Integration'...\n";
_resources[Definition.PullRepositoryError] = "From {0}\n * branch master -> FETCH_HEAD\n * [new branch] master -> origin/master\n";
_resources[Definition.PullTagError] = "From {0}\n * [new branch] TestBranch -> origin/TestBranch\n * [new tag] v1.4 -> v1.4\n";
}
}
}
}