eventlog: fix first commit on encrypted repos

This commit is contained in:
Hylke Bons 2012-09-30 13:07:36 +02:00
parent 475b82f43a
commit af740b90a0
3 changed files with 29 additions and 8 deletions

View file

@ -208,10 +208,14 @@ namespace SparkleLib {
}
// TODO: Find better way to determine if folder should have crypto setup
bool repo_is_encrypted = RemoteUrl.ToString ().Contains ("crypto");
bool repo_is_encrypted = RemoteUrl.ToString ().Contains ("-crypto");
string text;
if (!repo_is_encrypted) {
string text = "Congratulations, you've successfully created a SparkleShare repository!" + n +
if (repo_is_encrypted) {
text = GenerateCryptoSalt () + " Secret project! " + GenerateCryptoSalt ();
} else {
text = "Congratulations, you've successfully created a SparkleShare repository!" + n +
n +
"Any files you add or change in this folder will be automatically synced to " + n +
uri_builder.ToString () + " and everyone connected to it." + n +
@ -221,9 +225,9 @@ namespace SparkleLib {
"donation to support the project: http://www.sparkleshare.org/" + n +
n +
"Have fun! :)" + n;
File.WriteAllText (file_path, text);
}
File.WriteAllText (file_path, text);
}

View file

@ -28,6 +28,22 @@ Global
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = SparkleShare.csproj
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = None
$1.ResourceNamePolicy = FileFormatDefault
$0.TextStylePolicy = $2
$2.inheritsSet = null
$2.scope = text/x-csharp
$0.CSharpFormattingPolicy = $3
$3.inheritsSet = Mono
$3.inheritsScope = text/x-csharp
$3.scope = text/x-csharp
$0.TextStylePolicy = $4
$4.FileWidth = 120
$4.inheritsSet = VisualStudio
$4.inheritsScope = text/plain
$4.scope = text/plain
version =
EndGlobalSection
EndGlobal

View file

@ -260,16 +260,17 @@ namespace SparkleShare {
public string GetHTMLLog (List<SparkleChangeSet> change_sets)
{
if (change_sets.Count == 0)
return "";
List <ActivityDay> activity_days = new List <ActivityDay> ();
change_sets.Sort ((x, y) => (x.Timestamp.CompareTo (y.Timestamp)));
change_sets.Reverse ();
if (change_sets.Count == 0)
return "";
foreach (SparkleChangeSet change_set in change_sets) {
bool change_set_inserted = false;
foreach (ActivityDay stored_activity_day in activity_days) {
if (stored_activity_day.Date.Year == change_set.Timestamp.Year &&
stored_activity_day.Date.Month == change_set.Timestamp.Month &&