views:

2310

answers:

2

SVN externals allow you to make an SVN folder appear as if it's at another location. A good use for this is having a common folder shared across all of your projects in SVN.

I have a /trunk/common folder in SVN that I share via several different project.

Example:

  • Project1 : /trunk/project1/depends
  • Project2 : /trunk/project2/depends
  • Project3 : /trunk/project3/depends
  • Project4 : /trunk/project4/depends

Each of these depends folders are empty, but have an svn:external defined to point to my /trunk/common folder.

The problem is when I view log within any of the projects: /trunk/projectX/ it does not show changes from the svn:externals. I am using tortoise SVN as my SVN client.

Does anyone know how to change this behavior? I would like for the show log of /trunk/projectX to include any changes to any defined svn:externals as well.

+2  A: 

This is not possible with the current release of Subversion, other than explicitly calling svn log on the target of the externals directory

You can try issueing a feature request at the Subversion website

Sander Rijken
A: 

When you display the log for a local versioned folder, it will show the changes that are relative to this particular folder. Externals are only a link to a different folder on the repository. The only thing you can track about external references, from a folder which depends on this external project, is the reference definition itself. That is because the reference is a subversion property of the dependent folder.

Imagine you have the following repo hierarchy :

repo
   myfirstproject
      trunk
   mysecondproject
      trunk
   mycommonlib
      trunk

and that mysecondproject\trunk folder has the following svn:external property :

svn://mysrv/repo/mysharedlib@2451 sharedlib

A checkout of mysecondproject\trunk inside a new folder secondproject will create something like this on your file system :

secondproject Folder (refers mysecondproject/trunk)
   sharedlib Folder (refers mycommonlib/trunk @ revision #2451)

Calling "Show log" command of Tortoise from secondproject folder will only show secondproject files changes, and eventually changes that occurred on the svn:external property of the folder.

To get change log of the external project, you need to call "Show log" from the inner folder sharedlib, which makes sense.

Romain Verdier
It makes more sense to show the log of anything below the point whether it is from an svn:external or not. Just like a checkout will checkout everything. And an update will update everything.
Brian R. Bondy