Where is the delete repository button? - plasticscm

Logging into plastic scm I don't see a way to delete my repository, am I missing something?

In the Plastic GUI (repositories list) you can right-click on a repository and delete it.
You can also use the cm repository delete --help command.

Related

Git-tfs Clone: Option to not create temporary workspace (or specify existing permanent workspace)?

How might I run git tfs clone without permissions to create a temporary workspace--or, alternatively, specify an existing permanent workspace which git tfs should not cleanup afterward?
Running command:
git tfs clone --branches=all http://tfs:8080/tfs/DefaultTFSCollection "$/Project"
Error:
TF14044: User {USER} needs the CreateWorkspace global permission(s).
For what it's worth, our TFS admins create workspaces (same as %COMPUTERNAME%). However, my user does not have permissions to create workspaces.
Have downloaded and identified the source code location which seems to perform the temporary workspace creation.
However, can I just not do so? What benefit does a temporary workspace provide?
Use case: Migrating away from TFS 2012 TFVC, to Git (Azure DevOps). So just want to clone. No future need to write back to TFS TFVC.
Thank you
No, git-tfs doesn't have this option to use an existing workspace because it would have been difficult to check if the existing workspace have been created from the good TFVC path.
And also, if you want to clone with branch support, you need to create multiple workspaces at different places so git-tfs need to handle them itself.
If you are in charge of the migration, your best chance is to ask your tfs administrators to grant you this right at least until you finish your migration.

How to show git diff in Jenkins

I have a build job in Jenkins, which is based on a git project.
Looking at the changes page for each build, I can see the commits that are new to this version, who contributed them, and the list of files modified.
What I'm missing is the option to see the actual diff - what lines of code were changed.
How can this be achieved?
I'm using a local git repo hosted on the same PC as the jenkins server
You can use Last Changes Plugin to accomplish that.
Just install it and make sure to choose from Post-build Actions drop down menu the option Publish Last Changes.

How to delete all the worskpace that are mapped to a physical folder in TFS?

I am using TFS 2013.
What would a command to Delete All the WorkSpace belonging to any Agent that is mapped to a specific folder look like?
For Example all the Workspace that are mapped to "C:\ABC\Common" should be deleted.
Want to add script as pre build Task
I would use the (free) tool TFS Sidekicks to do this. You can easily view all the workspaces for that computer/agent, and see the mappings for each one. Also you can easily delete all the relevant workspaces from the tool in a nice GUI.
http://www.attrice.info/cm/tfs/

How do you pull multiple TFS repos into a single Jenkins job?

I have a repo that has 2 subfolders $/Repo/project and $/Repo/thirdparty. I need to pull both of those into Jenkins for a single build. Naturally I tried just pulling $/Repo, but this gives me a bunch of other projects along with false polls (it will build every time ANYTHING is checked into $/Repo). I have tried using the multi-scm plugin which works, but does not save the configuration (annoying, but not unusable). I tried using the regular tfs plugin and manually putting the calls for the other repo into a windows command (this did not work even through i bound them them to different folders).
What is the best way to approach this? Some sort of subjob that pulls third party? Fix the multiple scm plugin? Is there some tfs command or trigger to pull a different repo when you pull a project?
I was able to get this working with a job pipeline. It's kinda hacky, but it works.
The program I'm trying to build uses $/Department/Framework/Main (as workspace\Framework), and $/Department/Products/TheProgram/Main (as workspace\TheProgram).
I created three jobs in Jenkins, each "downstream" of the other:
Framework-Get: normal source code triggering on TFS' Project Path of $/Department/Framework/Main. No build step.
TheProgram-Get: normal source code triggering on TFS' Product Path of $/Department/Products/TheProgram. No build step.
TheProgram-Build: No source code control. But the build steps xcopy's the source from the above two steps. Then, you can run a normal build step.
TheProgram-Build's first build step is a windows batch command:
REM ====================================
REM First Get the Framework folder:
rmdir /s/q Framework
mkdir Framework
xcopy /y /q /e ..\..\Framework-Get\Workspace\Framework Framework
REM ====================================
REM Then Get the TheProgram Folder:
rmdir /s/q TheProgram
mkdir TheProgram
xcopy /y /q /e ..\..\TheProgram-Get\Workspace\TheProgram TheProgram
The second build step was a simple call to ant. But you could use msbuild or whatever you like here.
The TFS pluging for Jenkins currently does not support checking out the sources from multiple locations. multiple-scm-plugin might be the answer, but as You pointed out in the question - it's really not an option at this point. There are really, as far I can see it, only to possible solutions for you to test out:
Create a workspace within TFS that will include all the neccesary imports. I use this functionality in my every-day encounters with TFS, although I have never a chance to use that with Jenkins plugin. It might work, it might not.
You can use, and please - this is a quite serious option, at least for me - git. There is a git-tfs and import all of the required projects into git repository. And having them in git will open a bunch of possibilities for you, including using separate repos for every folder, using git modules, git externals... and so on. So, at least for me, it is a valid option, although it seems like an ugly workaround at the first look...
The TFS plugin supports the ability to cloak folders in your $\Repo that you are not interested in. Checkins to cloaked folders will not trigger a build. Unfortunately that may be a lot of folders and you are only interested in two - you would need to maintain the list of cloaked folders as new ones are added.
We avoid the TFS plugin and instead scripted the setup of our TFS workspaces via powershell step using the tfs commandline. Each build specifies the folders it wants and the script takes care to cloak/uncloak the remainder.
My solution to this is to create two Jobs, one that just download your dependency and another to make the build.
In my case I managed the build with Maven properties, for example:
pom.xml
<properties>
<my.dir>../MyDir</wsdl.dir>
</properties>
Jenkins Build
Goals clean package -U -Dmy.dir=${WORKSPACE}/../../another-build/workspace/MyDir
I had to create a workaround myself for Jenkins. This was achieved using both TF and the powershell Snapin Microsoft.TeamFoundation.PowerShell.
Basically the workflow is as follows :
Get-TFsWorkspace (Powershell : To check for the workspace)
TF Workspace /new (To Create a workspace)
TF Workfold /unmap (use this to remove the default $/ mapping which is made during workspace creation)
TF Workfold /map (To map specific locations, ie $/Repo/project)
TF Scorch (to remove any artifacts if there are any)
TF Get (To get the code)
There may be other methods that people have, but this would allow you to use the tf Workfold /cloak functionality as well.
Cheers,
Hope this helps.
Can confirm that that Multiple SCM 0.5 works with the Team Foundation Server plug-in 4.0
The polling does seem to break however.

How to know the TFS repository to which a workspace is bound?

Is there a way to check to which repository a local is bound to ?
If you know the owner of the workspace or the computer name, you can use the tf /workspaces command to get detailed information about all the workspaces.
http://msdn.microsoft.com/en-us/library/54dkh0y3(VS.80).aspx

Resources