~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/ngit/NGit/NGit.Revwalk/RevWalk.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
718
718
                /// <p>
719
719
                /// The commit may or may not exist in the repository. It is impossible to
720
720
                /// tell from this method's return value.
 
721
                /// <p>
 
722
                /// See
 
723
                /// <see cref="ParseHeaders(RevObject)">ParseHeaders(RevObject)</see>
 
724
                /// and
 
725
                /// <see cref="ParseBody(RevObject)">ParseBody(RevObject)</see>
 
726
                /// for loading contents.
721
727
                /// </remarks>
722
728
                /// <param name="id">name of the commit object.</param>
723
729
                /// <returns>reference to the commit object. Never null.</returns>
795
801
 
796
802
                                        default:
797
803
                                        {
798
 
                                                throw new ArgumentException(MessageFormat.Format(JGitText.Get().invalidGitType, type
799
 
                                                        ));
 
804
                                                throw new ArgumentException(MessageFormat.Format(JGitText.Get().invalidGitType, Sharpen.Extensions.ValueOf
 
805
                                                        (type)));
800
806
                                        }
801
807
                                }
802
808
                                objects.Add(r);
985
991
 
986
992
                                default:
987
993
                                {
988
 
                                        throw new ArgumentException(MessageFormat.Format(JGitText.Get().badObjectType, type
989
 
                                                ));
 
994
                                        throw new ArgumentException(MessageFormat.Format(JGitText.Get().badObjectType, Sharpen.Extensions.ValueOf
 
995
                                                (type)));
990
996
                                }
991
997
                        }
992
998
                        objects.Add(r);
1036
1042
                public virtual AsyncRevObjectQueue ParseAny<T>(Iterable<T> objectIds, bool reportMissing
1037
1043
                        ) where T:ObjectId
1038
1044
                {
1039
 
                        IList<T> need = new AList<T>();
 
1045
                        IList<ObjectId> need = new AList<ObjectId>();
1040
1046
                        IList<RevObject> have = new AList<RevObject>();
1041
1047
                        foreach (T id in objectIds)
1042
1048
                        {
1053
1059
                        Sharpen.Iterator<RevObject> objItr = have.Iterator();
1054
1060
                        if (need.IsEmpty())
1055
1061
                        {
1056
 
                                return new _AsyncRevObjectQueue_898<T>(objItr);
 
1062
                                return new _AsyncRevObjectQueue_902(objItr);
1057
1063
                        }
1058
1064
                        // In-memory only, no action required.
1059
 
                        AsyncObjectLoaderQueue<T> lItr = reader.Open(need.AsIterable(), reportMissing);
1060
 
                        return new _AsyncRevObjectQueue_914<T>(this, objItr, lItr);
 
1065
                        AsyncObjectLoaderQueue<ObjectId> lItr = reader.Open(need.AsIterable(), reportMissing);
 
1066
                        return new _AsyncRevObjectQueue_918(this, objItr, lItr);
1061
1067
                }
1062
1068
 
1063
 
                private sealed class _AsyncRevObjectQueue_898<T> : AsyncRevObjectQueue where T:ObjectId
 
1069
                private sealed class _AsyncRevObjectQueue_902 : AsyncRevObjectQueue
1064
1070
                {
1065
 
                        public _AsyncRevObjectQueue_898(Sharpen.Iterator<RevObject> objItr)
 
1071
                        public _AsyncRevObjectQueue_902(Sharpen.Iterator<RevObject> objItr)
1066
1072
                        {
1067
1073
                                this.objItr = objItr;
1068
1074
                        }
1084
1090
                        private readonly Sharpen.Iterator<RevObject> objItr;
1085
1091
                }
1086
1092
 
1087
 
                private sealed class _AsyncRevObjectQueue_914<T> : AsyncRevObjectQueue where T:ObjectId
 
1093
                private sealed class _AsyncRevObjectQueue_918 : AsyncRevObjectQueue
1088
1094
                {
1089
 
                        public _AsyncRevObjectQueue_914(RevWalk _enclosing, Sharpen.Iterator<RevObject> objItr
1090
 
                                , AsyncObjectLoaderQueue<T> lItr)
 
1095
                        public _AsyncRevObjectQueue_918(RevWalk _enclosing, Sharpen.Iterator<RevObject> objItr
 
1096
                               , AsyncObjectLoaderQueue<ObjectId> lItr)
1091
1097
                        {
1092
1098
                                this._enclosing = _enclosing;
1093
1099
                                this.objItr = objItr;
1151
1157
 
1152
1158
                        private readonly Sharpen.Iterator<RevObject> objItr;
1153
1159
 
1154
 
                        private readonly AsyncObjectLoaderQueue<T> lItr;
 
1160
                        private readonly AsyncObjectLoaderQueue<ObjectId> lItr;
1155
1161
                }
1156
1162
 
1157
1163
                /// <summary>Ensure the object's critical headers have been parsed.</summary>
1243
1249
                        if (freeFlags == 0)
1244
1250
                        {
1245
1251
                                throw new ArgumentException(MessageFormat.Format(JGitText.Get().flagsAlreadyCreated
1246
 
                                        , 32 - RESERVED_FLAGS));
 
1252
                                        , Sharpen.Extensions.ValueOf(32 - RESERVED_FLAGS)));
1247
1253
                        }
1248
1254
                        int m = Sharpen.Extensions.LowestOneBit(freeFlags);
1249
1255
                        freeFlags &= ~m;
1508
1514
                        {
1509
1515
                                throw new RevWalkException(e);
1510
1516
                        }
1511
 
                        return new _Iterator_1236(this, first);
 
1517
                        return new _Iterator_1241(this, first);
1512
1518
                }
1513
1519
 
1514
 
                private sealed class _Iterator_1236 : Sharpen.Iterator<RevCommit>
 
1520
                private sealed class _Iterator_1241 : Sharpen.Iterator<RevCommit>
1515
1521
                {
1516
 
                        public _Iterator_1236(RevWalk _enclosing, RevCommit first)
 
1522
                        public _Iterator_1241(RevWalk _enclosing, RevCommit first)
1517
1523
                        {
1518
1524
                                this._enclosing = _enclosing;
1519
1525
                                this.first = first;