示例#1
0
        override protected void Runner_Output(object sender, string line)
        {
            int fileIndex = 0;

            if (line.Length < 3)
            {
                return;
            }
            char c0 = line[0];
            char c1 = line[1];

            VCItemStatus s = VCItemStatus.Added;

            if (c0 == '?')
            {
                s = VCItemStatus.Unknown;
            }
            else if (c0 == '!')
            {
                s = VCItemStatus.Missing;
            }
            else if (c0 == 'A')
            {
                s = VCItemStatus.Added;
            }
            else if (c0 == 'C')
            {
                s = VCItemStatus.UpToDate;                 // clean == UpToDate
            }
            else if (c0 == 'I')
            {
                s = VCItemStatus.Ignored;
            }
            else if (c0 == 'M' || c1 == 'M')
            {
                s = VCItemStatus.Modified;
            }
            else if (c0 == 'R' || c1 == 'R')
            {
                s = VCItemStatus.Deleted;
            }

            if (s == VCItemStatus.Unknown)
            {
                return;
            }
            int p = line.IndexOf(" ");

            if (p > 0)
            {
                line = line.Substring(p + 1);
            }
            else
            {
                line = line.Substring(fileIndex);
            }
            temp.MapPath(line, s);
        }
示例#2
0
        public StatusNode Get(string path)
        {
            StatusNode found = root.FindPath(path);

            if (found == null)
            {
                foreach (IgnoreEntry ignore in ignores)
                {
                    if ((ignore.path == "" || path.StartsWith(ignore.path)) && ignore.regex.IsMatch(path))
                    {
                        found = root.MapPath(path.Substring(ignore.path.Length), VCItemStatus.Ignored);
                        return(found);
                    }
                }
                found = new StatusNode(Path.GetFileName(path), VCItemStatus.Unknown);
            }
            return(found);
        }