コード例 #1
0
        /// <summary>
        /// Many SVN properties have values that are sets of new-line separated strings.
        /// This method removes a value from that set.
        /// Idempotent, can be called mulitple times.
        /// If, after removing the specified value, no values remain, the property will be deleted.
        /// </summary>
        public static void RemovePropertyValue(this SvnCommand svnCommand, AbsolutePath path, string propertyName, string value)
        {
            var values = new List <string>(svnCommand.GetSvnIgnoreValues(path));

            values.Remove(value);

            if (values.IsEmpty())
            {
                svnCommand.DeleteProperty(path, propertyName);
            }
            else
            {
                svnCommand.SetSvnIgnoreValues(path, values.ToArray());
            }
        }
コード例 #2
0
 /// <summary>
 /// Deletes the SVN ignore property.
 /// Idempotent.
 /// </summary>
 public static void DeleteSvnIgnore(this SvnCommand svnCommand, AbsolutePath path)
 {
     svnCommand.DeleteProperty(path, SvnCommand.SvnIgnorePropertyName);
 }