import { Logger } from "../../bll/utils/logger" ; import { CvsSupportProvider } from "../cvsprovider" ; import { CvsResource } from "../../bll/entities/cvsresources/cvsresource" ; import { CheckInInfo } from "../../bll/entities/checkininfo" ; import { TfvcCommandFactory } from "./TfvcCommandFactory" ; export class TfvcProvider implements CvsSupportProvider { public constructor ( private readonly workspaceRootPath , private readonly tfvcCommandFactory ) { } public async getRequiredCheckInInfo ( ) { Logger . logDebug ( `TfsSupportProvider#getRequiredCheckinInfo: should get checkIn info` ) ; const cvsLocalResources = await this . getLocalResources ( ) ; return new CheckInInfo ( cvsLocalResources , this , this . workspaceRootPath ) ; } private async getLocalResources ( ) { return this . tfvcCommandFactory . getBriefDiffCommand ( ) . execute ( ) ; } public async commit ( checkInInfo ) { return this . tfvcCommandFactory . getTfvcCommitCommand ( checkInInfo ) . execute ( ) ; } public getRootPath ( ) { return this . workspaceRootPath ; } }