public int FindMergeChangesetParent(string path, long firstChangeset, GitTfsRemote remote) { var firstChangesetOfBranch = _script.Changesets.FirstOrDefault(c => c.IsMergeChangeset && c.MergeChangesetDatas.MergeIntoBranch == path && c.MergeChangesetDatas.BeforeMergeChangesetId < firstChangeset); if (firstChangesetOfBranch != null) return firstChangesetOfBranch.MergeChangesetDatas.BeforeMergeChangesetId; return -1; }
public IEnumerable<ITfsChangeset> GetChangesets(string path, long startVersion, GitTfsRemote remote) { return TfsPlugin.Script.Changesets.Where(x => x.Id > startVersion).Select(x => BuildTfsChangeset(x, remote)); }
public ITfsChangeset GetChangeset(int changesetId, GitTfsRemote remote) { throw new NotImplementedException(); }
private ITfsChangeset BuildTfsChangeset(ScriptedChangeset changeset, GitTfsRemote remote) { var tfsChangeset = _container.With<ITfsHelper>(this).With<IChangeset>(new Changeset(changeset)).GetInstance<TfsChangeset>(); tfsChangeset.Summary = new TfsChangesetInfo { ChangesetId = changeset.Id, Remote = remote }; return tfsChangeset; }
public ITfsChangeset GetLatestChangeset(GitTfsRemote remote) { return TfsPlugin.Script.Changesets.LastOrDefault().AndAnd(x => BuildTfsChangeset(x, remote)); }
public IEnumerable<ITfsChangeset> GetChangesets(string path, long startVersion, GitTfsRemote remote) { var changesets = VersionControl.QueryHistory(path, VersionSpec.Latest, 0, RecursionType.Full, null, new ChangesetVersionSpec((int)startVersion), VersionSpec.Latest, int.MaxValue, true, true, true); return changesets.Cast<Changeset>().Select(changeset => BuildTfsChangeset(changeset, remote)); }
private ITfsChangeset BuildTfsChangeset(Changeset changeset, GitTfsRemote remote) { return new TfsChangeset(this, _bridge.Wrap(changeset)) { Summary = new TfsChangesetInfo { ChangesetId = changeset.ChangesetId, Remote = remote } }; }
public ITfsChangeset GetLatestChangeset(GitTfsRemote remote) { var history = VersionControl.QueryHistory(remote.TfsRepositoryPath, VersionSpec.Latest, 0, RecursionType.Full, null, null, VersionSpec.Latest, 1, true, false, false); return BuildTfsChangeset(history.Cast<Changeset>().Single(), remote); }
public ITfsChangeset GetLatestChangeset(GitTfsRemote remote) { throw new NotImplementedException(); }
public IEnumerable<ITfsChangeset> GetChangesets(string path, long startVersion, GitTfsRemote remote) { throw new NotImplementedException(); }
public override int FindMergeChangesetParent(string path, long firstChangeset, GitTfsRemote remote) { return VersionControl.QueryMerges(null, null, new ItemSpec(path, RecursionType.Full), LatestVersionSpec.Latest, null, new ChangesetVersionSpec((int)firstChangeset)).Max(x => x.SourceVersion); }