ActivityDay again...
This commit is contained in:
parent
3c510582cf
commit
f255b8e4a1
|
@ -928,64 +928,6 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void EnableHostKeyCheckingForHost (string host)
|
|
||||||
{
|
|
||||||
|
|
||||||
string ssh_config_file_path = SparkleHelpers.CombineMore (SparklePaths.HomePath, ".ssh", "config");
|
|
||||||
string ssh_config = "Host " + host + "\n\tStrictHostKeyChecking no";
|
|
||||||
|
|
||||||
if (File.Exists (ssh_config_file_path)) {
|
|
||||||
|
|
||||||
StreamReader reader = new StreamReader (ssh_config_file_path);
|
|
||||||
string current_ssh_config = reader.ReadToEnd ();
|
|
||||||
reader.Close ();
|
|
||||||
|
|
||||||
if (current_ssh_config.Equals (ssh_config)) {
|
|
||||||
|
|
||||||
File.Delete (ssh_config_file_path);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
current_ssh_config = current_ssh_config.Remove (current_ssh_config.IndexOf (ssh_config),
|
|
||||||
ssh_config.Length);
|
|
||||||
|
|
||||||
TextWriter writer = new StreamWriter (ssh_config_file_path);
|
|
||||||
writer.WriteLine (current_ssh_config);
|
|
||||||
writer.Close ();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void DisableHostKeyCheckingForHost (string host)
|
|
||||||
{
|
|
||||||
|
|
||||||
string ssh_config_file_path = SparkleHelpers.CombineMore
|
|
||||||
(SparklePaths.HomePath, ".ssh", "config");
|
|
||||||
|
|
||||||
string ssh_config = "Host " + host + "\n" +
|
|
||||||
"\tStrictHostKeyChecking no";
|
|
||||||
|
|
||||||
if (File.Exists (ssh_config_file_path)) {
|
|
||||||
|
|
||||||
TextWriter writer = File.AppendText (ssh_config_file_path);
|
|
||||||
writer.WriteLine ("\n" + ssh_config);
|
|
||||||
writer.Close ();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
TextWriter writer = new StreamWriter (ssh_config_file_path);
|
|
||||||
writer.WriteLine (ssh_config);
|
|
||||||
writer.Close ();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void EnableHostKeyCheckingForHost (string host)
|
private void EnableHostKeyCheckingForHost (string host)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1248,4 +1190,21 @@ namespace SparkleShare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// All commits that happened on a day
|
||||||
|
public class ActivityDay : List <SparkleCommit>
|
||||||
|
{
|
||||||
|
|
||||||
|
public DateTime DateTime;
|
||||||
|
|
||||||
|
public ActivityDay (DateTime date_time)
|
||||||
|
{
|
||||||
|
|
||||||
|
DateTime = date_time;
|
||||||
|
DateTime = new DateTime (DateTime.Year, DateTime.Month, DateTime.Day);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue