Inheritance: IGitTfsRemote
Esempio n. 1
0
        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;

        }
Esempio n. 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));
 }
Esempio n. 3
0
 public ITfsChangeset GetChangeset(int changesetId, GitTfsRemote remote)
 {
     throw new NotImplementedException();
 }
Esempio n. 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;
 }
Esempio n. 5
0
 public ITfsChangeset GetLatestChangeset(GitTfsRemote remote)
 {
     return TfsPlugin.Script.Changesets.LastOrDefault().AndAnd(x => BuildTfsChangeset(x, remote));
 }
Esempio n. 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));
 }
Esempio n. 7
0
 private ITfsChangeset BuildTfsChangeset(Changeset changeset, GitTfsRemote remote)
 {
     return new TfsChangeset(this, _bridge.Wrap(changeset))
     {
         Summary = new TfsChangesetInfo { ChangesetId = changeset.ChangesetId, Remote = remote }
     };
 }
Esempio n. 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);
 }
Esempio n. 9
0
 public ITfsChangeset GetLatestChangeset(GitTfsRemote remote)
 {
     throw new NotImplementedException();
 }
Esempio n. 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);
 }