TFS web portal: is it possible to associate / URI directly with the line number in the file?

I would like to send my employees a link directly to the line number in the file in our TFS repo. Is it possible? If so, how? We are using TFS 2015.


Currently, the best way I've found is to link to the file as follows:

HTTP [s]: // {tFS-server} [: {PORT}] / TFS / {PROJECT-ASSY} / _ versionControl # path = {path to file}

Then, Ctrl + G, enter the line number manually. Before I dig up JavaScript to find out how Ctrl + G works, I hope someone can help me.


I tried variations of this theme, but without sucecss:

HTTP [s]: // {tFS-server} [: {PORT}] / TFS / {PROJECT-ASSY} / _ versionControl # path = {path to file} # string = {LINE} p>


PS My problem is similar to this problem , but instead of Visual Studio I am looking for a link through the TFS web portal.

+5
source share
2 answers

I just heard from a guy from Microsoft that adding &line=5 should work. My local tests show that it works only for Visual Studio Team Services and does not work with TFS 2015 2. You probably have to wait for Update 3 for this feature to get into TFS.

At the same time, Javascript is simply looking for a div with the desired linenumber attribute:

 <div linenumber="5">...</div> 
+1
source

Once you select the code snippet in the VSO code editor, you can copy the link to this section (see the figure below). It looks like TFS has a pretty similar url structure, maybe it will work.

Link Structure Generated

HTTPS: // {PROJECT_URL} / _versionControl path = {FILE_PATH} & line = {SELECTION_START_LINE} & lineEnd = {SELECTION_END_LINE} & lineStartColumn = {SELECTION_START_COLUMN} & lineEndColumn = {SELECTION_END_COLUMN}


vso code editor

0
source

Source: https://habr.com/ru/post/1246251/


All Articles