protected override void OnIgnore (FilePath[] localPath) { List<FilePath> ignored = new List<FilePath> (); string gitignore = RootPath + Path.DirectorySeparatorChar + ".gitignore"; string txt; if (File.Exists (gitignore)) { using (StreamReader br = new StreamReader (gitignore)) { while ((txt = br.ReadLine ()) != null) { ignored.Add (txt); } } } StringBuilder sb = new StringBuilder (); foreach (var path in localPath.Except (ignored)) sb.AppendLine (RootRepository.ToGitPath (path)); File.AppendAllText (RootPath + Path.DirectorySeparatorChar + ".gitignore", sb.ToString ()); }
protected override void OnIgnore(FilePath[] localPath) { //return GetDirectoryVersionInfo (FilePath.Null, paths, getRemoteStatus, false); List<FilePath> ignored = new List<FilePath> (); string gitignore = RootPath + Path.DirectorySeparatorChar + ".gitignore"; string txt; if (File.Exists (gitignore)) { using (StreamReader br = new StreamReader (gitignore)) { while ((txt = br.ReadLine ()) != null) { ignored.Add (txt); } } } StringBuilder sb = new StringBuilder (); foreach (var path in localPath.Except (ignored)) sb.AppendLine (ToMercurialPath (path)); File.AppendAllText (RootPath + Path.DirectorySeparatorChar + ".gitignore", sb.ToString ()); }