Echlin, Jamie wrote on Wed, Dec 22, 2010 at 13:09:24 -0000:
> Afternoon,
> 
> For some client-side Tortoise hooks (which are for the purpose of
> preventing people shoot themselves in the head in all the myriad ways
> Subversion allows), I need to get the ancestor-branch, ie where the
> current branch/tag was copied from.
> 
> My current strategy for doing this is svn log -q --stop-on-copy, get the
> last rev, then svn log -vr thatRev on it, and look for the copied from.

'svn info' also displays copyfrom.

> I have to do it in two shots because svn log -v for the whole branch is
> too slow.
> 
> I'm wondering though if there is a better/faster way of doing this, like
> something undiscovered in the API. Server-side I could use
> svn.fs.closest_copy() but I only have the working copy to work with.
> 

You could use the RA API (svn_ra.h) directly; that ought to be the most
efficient solution.

> Furthermore I'm having problems with branches that weren't created
> "cleanly", eg users will create a new directory, then svn copy stuff in,
> or create a branch from a working copy containing modified files. (Both
> bad practices that I'm trying to prevent, but nevertheless these exist
> in the wild).
> 
> Any help appreciated as always...
> jamie
> 
> ===============================================================================
>  
> Please access the attached hyperlink for an important electronic 
> communications disclaimer: 
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
> ===============================================================================
>  
> 

Reply via email to