Inheritance: IGitTfsRemote
        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;

        }
Example #2
0
 public IEnumerable<ITfsChangeset> GetChangesets(string path, long startVersion, GitTfsRemote remote)
 {
     return TfsPlugin.Script.Changesets.Where(x => x.Id > startVersion).Select(x => BuildTfsChangeset(x, remote));
 }
Example #3
0
 public ITfsChangeset GetChangeset(int changesetId, GitTfsRemote remote)
 {
     throw new NotImplementedException();
 }
Example #4
0
 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;
 }
Example #5
0
 public ITfsChangeset GetLatestChangeset(GitTfsRemote remote)
 {
     return TfsPlugin.Script.Changesets.LastOrDefault().AndAnd(x => BuildTfsChangeset(x, remote));
 }
Example #6
0
 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));
 }
Example #7
0
 private ITfsChangeset BuildTfsChangeset(Changeset changeset, GitTfsRemote remote)
 {
     return new TfsChangeset(this, _bridge.Wrap(changeset))
     {
         Summary = new TfsChangesetInfo { ChangesetId = changeset.ChangesetId, Remote = remote }
     };
 }
Example #8
0
 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);
 }
Example #9
0
 public ITfsChangeset GetLatestChangeset(GitTfsRemote remote)
 {
     throw new NotImplementedException();
 }
Example #10
0
 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);
 }