microsoft / azure-devops-intellij

IntelliJ IDEA plug-in for Visual Studio Team Services and Team Foundation Server (TFS)
MIT License
151 stars 94 forks source link

TFVC: Android Studio create second workspace on differenc PC #54

Open erikhubers opened 7 years ago

erikhubers commented 7 years ago

Hey there,

Yesterday I tried to create a workspace on a different PC of the same repository I had on my main machine. Unfortunately I was not able to create it because the tfs plugin was telling me there already was a workspace with the same name existing on this computer. Apparently the plugin can't differentiate between 2 workspaces on different machines. Below a screenshot with the error message, the current PC name and a lookup with TFS Sidekicks of all my workspaces stating there's a workspace with the name CC on a different machine.

My workaround was to temporarily remove the workspace on my main machine so I could create it on the secondary one. But it's far from ideal, maybe you coud take a look at it :)

image

leantk commented 7 years ago

Hi Erik,

Thanks for reaching out to us. When currently create your workspace, we name it after the directory name you chose which in this case is CC. TFVC does not allow you to create workspaces with the same name even if they are on different machines. Our error message is incorrect in stating that the existing workspace is on the current machine. To accommodate for the naming issue, we should allow you to customize the workspace name at creation instead of enforcing you use the directory name. I will add this to our backlog as an action item. I also will fix the incorrect error message text.

What you can do if you want to create that workspace again your primary machine is go Android Studio on your secondary machine and in the menu bar go to VCS -> TFVC (Preview) -> Edit Workspace. In that dialog you can change the workspace name to whatever you would like (i.e. CC-PC240W7). That will allow you to recreate the workspace on your primary machine using CC as the workspace name.

Let me know if you have any further questions and/or suggestions for us, -Leah

erikhubers commented 7 years ago

Hey leantk,

Thanks for your quick response and clear explanation of the origin of this limitation. Your workaround worked perfectly. It's a pretty good workaround for now.

Since we're on the topic of creating workspaces using Android Studio I would like to suggest another small feature. When creating a workspace in Visual Studio and adding the first mapping you get the following dialog when confirming the changes.

image

This is a pretty convenient dialog when you're creating a mapping of a very big team project with lots of branches. By pressing no, this allows you browse through the branches in the mapped team project using the source explorer and just to a 'Get-Latest' of the branch you're interested in. Maybe something like this can be implemented when creating a workspace with Android Studio as well? The workaround I'm using now to circumvent retrieving all branches when creating the workspace with Android Studio is the following:

This is a pretty big workaround, but it works. Another great option could be the ability to use an existing local workspace created by Visual Studio.

I hope I don't come across as demanding by creating several "issues". I'm just trying to supply you with some feedback :)

leantk commented 7 years ago

Hi Erik,

Thanks for that feedback! You aren't being demanding at all. We want to hear what the users want so we can make a better plugin for you so please keep the suggestions/comments/bugs coming. I was unaware of that feature in Visual Studio so I will take a closer look at it and add it as a feature request on our backlog. I'll keep this issue open as an enhancement so you can track it on your end.

Thanks again, -Leah

dmytro-i commented 7 years ago

Hi Leah,

I'd like to upvote this one. If would be great to have workspace creation experience similar to what we have in Visual Studio where you can edit the name of the workspace before you create it. Or at least append machine name or random number when generating the name.

leantk commented 7 years ago

Thanks @dmytro-ielkin for letting us know! It's still on the backlog but with votes like yours it moves up in priority.