History of changesets from Git

  • Thread starter Thread starter Viren23
  • Start date Start date
V

Viren23

Guest
Hi,

Recently we have migrated from TFS source control to TFS git. And we have an application where we get all the changeset details from TFS using the below code.


var project= new TfsTeamProjectCollection(new Uri("Our TFS location"));
project.EnsureAuthenticated();


VersionControlServer vcs = (VersionControlServer)project.GetService(typeof(VersionControlServer));

string Path = "Path of the project";

var history = vcs.QueryHistory(path, LatestVersionSpec.Instance,
0, RecursionType.Full, null,
new DateVersionSpec(DateTime.Now - TimeSpan.FromDays(7)),
LatestVersionSpec.Instance, Int32.MaxValue, false, false);

The code above was working fine. But now we have migrated to TFS Git and so the above code doesn't work as we have migrated our code base from TFS to Git. We are still using the same TFS location, it's just that earlier we had the project path something like $/ABC/Path but with Git we don't get this path.

Can you please let me know how can i get the history from Git and if there is any other api which i can use to get the history from Git.

Regards,

Viren

Continue reading...
 
Back
Top