-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of TFS repositories on self-hosted Azure Devops #8
Comments
Hi, Thanks for your feedback. TFS isn't supported at all. Self-hosted Azure DevOps Git server should be supported, that said, I haven't been able to test it otherwise than unit tests because I don't have any under the hand. I'll try to look for the TFS support. Meanwhile, can you please share an anonymous TFS repository URL that look like the one of your repository? That would help me to verify that the URL is parsed correctly. Thank you in advance 😊 |
For self-hosted Azure, the remote URL of a Git repository is : For a TFS repository, I'm not sure as my knowledge of the CLI is very poor. The Git URL above show the files of the codebase. So with the same logic, for a TFS repo, the URL might be : Good luck if you keep digging into TFS support, especially with the branch system being a total mess in my opinion 😫 Thanks! |
Thanks :) I'll try to look at this. |
Hi! We are using self-hosted Azure DevOps Server 2020 Update 1. Currently the extension (in VS2022) generates URL in form of:
But the working one is:
I think, the problem is here. Apparently it does not consider As I understand, the raw URL of the repository is taken from the .git/config file. In my .git/config file origin remote URL is exactly:
So the valid code would be: properties[Organization] = repositoryUri.Host;
properties[Collection] = repositoryUri.Segments[2].TrimEnd('/');
properties[Project] = repositoryUri.Segments[3].TrimEnd('/');
properties[Repository] = repositoryUri.Segments[5].TrimEnd('/');
properties[OrganizationUrl] = $"{repositoryUri.Scheme}://{repositoryUri.Authority}/tfs/";
properties[RepositoryUrl] = $"{properties[OrganizationUrl]}{properties[Collection]}/{properties[Project]}/_git/{properties[Repository]}/";
// or even simpler and universal
properties[RepositoryUrl] = repositoryUri.ToString() + "/"; |
Hi @dlyz , Thank you for sharing this. I still don't have a self-hosted AzDO Server and still can't verify it by myself.
@brumartins , Hi :) Would you be able to test it too by any chance? Thank you very much for your help! I really appreciate :) |
Thank you for quick response! I checked it and it works for me just fine. There is one minor remark though. Currently the file opens, but the tree view does not show current file. If I add to the string url = $"{repositoryUrl}?path=/{relativePath.TrimStart('/')}&version=GC{commitId}&lineStyle=plain"; But it should be checked for cloud AzDO, I don't know, will it work there or not. |
Thank you @dlyz ! I pushed my changes with your latest proposal and I'm currently publishing the newest extension package on the VS Marketplace :) https://marketplace.visualstudio.com/items?itemName=EtienneBAUDOUX.CopyGitLink2022 version 1.4.4 You might need to uninstall the package I sent earlier and install it again from the Extensions menu in Visual Studio to make sure you get future updates. Thank you again for your help with this ! I will keep this issue opened since it still doesn't cover TFS version control. |
Hi @veler, I've changed job and I'm no more working with a self-hosted Azure DevOps so I can't help anymore. But I can see things worked out, big thanks to both of you! 👍 |
Hello everyone 👋
Your VS extension seems to be exactly what I've been looking for... so cool to get an url pointing to a file of your code when you need to share something with a colleague! 👍
I've installed the extension, but I get no additional entry in my Windows context menu to copy the link. We have no Git but TFS repositories. Self-hosted Azure Devops. Maybe that's because (self hosted) TFS repositories are not supported?
Thank you in advance 😀
Bruno
The text was updated successfully, but these errors were encountered: