Revisión | 1aa98d44d418521ce00c0d1d5880f1ea3f7ea638 (tree) |
---|---|
Tiempo | 2021-06-14 22:23:15 |
Autor | hor931101jp <hor931101jp@yaho...> |
Commiter | hor931101jp |
0614
@@ -33,7 +33,7 @@ namespace SvnRevert | ||
33 | 33 | Console.WriteLine("+++ Repo Directory / File List +++"); |
34 | 34 | |
35 | 35 | //ローカルの情報を取得 |
36 | - SvnPathTarget local = new SvnPathTarget(@"C:\OSDN\99 test\trunk\UnitTestProject1"); | |
36 | + var local = new SvnPathTarget(@"C:\OSDN\99 test\trunk\OfficeImageReducerCS"); | |
37 | 37 | SvnInfoEventArgs clientInfo; |
38 | 38 | client.GetInfo(local, out clientInfo); |
39 | 39 | Debug.Print(clientInfo.Uri.AbsoluteUri); |
@@ -62,17 +62,19 @@ namespace SvnRevert | ||
62 | 62 | System.IO.File.AppendAllText(@"diffFile.patch", new System.IO.StreamReader(stream).ReadToEnd()); |
63 | 63 | } |
64 | 64 | #endif |
65 | - //repos var location = new Uri("http://my.example/repos/trunk"); | |
66 | - //client.DiffSummary(new SvnUriTarget(repos, 12), new SvnUriTarget(repos, SvnRevision.Head), | |
67 | - //client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision-10), new SvnUriTarget(repos, clientInfo.Revision), | |
68 | - //client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision-1), local, | |
69 | - //client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision), new SvnPathTarget(local.TargetPath), | |
70 | - //client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision), new SvnPathTarget(local.TargetPath,SvnRevision.Working), | |
71 | - //client.DiffSummary(new SvnPathTarget(local.TargetPath, clientInfo.Revision), new SvnPathTarget(local.TargetPath, SvnRevision.Working), | |
65 | +//repos var location = new Uri("http://my.example/repos/trunk"); | |
66 | +//client.DiffSummary(new SvnUriTarget(repos, 12), new SvnUriTarget(repos, SvnRevision.Head), | |
67 | +//client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision-10), new SvnUriTarget(repos, clientInfo.Revision), | |
68 | +//client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision-1), local, | |
69 | +//client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision), new SvnPathTarget(local.TargetPath), | |
70 | +//client.DiffSummary(new SvnUriTarget(repos, clientInfo.Revision), new SvnPathTarget(local.TargetPath,SvnRevision.Working), | |
71 | +//client.DiffSummary(new SvnPathTarget(local.TargetPath, clientInfo.Revision), new SvnPathTarget(local.TargetPath, SvnRevision.Working), | |
72 | +#if false | |
73 | + var DiffSummaryList = new List<SvnDiffSummaryEventArgs>(); | |
72 | 74 | client.DiffSummary(new SvnPathTarget(local.TargetPath, SvnRevision.Base), new SvnPathTarget(local.TargetPath, SvnRevision.Working), |
73 | 75 | delegate (object sender, SvnDiffSummaryEventArgs e) |
74 | 76 | { |
75 | - //if (e.DiffKind == SvnDiffKind.Modified) | |
77 | + if (e.DiffKind == SvnDiffKind.Modified) | |
76 | 78 | { |
77 | 79 | // TODO: Handle result |
78 | 80 | Console.WriteLine(" "); |
@@ -80,11 +82,17 @@ namespace SvnRevert | ||
80 | 82 | Console.WriteLine(e.PropertiesChanged); |
81 | 83 | Console.WriteLine(e.FromUri); |
82 | 84 | Console.WriteLine(e.DiffKind); |
85 | + DiffSummaryList.Add(e); | |
83 | 86 | } |
84 | - | |
85 | 87 | }); |
86 | 88 | |
87 | - Console.WriteLine("----------"); | |
89 | + Console.WriteLine("--------------------------------------"); | |
90 | + Console.WriteLine(" "); | |
91 | + Console.WriteLine(" "); | |
92 | + Console.WriteLine(" "); | |
93 | + Console.WriteLine(" "); | |
94 | + Console.WriteLine(" "); | |
95 | +#endif | |
88 | 96 | #if false |
89 | 97 | System.IO.MemoryStream diffResultStream = new System.IO.MemoryStream(); |
90 | 98 | //client.Diff(SvnTarget.FromString(local.TargetPath), new SvnRevisionRange(SvnRevision.Head, SvnRevision.Working), diffResultStream); |
@@ -101,7 +109,26 @@ namespace SvnRevert | ||
101 | 109 | client.Diff(local, new SvnRevisionRange(SvnRevision.Base, SvnRevision.Working), diffResultStream); |
102 | 110 | Console.WriteLine(diffResultStream.Length); |
103 | 111 | var strdiff = Encoding.UTF8.GetString(diffResultStream.ToArray()); |
104 | - Console.WriteLine(strdiff); | |
112 | + //var strdiff = Encoding.GetEncoding("shift_jis").GetString(diffResultStream.ToArray()); | |
113 | + //Console.WriteLine(strdiff); | |
114 | + Console.WriteLine(" "); | |
115 | + Console.WriteLine(" "); | |
116 | + Console.WriteLine(" "); | |
117 | + Console.WriteLine(" "); | |
118 | + Console.WriteLine(" "); | |
119 | + | |
120 | + String[] delimiter = {"Index: "}; | |
121 | + var strdiffs = strdiff.Split(delimiter, StringSplitOptions.RemoveEmptyEntries); | |
122 | + foreach(var x in strdiffs){ | |
123 | + Console.WriteLine(" "); | |
124 | + Console.WriteLine(" "); | |
125 | + Console.WriteLine(" "); | |
126 | + Console.WriteLine("1"); | |
127 | + Console.WriteLine(x); | |
128 | + } | |
129 | + | |
130 | + | |
131 | + | |
105 | 132 | Console.WriteLine("何かキーを押してください . . ."); |
106 | 133 | Console.ReadKey(); |
107 | 134 |