internal static void SetCommitComment(string file, string comment, bool save) { lock (commentsLock) { Hashtable doc = GetCommitComments(); if (String.IsNullOrEmpty(comment)) { if (doc.ContainsKey(file)) { doc.Remove(file); if (save) { SaveComments(); } } } else { CommitComment cm = new CommitComment(); cm.Comment = comment; cm.Date = DateTime.Now; doc [file] = cm; if (save) { SaveComments(); } } } }
internal static string GetCommitComment(string file) { lock (commentsLock) { Hashtable doc = GetCommitComments(); CommitComment cm = doc [file] as CommitComment; if (cm != null) { cm.Date = DateTime.Now; return(cm.Comment); } else { return(null); } } }
internal static void SetCommitComment (string file, string comment, bool save) { lock (commentsLock) { Hashtable doc = GetCommitComments (); if (comment == null || comment.Length == 0) { if (doc.ContainsKey (file)) { doc.Remove (file); if (save) SaveComments (); } } else { CommitComment cm = new CommitComment (); cm.Comment = comment; cm.Date = DateTime.Now; doc [file] = cm; if (save) SaveComments (); } } }