diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 61cc2b54..9968f3de 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -540,25 +540,27 @@ namespace SparkleLib { public override void AddNote (string revision, string note) { - string n = Environment.NewLine; - note = "" + n + - " " + n + - " " + SparkleConfig.DefaultConfig.UserName + "" + n + - " " + SparkleConfig.DefaultConfig.UserEmail + "" + n + - " " + n + - " " + (int) (DateTime.UtcNow - new DateTime (1970, 1, 1)).TotalSeconds + "" + n + - " " + note + "" + n + + // Create the note in one line for easier merging + note = "" + + " " + + " " + SparkleConfig.DefaultConfig.UserName + "" + + " " + SparkleConfig.DefaultConfig.UserEmail + "" + + " " + + " " + (int) (DateTime.UtcNow - new DateTime (1970, 1, 1)).TotalSeconds + "" + + " " + note + "" + ""; - SparkleGit git = new SparkleGit (LocalPath, "notes append -m '" + note + "'"); - git.Start (); - git.WaitForExit (); + SparkleGit git_notes = new SparkleGit (LocalPath, "notes append -m \"" + note + "\" " + revision); + git_notes.Start (); + git_notes.WaitForExit (); while (Status != SyncStatus.Idle) { System.Threading.Thread.Sleep (5 * 20); } - SyncUp (); + SparkleGit git_push = new SparkleGit (LocalPath, "git push origin refs/notes/*"); + git_push.Start (); + git_push.WaitForExit (); } diff --git a/SparkleLib/SparkleChangeSet.cs b/SparkleLib/SparkleChangeSet.cs index 9bcd66b9..5b71a1b9 100644 --- a/SparkleLib/SparkleChangeSet.cs +++ b/SparkleLib/SparkleChangeSet.cs @@ -24,15 +24,29 @@ namespace SparkleLib { public string UserName; public string UserEmail; + public string Folder; public string Revision; public DateTime Timestamp; - public bool IsMerge = false; + public bool FolderSupportsNotes = false; + public bool IsMerge = false; + public List Added = new List (); public List Deleted = new List (); public List Edited = new List (); public List MovedFrom = new List (); public List MovedTo = new List (); + public List Notes = new List (); + } + + + public class SparkleNote { + + public string UserName; + public string UserEmail; + + public DateTime Timestamp; + public string Body; } }