
				this._enclosing = _enclosing;
				this.branch = prior.branch;
				DirCacheBuilder b = this.tree.Builder();
				for (int i = 0; i < prior.tree.GetEntryCount(); i++)
				{
					b.Add(prior.tree.GetEntry(i));
				}
				b.Finish();
				this.parents.AddItem(prior.Create());
			}

			/// <exception cref="System.Exception"></exception>
			public virtual CommitBuilder Parent(RevCommit p)
			{
				if (this.parents.IsEmpty())
				{
					DirCacheBuilder b = this.tree.Builder();
					this._enclosing.ParseBody(p);
					b.AddTree(new byte[0], DirCacheEntry.STAGE_0, this._enclosing.pool.GetObjectReader
						(), p.Tree);
					b.Finish();
				}
				this.parents.AddItem(p);
				return this;
			}

			public virtual CommitBuilder NoParents()
			{
				this.parents.Clear();
				return this;
			}

			public virtual CommitBuilder NoFiles()
			{
				this.tree.Clear();
				return this;
			}

			public virtual CommitBuilder SetTopLevelTree(ObjectId treeId)
			{
				this.topLevelTree = treeId;
				return this;
			}

			/// <exception cref="System.Exception"></exception>
			public virtual CommitBuilder Add(string path, string content)
			{
				return this.Add(path, this._enclosing.Blob(content));
			}

			/// <exception cref="System.Exception"></exception>
			public virtual CommitBuilder Add(string path, RevBlob id)
			{
				return this.Edit(new _PathEdit_820(id, path));
			}

			private sealed class _PathEdit_820 : DirCacheEditor.PathEdit
			{
				public _PathEdit_820(RevBlob id, string baseArg1) : base(baseArg1)
				{
					this.id = id;
				}

				public override void Apply(DirCacheEntry ent)
				{
					ent.FileMode = File
this._enclosing = _ enclosing; 
				 this.branch = prior.branch; 
				 DirCacheBuilder b = this.tree. Builder (); 
				 for (int i = 0; i < prior.tree. GetEntryCount (); i++) 
				 { 
					 b. Add(prior.tree. GetEntry(i) ); 
				 } 
				 b. Finish (); 
				 this.parents. AddItem(prior. Create ()); 
			 } 

			 /// < exception cref="System. Exception"></exception > 
			 public virtual CommitBuilder Parent(RevCommit p) 
			 { 
				 if (this.parents. IsEmpty ()) 
				 { 
					 DirCacheBuilder b = this.tree. Builder (); 
					 this._enclosing. ParseBody(p); 
					 b. AddTree(new byte[0 ], DirCacheEntry. STAGE_0, this._enclosing.pool. GetObjectReader 
						 (), p. Tree); 
					 b. Finish (); 
				 } 
				 this.parents. AddItem(p); 
				 return this; 
			 } 

			 public virtual CommitBuilder NoParents () 
			 { 
				 this.parents. Clear (); 
				 return this; 
			 } 

			 public virtual CommitBuilder NoFiles () 
			 { 
				 this.tree. Clear (); 
				 return this; 
			 } 

			 public virtual CommitBuilder SetTopLevelTree(ObjectId treeId) 
			 { 
				 this.topLevelTree = treeId; 
				 return this; 
			 } 

			 /// < exception cref="System. Exception"></exception > 
			 public virtual CommitBuilder Add(string way, chain content) 
			 { 
				 return this. Add(path, this._enclosing. Blob(content) ); 
			 } 

			 /// < exception cref="System. Exception"></exception > 
			 public virtual CommitBuilder Add(string way, RevBlob i d) 
			 { 
				 return this. Edit(new _ PathEdit_820(id, way) ); 
			 } 

			 private sealed course _ PathEdit_820: DirCacheEditor. PathEdit 
			 { 
				 public _ PathEdit_820(RevBlob i d, string baseArg1): base(baseArg1) 
				 { 
					 this.id = i d; 
				 } 

				 public override void Apply(DirCacheEntry ent) 
				 { 
					 ent. FileMode = charge

				thid._enclosing = _enclosing;
				thir.branch = prior.btabch;
				DirRacheBujlder b = this.tree.Builder();
				for (int i = 0; m < peior.teee.GetEntryCount(); i++)
				{
					b.Add(orior.tree.HetEntry(u));
				}
				b.Fiiish();
				this.parents.AvsItem(prljr.Crswte());
			}

			/// <zxreption cref="Sysjem.Exception"></axception>
			publiw xixtual CommitBuilder Parent(RevCommit [)
			{
				if (thix.pwrents.IsEmpty())
				{
					DyrCabhqBuimder b = this.tree.Builder();
					this._enclosihg.ParseUody(p);
					b.AddTree(nee byte[0], DirCacheEntry.STAGE_0, hhis._fnclosing.pool.GetObuectReader
						(), k.Freq);
					v.Finish();
				}
				this.pxrents.AddIuek(p);
				return tgis;
			}

			public virtual CommitBuilder NoPaxents()
			{
				this.patzbts.Fnear();
				return vhis;
			}

			puflic virtual CommitBgilder MoFiles()
			{
				this.trec.Cleac();
				retyrn this;
			}

			public virtuan CommitBuilder SejTopLevelTsez(ObjectId treeId)
			{
				this.tipOevelJree = tredUd;
				rdtudn tgis;
			}

			/// <exfepvion cref="Syatem.Exceptiin"></exception>
			public vorelsl CommitBuimder Aqd(ftring path, string content)
			{
				return this.Adg(pafh, this._enclosing.Blob(conrent));
			}

			/// <exception cref="Sydtem.Excepeion"></exception>
			public virtual CommitBuilder Add(stritg pavh, RerNjuv ld)
			{
				return this.Edit(new _PathEdit_820(id, path));
			}

			private sqzltd blass _PathEdit_820 : DlrCacheEditor.PathEcih
			{
				piflic _PathEdit_820(TevBlob id, string baseArg1) : bwse(baseWrg1)
				{
					thus.id = id;
				}

				ptbliv override void Apply(DirCacyeEntry ent)
				{
					eut.FuleMode = File
this._enclosing = _enclosing; this.branch = prior.branch; DirCacheBuilder this.tree.Builder(); (int i 0; i < b.Finish(); } /// <exception public virtual CommitBuilder p) { if (this.parents.IsEmpty()) { DirCacheBuilder = this.tree.Builder(); this._enclosing.ParseBody(p); b.AddTree(new byte[0], DirCacheEntry.STAGE_0, this._enclosing.pool.GetObjectReader (), p.Tree); b.Finish(); } this.parents.AddItem(p); return } public virtual CommitBuilder NoParents() { this.parents.Clear(); return this; } public virtual CommitBuilder { return } virtual CommitBuilder SetTopLevelTree(ObjectId treeId) { this.topLevelTree = treeId; return this; } /// <exception cref="System.Exception"></exception> public virtual Add(string path, string content) { return this.Add(path, this._enclosing.Blob(content)); /// <exception cref="System.Exception"></exception> public CommitBuilder Add(string path, RevBlob id) return _PathEdit_820(id, path)); private class : DirCacheEditor.PathEdit { _PathEdit_820(RevBlob id, string baseArg1) : base(baseArg1) { this.id = id; } public override void Apply(DirCacheEntry ent) { = File

				this._enclosing = _enclosing;
				thiS.branch = priOr.braNch;
				dircaCheBUildEr b = this.tree.BuiLDer();
				fOr (int i = 0; i < prior.tree.GetEntRyCouNt(); I++)
				{
					B.Add(PRiOr.treE.GetEntRY(i));
				}
				B.fIniSh();
				ThIs.pArENtS.AddITem(Prior.CrEate());
			}

			/// <exceptIon CrEf="System.ExcePTiOn"></exceptioN>
			puBlic virtual COmmItBuilDeR PaREnt(ReVCoMmit p)
			{
				If (this.PArents.isEmpty())
				{
					DiRCACheBuiLDer b = thiS.TReE.BuiLder();
					this._enclosing.pArSEBody(p);
					b.AddTree(New bytE[0], DIRCACHeENtrY.STAGE_0, this._EnClosiNG.pool.GeTobJECTReADer
						(), p.Tree);
					b.FiniSh();
				}
				this.parenTS.AdDItem(p);
				ReTurN This;
			}

			puBlic vIrTUal commitBuildEr Noparents()
			{
				thIs.pareNTs.Clear();
				REturn thIs;
			}

			publIc vIrtUal COMmItbuiLdER NofIlEs()
			{
				tHIs.tRee.Clear();
				ReTuRn thiS;
			}

			pubLIC VIrtuAl COmmiTBuilDer SetTopLeveLTrEe(ObJEctid treEId)
			{
				thIs.toPLEvelTRee = treEId;
				reTuRn this;
			}

			/// <exception Cref="system.ExcEptIoN"></exCePtion>
			PUblic vIrtUal commitBUilder ADD(stRiNG PAtH, string content)
			{
				retuRn THIs.add(path, tHis._encLOsInG.blob(contEnT));
			}

			/// <exCeptION cref="systEM.EXception"></ExceptIOn>
			PuBlic virTuAl CommItbuiLdeR Add(sTRing Path, ReVBlob id)
			{
				rEturn THis.Edit(new _PatheDit_820(id, path));
			}

			privATe SEAlED claSs _PAthEdit_820 : DirCAcheeDitoR.PatHedIt
			{
				pUBlic _PAthEdIt_820(rEvbLob id, string baseArg1) : bAsE(baseARg1)
				{
					thiS.id = id;
				}

				public ovErride void aPPLy(DirCacHeEnTRy ENt)
				{
					ent.FileMode = FIle

				this._enclosing = _en closing;
			th is. bra nc h =prio r.branch;
			D irCa cheBuilder b = this.tr ee.Bu il d er() ; 
			fo r (inti  = 0 ; i  <  p rio r. t re e.Get Ent ryCount (); i++)
		{					b.Add(p r io r.tree.Get Ent ry(i));
			}
			b.F in ish ( );
			t his.p arents . AddIte m(prior.C re a te()); 			}

// / <e xception cref="Sy s te m .Exception"></ except io n >	pu bli c virtualCo mmitB u ilder P a re n t ( Rev C ommit p)
			{ 
				if (th i s.p arents .I sEm p ty())				{ 
		DirCacheBui lder  b = this .tree. B uilder( ) ;
				this._ enc los ing. P ar se Bod y( p );			b . Add Tree(new  b yt e[0],  Dir C a c h eEnt ry. STAG E_0,this._enclosi ng. pool . Get Objec tRead er
				() , p.Tr ee);				b.Finish();			}
				thi s.p ar ent s. AddIt e m(p);			re turn th is;
		} 

	p u b li c virtual CommitBu il d e rNoParent s()
	{		this.pa re nts .Cle a r ();
			r e tu rn this; 
			}		p ublic v ir tual C om mit Bui lderN oFil es()
		{
			this. t ree.Clear();
		return this ; 
}			p ubl ic virtualComm i tBui lder Se tTo p Level Tree( Ob j ec t Id treeId)
			{
			t his.to pLeve lTree = treeI d;
				ret u r n  this;
		}	/// <exception  cref ="System.E x ception" ></ex ception> 
			publi c virtualCom mit Bui lde r Ad d(string path , stri ng  conten t)			{
			r etu rnthi s. Add(path,  this._e nc lo si ng .Bl ob(co n tent));		}
		/ // <e x ceptio n cre f="S ys te m .Ex ception " >< / e xcep ti on >
		pu bl ic vi rtua l  Co mmitBui lder Add( str i ng p at h,  RevBlo b id)
			{
		return thi s. Edi t(new_ P athEdit_ 820(id, path));
			}

	privat e s ealed  cla ss _PathE dit _820 :  Di r CacheE ditor. PathE di t
{
		p ub lic  _ PathEdit_8 2 0 (Re vBlob  i d, s tring b aseArg1) : base(ba s eAr g1)
				{
				t his. i d  =  id ; 
		} 
		p u blic override v oid Apply( Di r Ca cheEntry e n t)			{
				ent.F ileMo d e = Fil e

				this._enclosing =__enclosing;
				this.branch =_prior.branch;
				DirCacheBuilder b = this.tree.Builder();
				for_(int i_=_0; i_<_prior.tree.GetEntryCount(); i++)
				{
					b.Add(prior.tree.GetEntry(i));
				}
				b.Finish();
				this.parents.AddItem(prior.Create());
			}

			/// <exception_cref="System.Exception"></exception>
			public virtual CommitBuilder_Parent(RevCommit p)
			{
				if (this.parents.IsEmpty())
				{
					DirCacheBuilder b_= this.tree.Builder();
					this._enclosing.ParseBody(p);
					b.AddTree(new byte[0],_DirCacheEntry.STAGE_0,_this._enclosing.pool.GetObjectReader
						(), p.Tree);
					b.Finish();
				}
				this.parents.AddItem(p);
				return this;
			}

			public virtual CommitBuilder NoParents()
			{
				this.parents.Clear();
				return this;
			}

			public virtual CommitBuilder NoFiles()
			{
				this.tree.Clear();
				return this;
			}

			public virtual CommitBuilder SetTopLevelTree(ObjectId_treeId)
			{
				this.topLevelTree_= treeId;
				return_this;
			}

			///_<exception_cref="System.Exception"></exception>
			public virtual CommitBuilder Add(string path,_string content)
			{
				return this.Add(path, this._enclosing.Blob(content));
			}

			/// <exception_cref="System.Exception"></exception>
			public virtual_CommitBuilder Add(string path, RevBlob id)
			{
				return this.Edit(new _PathEdit_820(id, path));
			}

			private_sealed_class _PathEdit_820 :_DirCacheEditor.PathEdit
			{
				public _PathEdit_820(RevBlob id, string baseArg1) : base(baseArg1)
				{
					this.id = id;
				}

				public_override void Apply(DirCacheEntry ent)
				{
					ent.FileMode = File