You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Adrian Robert <ar...@cogsci.ucsd.edu> on 2004/02/13 14:46:58 UTC

annotate support for emacs

Emacs users,

I added experimental support for 'svn annotate' to the copy of 
vc-svn.el in subversion-0.37.  (Complete file attached.)

It supports buffer colorization by converting the revision numbers into 
"fake" dates.  I couldn't find an easy way to get the real date from 
the revision number (without making a call to the repository) but the 
approach I took works reasonably well though it could use some 
fine-tuning.

I used it successfully with GNU emacs "21.3.50" (latest CVS HEAD as of 
a week or two ago).  All changes are at the end of the file, marked out 
by comments .

enjoy,
Adrian



Re: annotate support for emacs

Posted by Alexander Shopov <as...@contact.bg>.
Adrian,
As the message I got is broken, and I suppose it is my MUA to blame,
can you make your patches available on internet? Some kind of SF.net 
project, or tigris.org subproject?
As we all know emacsofilliacs are sure to use a better svn support.
Best regards:
al_shopov

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

Re: annotate support for emacs

Posted by mark benedetto king <mb...@boredom.org>.
On Fri, Feb 13, 2004 at 10:15:17AM -0600, kfogel@collab.net wrote:
> Adrian Robert <ar...@cogsci.ucsd.edu> writes:
> > > There's a 'committed-date' field for each entry in the .svn/entries
> > > file.  And it's made available via the 'svn info' command:
> > 
> > This doesn't help that much, because what is needed is the date for
> > *every* revision reported in the annotate output (which is every
> > revision for which there was a change to that file).
> 
> Ah, of course, sorry.
> 
> Hmmm... Interestingly enough, 'svn_client_blame_receiver_t' in
> svn_client.h does include the date of the revision in its interface.
> I would have thought that 'svn blame -v' would show the date, but it
> turns out blame doesn't take -v yet.  It really ought to in some near
> future release; the information is there, no point keeping it hidden
> from the user!
> 

Sorry to take so long to reply; I've been away.

At the time I thought it would make the display lines too long, and I
figured we could always add "-v" later (which is why I included the
information in the receiver interface).

--ben


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

Re: annotate support for emacs

Posted by kf...@collab.net.
Adrian Robert <ar...@cogsci.ucsd.edu> writes:
> > There's a 'committed-date' field for each entry in the .svn/entries
> > file.  And it's made available via the 'svn info' command:
> 
> This doesn't help that much, because what is needed is the date for
> *every* revision reported in the annotate output (which is every
> revision for which there was a change to that file).

Ah, of course, sorry.

Hmmm... Interestingly enough, 'svn_client_blame_receiver_t' in
svn_client.h does include the date of the revision in its interface.
I would have thought that 'svn blame -v' would show the date, but it
turns out blame doesn't take -v yet.  It really ought to in some near
future release; the information is there, no point keeping it hidden
from the user!



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

Re: annotate support for emacs

Posted by "C. Michael Pilato" <cm...@collab.net>.
Adrian Robert <ar...@cogsci.ucsd.edu> writes:

> >
> > There's a 'committed-date' field for each entry in the .svn/entries
> > file.  And it's made available via the 'svn info' command:
> 
> This doesn't help that much, because what is needed is the date for
> *every* revision reported in the annotate output (which is every
> revision for which there was a change to that file).

svn propget --revprop -r ${REV} svn:date ?  

Yes, that's gonna be alot of network turnarounds, which is said
considering we've already fetched this data as part of the 'svn blame'
process (it comes back though the blame callback with the author,
revision, et al).

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

Re: annotate support for emacs

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Fri, 2004-02-13 at 10:55, Adrian Robert wrote:
> >
> > There's a 'committed-date' field for each entry in the .svn/entries
> > file.  And it's made available via the 'svn info' command:
> 
> This doesn't help that much, because what is needed is the date for 
> *every* revision reported in the annotate output (which is every 
> revision for which there was a change to that file).

Seems to me that this should be filed as a post-1.0 enhancement request
to blame.

-Fitz


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

Re: annotate support for emacs

Posted by kf...@collab.net.
Adrian Robert <ar...@cogsci.ucsd.edu> writes:
> > There's a 'committed-date' field for each entry in the .svn/entries
> > file.  And it's made available via the 'svn info' command:
> 
> This doesn't help that much, because what is needed is the date for
> *every* revision reported in the annotate output (which is every
> revision for which there was a change to that file).

Ah, of course, sorry.

Hmmm... Interestingly enough, 'svn_client_blame_receiver_t' in
svn_client.h does include the date of the revision in its interface.
I would have thought that 'svn blame -v' would show the date, but it
turns out blame doesn't take -v yet.  It really ought to in some near
future release; the information is there, no point keeping it hidden
from the user!



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

Re: annotate support for emacs

Posted by "C. Michael Pilato" <cm...@collab.net>.
Adrian Robert <ar...@cogsci.ucsd.edu> writes:

> >
> > There's a 'committed-date' field for each entry in the .svn/entries
> > file.  And it's made available via the 'svn info' command:
> 
> This doesn't help that much, because what is needed is the date for
> *every* revision reported in the annotate output (which is every
> revision for which there was a change to that file).

svn propget --revprop -r ${REV} svn:date ?  

Yes, that's gonna be alot of network turnarounds, which is said
considering we've already fetched this data as part of the 'svn blame'
process (it comes back though the blame callback with the author,
revision, et al).

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

Re: annotate support for emacs

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Fri, 2004-02-13 at 10:55, Adrian Robert wrote:
> >
> > There's a 'committed-date' field for each entry in the .svn/entries
> > file.  And it's made available via the 'svn info' command:
> 
> This doesn't help that much, because what is needed is the date for 
> *every* revision reported in the annotate output (which is every 
> revision for which there was a change to that file).

Seems to me that this should be filed as a post-1.0 enhancement request
to blame.

-Fitz


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

Re: annotate support for emacs

Posted by Adrian Robert <ar...@cogsci.ucsd.edu>.
> 
> There's a 'committed-date' field for each entry in the .svn/entries
> file.  And it's made available via the 'svn info' command:

This doesn't help that much, because what is needed is the date for 
*every* revision reported in the annotate output (which is every 
revision for which there was a change to that file).



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

Re: annotate support for emacs

Posted by Adrian Robert <ar...@cogsci.ucsd.edu>.
> 
> There's a 'committed-date' field for each entry in the .svn/entries
> file.  And it's made available via the 'svn info' command:

This doesn't help that much, because what is needed is the date for 
*every* revision reported in the annotate output (which is every 
revision for which there was a change to that file).



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

Re: annotate support for emacs

Posted by kf...@collab.net.
Adrian Robert <ar...@cogsci.ucsd.edu> writes:
> It supports buffer colorization by converting the revision numbers
> into "fake" dates.  I couldn't find an easy way to get the real date
> from the revision number (without making a call to the repository) but
> the approach I took works reasonably well though it could use some
> fine-tuning.

There's a 'committed-date' field for each entry in the .svn/entries
file.  And it's made available via the 'svn info' command:

   $ svn info foo.txt
   Path: foo.txt
   Name: foo.txt
   URL: http://svn.collab.net/repos/blah/blah/blah/foo.txt
   Repository UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e
   Revision: 8631
   Node Kind: file
   Schedule: normal
   Last Changed Author: jrandom
   Last Changed Rev: 8631
   Last Changed Date: 2004-02-13 10:27:29 -0600 (Fri, 13 Feb 2004)
   Text Last Updated: 2004-02-13 10:58:21 -0600 (Fri, 13 Feb 2004)
   Properties Last Updated: 2004-02-10 15:29:28 -0600 (Tue, 10 Feb 2004)
   Checksum: dd073e5721412edf2e5c827992883edf
   $ 

Does that help you?

-Karl

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

Re: annotate support for emacs

Posted by kf...@collab.net.
Adrian Robert <ar...@cogsci.ucsd.edu> writes:
> It supports buffer colorization by converting the revision numbers
> into "fake" dates.  I couldn't find an easy way to get the real date
> from the revision number (without making a call to the repository) but
> the approach I took works reasonably well though it could use some
> fine-tuning.

There's a 'committed-date' field for each entry in the .svn/entries
file.  And it's made available via the 'svn info' command:

   $ svn info foo.txt
   Path: foo.txt
   Name: foo.txt
   URL: http://svn.collab.net/repos/blah/blah/blah/foo.txt
   Repository UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e
   Revision: 8631
   Node Kind: file
   Schedule: normal
   Last Changed Author: jrandom
   Last Changed Rev: 8631
   Last Changed Date: 2004-02-13 10:27:29 -0600 (Fri, 13 Feb 2004)
   Text Last Updated: 2004-02-13 10:58:21 -0600 (Fri, 13 Feb 2004)
   Properties Last Updated: 2004-02-10 15:29:28 -0600 (Tue, 10 Feb 2004)
   Checksum: dd073e5721412edf2e5c827992883edf
   $ 

Does that help you?

-Karl

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