Frage

I am using TFS every where on CentOS and I want to run a service to listen on directory modifying this directory represent TFS local folder and for every (add or modify) it mirroring to TFS

I tried to use inotifywait and listen to event create,modify but I confusion when adding directory, when adding a directory 'ssss'

output:

/tfs_loacl_folder/business_layer/ CREATE,ISDIR ssss
/tfs_loacl_folder/business_layer/ssss/ CREATE 1
/tfs_loacl_folder/business_layer/ssss/ MODIFY 1
/tfs_loacl_folder/business_layer/ssss/ CREATE www
/tfs_loacl_folder/business_layer/ssss/ MODIFY www
/tfs_loacl_folder/business_layer/ssss/ CREATE 112
/tfs_loacl_folder/business_layer/ssss/ MODIFY 112
/tfs_loacl_folder/business_layer/ssss/ CREATE asd
War es hilfreich?

Lösung

It sounds like you're trying to avoid having to explicitly checkout files when you change them. Team Foundation Version Control has this functionality already.

Team Foundation Version Control operates in two modes:

  1. Checkout / edit / checkin, where you need to explicitly checkout a file for edit before changing the contents. The file is even marked read-only (0444) until you run tf checkout <filename>.

  2. Edit / merge / commit, where you can edit a file at any time, and running tf status will examine your local filesystem for changes and mark each change as an edit.

The latter is called "local workspaces", and can be enabled by passing the -location:local flag to tf when creating the workspace. For example:

tf workspace -new Workspace01 -location:local -collection:https://tfs.visualstudio.com/DefaultCollection

After that, you can edit files without needing to pend the changes explicitly.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top