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

Re: Quickly showing branch ancestrally?

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 15 Sep 2015 11:21:24 +0200

On Tue, Sep 15, 2015 at 05:10:30AM -0400, Paul Hammant wrote:
> OK, 'svn copy' makes branches. Most would follow the standard
> trunk/tags/branches model. If you don't though, if you dip your toe into
> the world of creative/arbitrary branch designs, it is not clear how you
> catalog your branch mappings. By comparison, Perforce has branch-specs
> (which are not perfect in themselves).
> Subversion doesn't make it easy to determine that a branch was formed from
> a certain place. There's a stack overflow article -
> http://stackoverflow.com/questions/4015412/how-to-find-the-common-ancestor-of-two-branches-in-svn
> - that asks about determining ancestry, with no one-liner answer, and
> certainly nothing in the subversion command set.
> Is there no simple "svn show-branch-ancestor url/path" operation in 1.9x?
> Subversion must know that info, as it is comfortable issuing quick
> rejections to my commits:
> svn: E195016: 'svn://' must be
> ancestrally related to 'svn://'
> Thanks in advance,

svn log --stop-on-copy BRANCH_URL shows the first ancestor of a branch.

That's not a graph of branches, though, and there's currently no interface
to build one. But it could be built on to of the APIs (i.e. added to the
svn client or as a standalone tool).

A minor complication being that not all copies are branches.
But that might not be a very huge issue. Just show all copies.

And it might not perform very well unless the results for the known
part of history are cached.
Received on 2015-09-15 11:21:36 CEST

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.