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

RE: Reoganizing svn structure and error "shares no common ancestry"

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 18 Mar 2015 22:01:43 +0100

You can avoid the error by passing --ignore-ancestry to switch… but that doesn’t fix the ancestry problem


What it tries to tell you is that the branches were not created from trunk.


Usually you would

* create trunk

* apply some changes to trunk

* copy that to a branch

* apply some changes to trunk

* copy that to a branch

* update trunk….



That way the branches share ancestry with trunk (and thereby with each other). Further updates on the branches are possible, but they still share (some) history, as they all originated from the original trunk.



Your script says that you created the branches as new, so Subversion is right that the branches don’t share ancestry with trunk. Usually you only want to switch between related branches. (A common error is to branch to the wrong directory level. This is caught by this check). The --ignore-ancestry override works for those cases that there is no shared ancestry… but this might tell you that everything will be deleted and checked out clean (depends on more things), so perhaps in some cases just deleting and a clean checkout may be faster.




From: Eric Johnson [mailto:eric_at_tibco.com]
Sent: dinsdag 17 maart 2015 23:14
To: buddy.butterfly_at_web.de
Cc: users_at_subversion.apache.org
Subject: Re: Reoganizing svn structure and error "shares no common ancestry"


Does switching to a new branch work before the reorganization that you did?


What version of Subversion are you using?


Can you reproduce the problem with a mock version of your repository?


When you do an svn log of your new branch, does the history go back to a common revision with the new trunk? Likewise, with your new trunk, does an svn log show a common revision with the branch?





On Mon, Mar 16, 2015 at 3:18 AM, Buddy Butterfly <buddy.butterfly_at_web.de <mailto:buddy.butterfly_at_web.de> > wrote:


finally we would like to restructure our badly structured svn repo.
Over time a lot of stuff flew into this repo. I have used kdesvn for
moving the trees online in the repo. kdesvn does a copy and delete
when moving. I have also tried to use a svn move. Steps were as follows:

1. Created a new repo path to the project.
2. Created branches, tags and trunk below ist.
3. Moved (like described above) original project below the new trunk.
4. Similar like 3. for branches with creating the branches/<branch> and
   moving the old branches to the new ones.
5. Checked out the new trunk.
6. Tried to switch to one of the new branches.

Step 6. always give the error switching not possible "shares no common

The moving like described above is very convenient and would allow the reorg
in an acceptable time frame. How is it possible to do this and create or
manipulate the history such that a common ancester will be created?

Do you propose another workflow to acomplish this in an easy way?

Thanks a lot and cheers,

Received on 2015-03-19 00:36:09 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.