tags:

views:

8

answers:

1

Hi,

For following directory structure, in a specified revision(r1234, for example) of A, how could I get the revision number of B so that I could check out the correct revision of B.

A - (r1234)
  |_ B - (this could be r1222)
  |_ C - (I don't need this directory)
  |_ D - (I don't need this directory)
+1  A: 

SVN maintains a file system with the rev number. Every change to any part of the file system is a new rev. In other words, each rev corresponds to another version of the entire file system even though most part of that file system wouldn't have changed.

If you check out, or update to, or export, a rev, that means "give me the contents of the svn file system as it was in the rev.

When you say that A->r1234 and B (subdirectory) -> r1222, it means that in revision 1234, B was untouched but this does not mean that B is at rev r1222, it is also at r1234.

So I guess, what you are looking for is : latest change that touched the subdirectory "B"

This can be done by going into the subdirectory and issuing log command

svn log --limit 1 -r ..
pyfunc
@pyfunc, I am not looking for the last change that touched `B`. I am looking for the revision number of `B` when `A` is `r1234`. From your explanation, It seems I could simply do `svn up -r1234 svn://A/B`
pierr
@pierr: In that case simply doing svn up -r1234 inside the subdirectory should update it to rev 1234 and should leave other directories untouched. Yes.
pyfunc