I tried with the below code
TFSTeamProjectCollection tpc =
new TFSTeamProjectCollection(URIUtils.newURI(COLLECTION_URL), credentials );
VersionControlClient srcctrl = tpc.getVersionControlClient();
Changeset[] chngset;
try {
chngset = srcctrl.queryHistory("http://******/tfs/SpectaTestCollection/", LatestVersionSpec.INSTANCE, 0, RecursionType.FULL, null, new DateVersionSpec("6/10/2014"), LatestVersionSpec.INSTANCE, Integer.MAX_VALUE, false, true, false, true);
for(Changeset ch : chngset)
{
System.out.println("Change Set ID : "+ ch.getChangesetID());
System.out.println("Owner : "+ ch.getOwner());
}
} catch (ServerPathFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
But eveytime getting this error : There is no working folder mapping for D:\WorkSpace\test-workspace\tfsplay.game\http:********\tfs\SpectaTestCollection.
where "D:\WorkSpace\test -workspace\tfsplay.game" is my local workspace.
can anyone help me in guiding to the right way for doing this
Don't pass a URL to the queryHistory method, pass a server path or a local path.
You're getting this error because you have passed a path that is not a server path (does not start with $/), so the system is trying to understand what server path you have mapped to http://...etc. Since that URL is also not a local path, you have gotten that error.
If you want to see all history, pass the server path $/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With