-
Notifications
You must be signed in to change notification settings - Fork 447
TFSVC is listing all changes from the tfs workspace not the current visual studio code workspa #179
Comments
Yeah it would be nice if change/add/deletes were isolated to the current vscode dir. |
I believe this is the same issue (or similar) to @175. Can either of you turn on logging and make the log available here? When we initialize TFVC, we use workspace.rootPath (the open folder in VS Code) and the debug log should contain a line similar to |
This is the log :
The status is showing 99+ changes in VSCode But :
Note: the error access is the same as defect #172 |
I don't think this is the same issue as #175 :. |
Hi everyone. So I've been thinking about this for a bit (and spoke with a few TFVC experts) and I'm not sure if I'll make any changes in this area. Read on! 😉 A TFVC workspace is the container for all of the work that should be grouped together (think of it like the contents of a Git repository). Now if I open a sub-folder of a Git repository in VS Code and I've made changes at a folder that's higher up (that is, one I didn't explicitly open), the Git SCM still shows those files. It doesn't only show the files modified for the folder that I've got open. I believe that's the same behavior as what the TFVC support is currently showing (as indicated by this issue and by @MindGirl in #175). Granted, in Git, there's currently not functionality that allows you to 'cloak' a part of the repository (it's one dependent grouping of files). A TFVC workspace is considered to be the same (although I understand you can look at it, and use it, differently). So, to support this scenario with the current extension, you'd need to create multiple workspaces (one for each project). But who wants to do that? 😄 I understand the desire not to have to create individual workspaces which is why I haven't said I won't ever provide that support. Still considering. Thoughts? |
As @fforjan mentioned in the first message, when adding the VS Code workspace root path to the I cloned the code, made some tests and got following results:
For the
Now only the changes relative to the workspace root folder (VS code) are shown as pending changes. @jeffyoung Do you think you can add this?
|
It's certainly possible @MindGirl and @fforjan. I'll mark it as an enhancement and see what the effect might be to the extension. As @fforjan mentioned, I'd need a VS Code setting to control it and would likely want to make sure I could scope any of the Build and WIT features (including running commands provided by the extension) to the folder ('team project') opened in VS Code. I imagine the TEE CLC would work fine too but would have to make sure that was the case. |
Let me know if you need any beta testing, as #172 is closed, I can know access TFS :) |
Hi everyone. I've been working on some changes that would enable this scenario. I've attached a private drop that I'd appreciate some testing on. First, you need to uninstall the current extension and then side-load this VSIX. After downloading the ZIP file, you'll need to rename it by dropping the .ZIP extension. Then, after selecting the After installing the extension, you'll need to set the I tried it with the tf.exe that comes with VS2017 Professional and also TEE CLC 114 (which behaves differently than tf.exe; as @MindGirl mentioned before tf.exe returns just the single mapping when workfold is provided a local_path, the CLC still returns all of the mappings in the workspace effectively ignoring the local_path). |
I tried the private build, but got the error 'Cannot read property 'serverPath' of undefined' after enabling restrictWorkspace. With the help of some printf-Debugging I was able to track it down to the FindWorkspace command:
should be
After fixing this in the JavaScript file, the extension was able to find the correct team project and the only changes below the workspace root are detected. Thank you for looking into this issue. |
Thanks for debugging @MindGirl! 😄 I've attached an updated version here for anyone else who wants to give it a try (in my limited testing, I tested with the 1st and 3rd project out of 4 😉). |
Seems to be working for me :) |
(small notes, I don't want to raise a defect for this but when you get 5 minutes):
Do you mind to use repositoryFolder and repositoryRemoveUrl instead of gitFolder and gitRemoteUrl in the log ? I was surprised to see git reference while using TFSVC ;) |
Thanks for the feedback @fforjan. I'll make those quick changes in the logs too. |
I just published 1.117.0 that contains this fix (hopefully it'll keep working like the private builds I provided here). 😄 And if you all are up for it, I'd appreciate a review over at the Marketplace (it seems I've received some unpleasant ones for not having TFVC support in the past). Thanks for your continued feedback! |
First time I'm using VS Code and im facing some problems like whatever im creating component or module through integrated terminal is not coming in the pending changes. So cant able to checkin. Please help me on this to get resolve asap. Also please let me know if you need more informations. |
My TFS workspace has plenty of changes.
The status displayed in visual studio code is the status of the TFS workspace which is a bit useless.
It should be displaying the current visual studio code workspace status.
Note:
I'm using the proper status with this command line
tf.exe status -noprompt -format:detailed -recursive C:\Path\to\my\vscode\workspace
The text was updated successfully, but these errors were encountered: