You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Peacock <jp...@rowman.com> on 2005/03/10 18:50:56 UTC

Annotate filtering

On the Perl5 Porters list, the discussion came up on how to manage a 
large-scale whitespace-only change and still get useful annotation 
information.  One thought was to commit all whitespace-only changes with 
a specific user, then filter that users' changes out when collecting the 
annotation information.

That seemed preferable to 'svn blame --ignore-whitespace' which would 
seem to require examining the actual changes at each rev.

Can anyone think of a clever way to do this?

TIA

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Annotate filtering

Posted by John Peacock <jp...@rowman.com>.
Brian W. Fitzpatrick wrote:
> If by clever you mean "egregious hack", I can.
> 

Strangely enough, this is slightly better than my initial suggestion, 
which was to strip the trailing whitespace on the fly while converting 
from Perforce to Subversion.  It was quickly pointed out that this would 
have the slight side effect of changing the historical content of the 
repository.

Your method has the unfortunate side effect that any changes committed 
to multiple files at the same revision will no longer be associated with 
the same rev in Subversion.

I beginning to think that making 'svn diff' support the GNU 'diff -w' 
option and then have 'svn blame' use the same code is the only way this 
would ever be practical.

John, not volunteering either...

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Annotate filtering

Posted by "Brian W. Fitzpatrick" <fi...@collab.net>.
On Thu, 2005-03-10 at 13:50 -0500, John Peacock wrote:
> On the Perl5 Porters list, the discussion came up on how to manage a 
> large-scale whitespace-only change and still get useful annotation 
> information.  One thought was to commit all whitespace-only changes with 
> a specific user, then filter that users' changes out when collecting the 
> annotation information.
> 
> That seemed preferable to 'svn blame --ignore-whitespace' which would 
> seem to require examining the actual changes at each rev.
> 
> Can anyone think of a clever way to do this?

If by clever you mean "egregious hack", I can.

- First, dup your working copy and reindent all the files.

- Write a script that iterates over all the files in your working copy.

- Run blame on each file, then, starting with the first user, make all
whitespace changes to the file for lines that that user is blamed for
(by pulling each line from the duped and reindented working copy).

- Commit as that user (you'll have to do something to work out the
auth).

- Repeat until you've committed all whitespace changes to the file.

- Move on to the next file.

It's gross, and it will be slow, but it should do the trick.

-Fitz, not to be misinterpreted as volunteering for the task.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org