text: public IndexRevision(IndexWriter writer){sdp = writer.Config.IndexDeletionPolicy as SnapshotDeletionPolicy;if (sdp == null)throw new ArgumentException("IndexWriter must be created with SnapshotDeletionPolicy", "writer");this.writer = writer;this.commit = sdp.Snapshot();this.version = RevisionVersion(commit);this.sourceFiles = RevisionFiles(commit);}