public BranchMappingExpression(IRepositoryMappingExpression parentExp) : base(parentExp) { entity = NewBranch(null, true, false); Add(entity); entity.Commits.Add(CurrentEntity <Commit>()); }
public CommitMappingExpression(IRepositoryMappingExpression parentExp, string revision) : base(parentExp) { entity = new Commit(); entity.OrderedNumber = Queryable <Commit>().Count() + 1; entity.Revision = revision; AddEntity(); }
public static CommitMappingExpression Commit(this IRepositoryMappingExpression exp, string revision) { return(new CommitMappingExpression( exp, exp.Queryable <Commit>().Single(x => x.Revision == revision ) )); }
public BugFixMappingExpression(IRepositoryMappingExpression parentExp) : base(parentExp) { entity = new BugFix() { Commit = CurrentEntity <Commit>() }; AddEntity(); }
public ReleaseMappingExpression(IRepositoryMappingExpression parentExp, string tag) : base(parentExp) { entity = new Release() { Commit = CurrentEntity <Commit>(), Tag = tag }; AddEntity(); }
public ModificationMappingExpression(IRepositoryMappingExpression parentExp) : base(parentExp) { entity = new Modification() { Commit = CurrentEntity <Commit>(), File = CurrentEntity <ProjectFile>() }; AddEntity(); }
public BugFixMappingExpression(IRepositoryMappingExpression parentExp) : base(parentExp) { entity = new CommitAttribute() { Type = CommitAttribute.FIX, Commit = CurrentEntity <Commit>() }; Add(entity); }
public ProjectFileMappingExpression(IRepositoryMappingExpression parentExp, string filePath) : base(parentExp) { entity = new ProjectFile() { Path = filePath, AddedInCommit = CurrentEntity <Commit>() }; AddEntity(); }
public TagMappingExpression(IRepositoryMappingExpression parentExp, string title) : base(parentExp) { entity = new CommitAttribute() { Type = CommitAttribute.TAG, Data = title, Commit = CurrentEntity <Commit>() }; Add(entity); }
public CommitAttributeMappingExpression( IRepositoryMappingExpression parentExp, string type, string data) : base(parentExp) { entity = new CommitAttribute() { Type = type, Data = data, Commit = CurrentEntity <Commit>() }; Add(entity); }
public ModificationMappingExpression( IRepositoryMappingExpression parentExp, string sourseFilePath, string sourceRevision) : this(parentExp, TouchedFileAction.ADDED) { entity.SourceCommit = Get <Commit>() .Single(x => x.Revision == sourceRevision); // use DSL to make additional check that file exists in the revision entity.SourceFile = this.SelectionDSL(true) .Files().PathIs(sourseFilePath).ExistInRevision(sourceRevision).Single(); }
public ModificationMappingExpression( IRepositoryMappingExpression parentExp, TouchedFileAction action) : base(parentExp) { entity = new Modification() { Action = action, Commit = CurrentEntity <Commit>(), File = CurrentEntity <CodeFile>(), }; Add(entity); }
public CodeBlockMappingExpression(IRepositoryMappingExpression parentExp, double size) : base(parentExp) { entity = new CodeBlock() { Size = size, Modification = CurrentEntity <Modification>(), }; if (size > 0) { entity.AddedInitiallyInCommit = CurrentEntity <Commit>(); } Add(entity); }
public CodeFileMappingExpression(IRepositoryMappingExpression parentExp, string filePath) : base(parentExp) { entity = parentExp.Get <CodeFile>() .Where(f => f.Path == filePath).SingleOrDefault(); if (entity == null) { entity = new CodeFile() { Path = filePath }; Add(entity); } }
public AuthorMappingExpression( IRepositoryMappingExpression parentExp, string name) : base(parentExp) { entity = Get <Author>().SingleOrDefault(a => a.Name == name); if (entity == null) { entity = new Author() { Name = name, }; Add(entity); } entity.Commits.Add(CurrentEntity <Commit>()); }
public void MapRevision(string revision) { using (var s = data.OpenSession()) { IEnumerable <IRepositoryMappingExpression> expressions = new IRepositoryMappingExpression[] { new RepositoryMappingExpression(s) { Revision = revision } }; foreach (var mapper in mappers) { var newExpressions = mapper(expressions); if (newExpressions.Count() > 0) { expressions = newExpressions; } } s.SubmitChanges(); } }
public BranchMappingExpression( IRepositoryMappingExpression parentExp, BranchMask mask, bool subBranch) : base(parentExp) { entity = Get <Branch>() .SingleOrDefault(b => b.Mask.Data == mask.Data && b.Mask.Offset == mask.Offset); if (entity == null) { entity = NewBranch(mask, subBranch, subBranch); Add(entity); } else { if (subBranch) { entity = NewBranch(mask, true, true); Add(entity); } } entity.Commits.Add(CurrentEntity <Commit>()); }
public static CommitMappingExpression AddCommit(this IRepositoryMappingExpression exp, string revision) { return(new CommitMappingExpression(exp, revision)); }
public CommitMappingExpression(IRepositoryMappingExpression parentExp, Commit commit) : base(parentExp) { entity = commit; }
public ProjectFileMappingExpression(IRepositoryMappingExpression parentExp, ProjectFile file) : base(parentExp) { entity = file; }
public EntityMappingExpression(IRepositoryMappingExpression parentExp) { this.parentExp = parentExp; }