I'm often writing scientific papers in collaboration with other authors, using a versioning system (mercurial) to manage the writing. When one of the authors wants to add a remark, we use a slightly enhanced version of marginpar. The problem is that in order to avoid to "pollute" the source code, the remark is removed once addressed, which sometimes makes it hard to keep track of the changes (even with mercurial, since revisions are not directly related with remarks).
Hence, I was wondering if there exists a way to have "external" notes to a Latex document, that are not in the source code, but can be included at compilation, by way of either absolute reference (e.g., line 140 of file.tex) or relative (e.g., at \label{lab}).
For instance, I could the following file, in the same directory than introduction.tex:
Note 1, line 237, introduction.tex: This definition does not work in this special case
SOLVED by commit 23
Note 2,
\ref{def:test}: This definition still needs to work this special casePENDING
When compiling the file introduction.tex, I could indicate to include the previous file, which would automatically add as a marginpar the Note 2, since it's PENDING.

todonotespackage would help you : you can prefix the\todocommand with\doneonce solved. – T. Verron Dec 14 '12 at 13:59