Ryan Schmidt wrote on Tue, Apr 23, 2013 at 16:52:10 -0500:
>
> On Apr 23, 2013, at 15:56, Daniel Shahaf wrote:
> > Ryan Schmidt wrote on Tue, Apr 23, 2013 at 01:45:49 -0500:
> >> 3. If you want the actual source code in the repository to contain
> >> these comments, then you're talking about several scripts: one that
> >> the developers must invoke in place of "svn commit" to commit their
> >> work, which transforms their files in the ways you desire before
> >> committing them, and another that runs as a pre-commit hook and
> >> verifies that the incoming commit conforms to these requirements (and
> >> rejects the commit if not).
> >
> > Or, more simply, developers run 'commit' normally and a post-commit hook
> > appends the blame-comments.
>
> Appends the blame-comments to what? Certainly not to the file in the
> repository because by post-commit time the commit is already
> finalized. And you wouldn't want to modify the transaction in the
> pre-commit hook because that would screw up working copies. Are you
> suggesting the server should make a second commit after every commit
> to add the blame-comments? That would totally mess up normal use of
> "svn blame", among the other usual problems.
Actually, that's exactly what I was suggesting. And I'm well-aware of
the fact that it would break normal 'blame', but considering the feature
that post-commit hook would be implementing I don't consider it that
much of a problem (not to mention that simply moving the comment to be
_above_ rather than _at the end_ of the line it describes addresses that
concern).
*shrug*
Another option is to have a "shadow" repository --- basically, like
an svnsync mirror, except that each slave file is 'svn blame -v' of the
source file rather than 'cat' of the source file.
Maybe there are other solutions, but there's a limit to how much I'm
willing to think about this particular requirement in my spare time.
Received on 2013-04-24 01:56:11 CEST