Obtaining line by line history of a file

View: New views
3 Messages — Rating Filter:   Alert me  

Obtaining line by line history of a file

by mpp99tas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've spent a considerable time looking for this, so excuse me if this information is available somewhere else.

I'm trying to use SVNKit to obtain line by line revision history to a (java) file. What I want to obtain is:

 - who was the last person to alter each line and when

This is very similar to what happens in Eclipse/Subversive where you go to team->show Annotations and you get a line by line annotations of who was the last person to alter the line, when and the commit comment.

If anyone could help with this I'd be grateful

Toby

Re: Obtaining line by line history of a file

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

To get annotation for a file you may use the following method:

SVNClientManager cm = SVNClientManager.newInstance();
cm.getLogClient().doAnnotate(..., new ISVNAnnotateHandler() {
   public void handleLine(....) {
   }
   ...
});

handleLine method will be called for each line of the file with
necessary information (author, revision, etc).

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

mpp99tas wrote:

> I've spent a considerable time looking for this, so excuse me if this
> information is available somewhere else.
>
> I'm trying to use SVNKit to obtain line by line revision history to a (java)
> file. What I want to obtain is:
>
>  - who was the last person to alter each line and when
>
> This is very similar to what happens in Eclipse/Subversive where you go to
> team->show Annotations and you get a line by line annotations of who was the
> last person to alter the line, when and the commit comment.
>
> If anyone could help with this I'd be grateful
>
> Toby

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: Obtaining line by line history of a file

by Alexander Sinyushkin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
You may try this example as well:
https://wiki.svnkit.com/Annotating%20a%20file#preview

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

mpp99tas wrote:

> I've spent a considerable time looking for this, so excuse me if this
> information is available somewhere else.
>
> I'm trying to use SVNKit to obtain line by line revision history to a (java)
> file. What I want to obtain is:
>
>  - who was the last person to alter each line and when
>
> This is very similar to what happens in Eclipse/Subversive where you go to
> team->show Annotations and you get a line by line annotations of who was the
> last person to alter the line, when and the commit comment.
>
> If anyone could help with this I'd be grateful
>
> Toby

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...

LightInTheBox - Buy quality products at wholesale price!