Пример #1
0
        /// <summary>
        /// Gets a list of AnkhRevisions for the specified origin
        /// </summary>
        /// <param name="origin">The origin.</param>
        /// <returns></returns>
        public IEnumerable <AnkhRevisionType> GetRevisionTypes(Ankh.Scc.SvnOrigin origin)
        {
            Hashtable ht = new Hashtable();

            foreach (IAnkhRevisionProvider p in _providers)
            {
                foreach (AnkhRevisionType rt in p.GetRevisionTypes(origin))
                {
                    if (!ht.Contains(rt))
                    {
                        yield return(rt);
                    }

                    ht.Add(rt, rt.UniqueName);
                }
            }
        }
Пример #2
0
            public IEnumerable <AnkhRevisionType> GetRevisionTypes(Ankh.Scc.SvnOrigin origin)
            {
                if (origin == null)
                {
                    throw new ArgumentNullException("origin");
                }

                SvnPathTarget pt     = origin.Target as SvnPathTarget;
                bool          isPath = (pt != null);

                yield return(_head);

                if (isPath)
                {
                    SvnItem item = GetService <ISvnStatusCache>()[pt.FullPath];

                    if (item.IsVersioned)
                    {
                        yield return(_working);

                        yield return(_base);
                    }
                    if (item.HasCopyableHistory)
                    {
                        yield return(_committed);

                        yield return(_previous);
                    }
                    else
                    {
                        yield break;
                    }
                }

                yield return(new DateRevisionType(this, origin));

                yield return(new ExplicitRevisionType(this, origin));
            }