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

« back to all changes in this revision

Viewing changes to external/ngit/NGit/NGit.Storage.Pack/PackWriter.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:
108
108
        {
109
109
                private const int PACK_VERSION_GENERATED = 2;
110
110
 
111
 
                private static readonly IDictionary<WeakReference<NGit.Storage.Pack.PackWriter>, 
112
 
                        bool> instances = new ConcurrentHashMap<WeakReference<NGit.Storage.Pack.PackWriter
 
111
                private static readonly IDictionary<JavaWeakReference<NGit.Storage.Pack.PackWriter
 
112
                        >, bool> instances = new ConcurrentHashMap<JavaWeakReference<NGit.Storage.Pack.PackWriter
113
113
                        >, bool>();
114
114
 
115
115
                private sealed class _Iterable_150 : Iterable<NGit.Storage.Pack.PackWriter>
130
130
                                        this.it = NGit.Storage.Pack.PackWriter.instances.Keys.Iterator();
131
131
                                }
132
132
 
133
 
                                private readonly Iterator<WeakReference<NGit.Storage.Pack.PackWriter>> it;
 
133
                                private readonly Iterator<JavaWeakReference<NGit.Storage.Pack.PackWriter>> it;
134
134
 
135
135
                                private NGit.Storage.Pack.PackWriter next;
136
136
 
142
142
                                        }
143
143
                                        while (this.it.HasNext())
144
144
                                        {
145
 
                                                WeakReference<NGit.Storage.Pack.PackWriter> @ref = this.it.Next();
 
145
                                                JavaWeakReference<NGit.Storage.Pack.PackWriter> @ref = this.it.Next();
146
146
                                                this.next = @ref.Get();
147
147
                                                if (this.next != null)
148
148
                                                {
212
212
 
213
213
                private readonly PackWriter.MutableState state;
214
214
 
215
 
                private readonly WeakReference<NGit.Storage.Pack.PackWriter> selfRef;
 
215
                private readonly JavaWeakReference<NGit.Storage.Pack.PackWriter> selfRef;
216
216
 
217
217
                private PackWriter.Statistics.ObjectType typeStats;
218
218
 
338
338
                        // be paranoid by default
339
339
                        stats = new PackWriter.Statistics();
340
340
                        state = new PackWriter.MutableState(this);
341
 
                        selfRef = new WeakReference<NGit.Storage.Pack.PackWriter>(this);
 
341
                        selfRef = new JavaWeakReference<NGit.Storage.Pack.PackWriter>(this);
342
342
                        instances.Put(selfRef, true);
343
343
                }
344
344
 
1969
1969
                                        for (int i = 0; i < cmit.ParentCount; i++)
1970
1970
                                        {
1971
1971
                                                RevCommit p = cmit.GetParent(i);
1972
 
                                                if (!p.Has(added) && !p.Has(RevFlag.UNINTERESTING))
 
1972
                                                if (!p.Has(added) && !p.Has(RevFlag.UNINTERESTING) && !Exclude(p))
1973
1973
                                                {
1974
1974
                                                        p.Add(added);
1975
1975
                                                        AddObject(p, 0);
2246
2246
                                        otp.ClearReuseAsIs();
2247
2247
                                }
2248
2248
                        }
 
2249
                        otp.SetDeltaAttempted(next.WasDeltaAttempted());
2249
2250
                        otp.Select(next);
2250
2251
                }
2251
2252
 
2609
2610
                        /// <returns>formatted message string for display to clients.</returns>
2610
2611
                        public virtual string GetMessage()
2611
2612
                        {
2612
 
                                return MessageFormat.Format(JGitText.Get().packWriterStatistics, totalObjects, totalDeltas
2613
 
                                        , reusedObjects, reusedDeltas);
 
2613
                                return MessageFormat.Format(JGitText.Get().packWriterStatistics, Sharpen.Extensions.ValueOf
 
2614
                                        (totalObjects), Sharpen.Extensions.ValueOf(totalDeltas), Sharpen.Extensions.ValueOf
 
2615
                                        (reusedObjects), Sharpen.Extensions.ValueOf(reusedDeltas));
2614
2616
                        }
2615
2617
 
2616
2618
                        public Statistics()