1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #1102: Link to specific line of code in SCM Repositories

Written by tmilev the 2 Jun 12 at 20:04. Category: Source Code Mgmt. (SCM). Related project: Nothing/Others. Status: New
Hi all,

I want to be able to provide links to a specific line of code in my c++ code.
At the moment, all I can do is link to a specific file, for example

http://vectorpartition.svn.sourceforge.net/viewvc/vectorpartition/trunk/vpf7.cp p?view=markup

I would like to be able to navigate to a *specific line* in that file.

Rationale: Whenever I get errors in my program, I know the exact line of code where the error occurred. At the moment I just display the line number and a link to the file on sourceforge, meaning the user has to scroll down through several thousand lines of code to find the exact spot where the error occurred. This is tiring and inconvenient. I would like to be able to point the user to the exact place in the code.

Such a feature could save me from a lot of offline debugging time (I don't always have my programming/debugging tools at hand).

Thanks for reading this suggestion!

[Edit:] A bold after-thought: of course, this suggestion is steering in the direction of "wikify-ing" complex programming projects - imagine being able to edit code and commit directly online, from the scm page...
Tags: (none)

up equal down
Solution #1: Add tiny extra syntax to the SCM to point to specific line
Written by tmilev the 2 Jun 12 at 20:04.
Speculation about implementation difficulty:
I believe that should be an easy task. For example, transform the link

http://vectorpartition.svn.sourceforge.net/viewvc/vectorpartition/trunk/vpf7.cp p?view=markup

to something like

http://vectorpartition.svn.sourceforge.net/viewvc/vectorpartition/trunk/vpf7.cp p?view=markup&line=455

(I have added &line=455: show line 455).
You can add an anchor to the specific line (in this case line 455).

Note that this solution would disturb no pre-existing links or conventions.

Thanks for reading this suggestion!

P.S. A brave after-thought. This suggestion can be thought as a step towards "wikify-ing" a c++ project. Imagine someone could find a bug and make a one-line fix directly to the code ... :)

Propose your solution


No comments.

Post your comment
Syndicate content