TFS gives "is already mapped in workspace" error if "Server Url" option or "Working Folders" mapping is changed.
We use following workaround for now:
Code for "Pre-execute action" of TFS checkout step:
groovy:
logger.info("Unmapping...")
// folders listed in the "Working Folders" mapping option
def inDir = new File(configuration.workspaceDir, "lcl/in")
def outDir = new File(configuration.workspaceDir, "lcl/out")
// create them as workspace might be cleaned up before
inDir.mkdirs()
outDir.mkdirs()
Please add unmapping option before checkout is made for TFS Repositories.
Though that might produce large number of detached mappings, so any other solution that removes workspace before checkout will suffice.
Description
TFS gives "is already mapped in workspace" error if "Server Url" option or "Working Folders" mapping is changed.
We use following workaround for now:
Code for "Pre-execute action" of TFS checkout step:
groovy:
logger.info("Unmapping...")
// folders listed in the "Working Folders" mapping option
def inDir = new File(configuration.workspaceDir, "lcl/in")
def outDir = new File(configuration.workspaceDir, "lcl/out")
// create them as workspace might be cleaned up before
inDir.mkdirs()
outDir.mkdirs()
//execute unmap command
logger.info("In dir: " + inDir)
util.execute("tf workfold /unmap .", inDir)
util.execute("tf workfold /unmap .", outDir)
Please add unmapping option before checkout is made for TFS Repositories.
Though that might produce large number of detached mappings, so any other solution that removes workspace before checkout will suffice.
I tested with both TEE-CLC 11.0 and tf.exe bundled with Team Explorer 2012 and didn't find any problem.
Actually, QuickBuild will recreate the workspace if "Server URL" or "Working Folder" is changed.
Please go to your configuration -> Settings -> General Setting -> Build Log Level, then change the build log level to debug, and build again, you can look through the log to see whether QuickBuild delete the workspace or not. You can send the build log to (support at pmease dot com), and please also attach some screen shots on TFS repository definition before and after.
Steve Luo[14/Nov/13 07:15 AM]
I tested with both TEE-CLC 11.0 and tf.exe bundled with Team Explorer 2012 and didn't find any problem.
Actually, QuickBuild will recreate the workspace if "Server URL" or "Working Folder" is changed.
Please go to your configuration -> Settings -> General Setting -> Build Log Level, then change the build log level to debug, and build again, you can look through the log to see whether QuickBuild delete the workspace or not. You can send the build log to (support at pmease dot com), and please also attach some screen shots on TFS repository definition before and after.
Actually, QuickBuild will recreate the workspace if "Server URL" or "Working Folder" is changed.
Please go to your configuration -> Settings -> General Setting -> Build Log Level, then change the build log level to debug, and build again, you can look through the log to see whether QuickBuild delete the workspace or not. You can send the build log to (support at pmease dot com), and please also attach some screen shots on TFS repository definition before and after.