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

RE: Get the highest revision number of a directory

From: Gavin Lambert <colnet_at_mirality.co.nz>
Date: Fri, 29 May 2015 00:55:16 -0700 (PDT)

On 29/05/2015 18:28, Marc MENDEZ wrote:
> On my local disk, I need to find the highest revision number assigned to a file inside a directory, whatever the current highest revision number used par SVN.
>
> I thought svnversion could help me, but it seems not to give me the expected result.
> For instance, my current revision number is 100.
> In a subdirectory "mydir", the highest revision number assigned to files is 60. If I run :
> svnversion
> I get 100 (right !)
> If I run
> svnversion mydir
> I get 100 too (wrong :()

It's correct, it's just not what you thought you asked. :)

svnversion is telling you the currently-updated-to version, since revisions cover the entire repository state and thus when you update, it updates all files to the newest revision.

The only time you'll see something different is if you've been switching subtrees of your working copy to different revisions/branches or if you're using svn:externals.

Assuming that you want to see which revision a file was last modified in (which is a different thing), you can either look at the Properties or Log of the file/directory, or you can run the "svn info" command. None of these things are intended to be done as part of a script, though -- if you find yourself wanting to do that it usually means you don't realise how SVN works. :)

>
> Thanks for your help
>
> ------------------------------------------------------
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3119842
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe-6zjzXkf2FExf8fUKLXF2/HdfcadvtA/q_at_public.gmane.org].
>

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3119852

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2015-05-29 09:55:22 CEST

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