How to getAll the revisions the file has undergone given a workingcopypath ?

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

How to getAll the revisions the file has undergone given a workingcopypath ?

by saasira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everybody,

 Can you help me in getting  all the revisions a file has undergone , given the  file name(in the checked out directory)?

I've tried using

                            SVNClientImpl client = SVNClientImpl.newInstance();
                            Status[] statuses=null;
                            try {
       
                                       statuses = client.status(path,true,false,true,false,false);
           
                                       } catch (ClientException ce) {
                                             ce.printStackTrace();
                                            System.out.println(ce.getMessage());
                                        }
                              System.out.println(statuses.length);
          
                              for(int count=0;count<statuses.length;count++){
                                   System.out.println("Revision  : "+statuses[count].getRevisionNumber());
                                   System.out.println(" Last Changed Revision   : "+statuses[count].getLastChangedRevision().getNumber());
                                  }

But I'm always getting only one Status object,that is the latest Status object.

How to get all  revision numbers  ,corresponding authors,date,changes at those revisions?


Thanking you in advance,

--
Regards...
Samba.

Re: How to getAll the revisions the file has undergone given a workingcopypath ?

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

To get history for path or URL with SVNClient use logMessages method
instead of status one:

svnClient.logMessages(path, Revision.HEAD, revision.getInstance(0));

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

Samba wrote:

> Hello everybody,
>
>  Can you help me in getting  all the revisions a file has undergone ,
> given the  file name(in the checked out directory)?
>
> I've tried using
>
>                             SVNClientImpl client =
> SVNClientImpl.newInstance();
>                             Status[] statuses=null;
>                             try {
>        
>                                        statuses =
> client.status(path,true,false,true,false,false);
>            
>                                        } catch (ClientException ce) {
>                                              ce.printStackTrace();
>                                            
> System.out.println(ce.getMessage());
>                                         }
>                               System.out.println(statuses.length);
>          
>                               for(int
> count=0;count<statuses.length;count++){
>                                    System.out.println("Revision  :
> "+statuses[count].getRevisionNumber());
>                                    System.out.println(" Last Changed
> Revision   : "+statuses[count].getLastChangedRevision().getNumber());
>                                   }
>
> But I'm always getting only one Status object,that is the latest Status
> object.
>
> How to get all  revision numbers  ,corresponding authors,date,changes at
> those revisions?
>
>
> Thanking you in advance,
>
> --
> Regards...
> Samba.

Re: How to getAll the revisions the file has undergone given a workingcopypath ?

by saasira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thankyou  Alex,
I'll try that.

On 4/9/07, Alexander Kitaev <Alexander.Kitaev@...> wrote:
Hello,

To get history for path or URL with SVNClient use logMessages method
instead of status one:

svnClient.logMessages(path, Revision.HEAD, revision.getInstance(0));

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

Samba wrote:

> Hello everybody,
>
>  Can you help me in getting  all the revisions a file has undergone ,
> given the  file name(in the checked out directory)?
>
> I've tried using
>
>                             SVNClientImpl client =
> SVNClientImpl.newInstance();
>                             Status[] statuses=null;
>                             try {
>
>                                        statuses =
> client.status(path,true,false,true,false,false);
>
>                                        } catch (ClientException ce) {
>                                              ce.printStackTrace();
>

> System.out.println(ce.getMessage());
>                                         }
>                               System.out.println(statuses.length);
>
>                               for(int
> count=0;count<statuses.length;count++){
>                                    System.out.println("Revision  :
> "+statuses[count].getRevisionNumber());
>                                     System.out.println(" Last Changed
> Revision   : "+statuses[count].getLastChangedRevision().getNumber());
>                                   }
>
> But I'm always getting only one Status object,that is the latest Status
> object.
>
> How to get all  revision numbers  ,corresponding authors,date,changes at
> those revisions?
>
>
> Thanking you in advance,
>
> --
> Regards...
> Samba.



--
Regards...
Samba.