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

How to get the parent branch...

From: Echlin, Jamie <jamie.echlin_at_credit-suisse.com>
Date: Wed, 22 Dec 2010 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.
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.

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
===============================================================================
Received on 2010-12-22 14:10:10 CET

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

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