[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-users] SvnClientAdapter question

From: Mark Phippard <markphip_at_gmail.com>
Date: Fri, 23 Sep 2011 12:46:39 -0400

I think it is unrelated, but I would use getInfo not getDirEntry. If
you were using the command line, I think you would want to use svn
info, not svn ls.

That said, the data that is returned is coming from the SVN API, so
you should see the same values if you use svn info from the command
line. I would guess that moving a file counts as a last modification
and that was probably done in r501, not r500.

Mark

On Fri, Sep 23, 2011 at 12:39 PM, Al Habte <aghabte_at_rockwellcollins.com> wrote:
> SvnClientAdapter Version:  1.6.12 (bundle version)
>
> Given the following scenario:
>
> Original URL path: http://svn/repo/dir/foo.txt
>
> This file, http://svn/repo/dir/foo.txt, was last modified at repo revision 450.
> The file was then moved to http://svn/repo/dir/subdir/foo.txt when the repo was at
> revision 500. The HEAD revision of the repo is now at 504. The file (contents) has
> not been modified since revision 450.
>
>
> I am trying to get the last modified revision of this file, after it is moved, and its
> path at that revision. Using the following calls:
>
>
>   ISVNClientAdapter  svnClient = SVNClientAdapterFactory.createSVNClient(JhlClientAdapterFactory.JAVAHL_CLIENT);
>   <set the svnClient>
>
>   ISVNDirEntry entry =  svnClient.getDirEntry(itemURL, itemRevision);
>   long lastModifiedRevision = entry.getLastChangedRevision().getNumber();
>   String path = entry.getPath();
>
> setting the values for:
>  itemURL = http://svn/repo/dir/subdir/foo.txt
>  itemRevision = 504 (HEAD)
>
> results in:
>   lastModifiedRevision = 501
>   path = http://svn/repo/dir/subdir/foo.txt
>
> I may be missing something, but I was expecting the following, since the revision where
> the file was last modified is 500:
>   lastModifiedRevision = 500
>   path = http://svn/repo/dir/subdir/foo.txt
>
> What should I use to get the behavior I wanted and was expecting?
>
> Note that if the file hadn't moved at all, the result would be as expected:
>
>   lastModifiedRevision = 500
>   path = http://svn/repo/dir/foo.txt
>
> Thanks for your assistance.
>
> Al Habte.
>
> ------------------------------------------------------
> http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2843996
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
>

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2843998
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
Received on 2011-09-23 18:47:05 CEST

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.