If I expand on what you did, I can get the branch mapping like so: svn log --verbose --stop-on-copy branchtwo/test.txt | grep " (from "
Gives: A /branchtwo (from /branchone:1) Close enough, but I fear it's not robust. On Tue, Sep 15, 2015 at 5:21 AM, Stefan Sperling <s...@elego.de> wrote: > 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://127.0.0.1/foo/three/test.txt@10' must be > > ancestrally related to 'svn://127.0.0.1/foo@9' > > > > 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. >