Last days we have had several problems trying to merge two branches using subversion. I wanted to merge trunk to modularity but I always obtained this error:
svn: Working copy path 'lib/runtime' does not exist in repository
This happened using any merge command (svn merge modularity, svn merge trunk@r1 trunk@r2…).
It seems to be related with subversion issue 3067 and the only way to make it work was checking out the svn branch that solves this issue compiling it and using it to do the merge. The steps to do that are:
1) svn co http://svn.collab.net/repos/svn/branches/issue-3067-deleted-subtrees/ svn-mod
2) cd svn-mod
After doing the merge using that svn client the working copy cannot be used anymore with the old svn client.
Recently I’ve added to AD_Column table in Openbravo ERP database the Position column and I’ve commited it to trunk (r8191). This new column stores the physical database order for the columns which will be required by Data Access Layer Project.
This column is mandatory, so when mergeing trunk to project branches it will cause problems in case these projects add new columns. Here I will try to explain who to deal with these problems:
- First of all resolve the conflicts as usual in the xml files.
- If you have created new columns in your project you will not be able to update your database, so before updating let’s put the new column as not mandatory open src-db/database/model/tables/AD_COLUMN.xml file and change the line
<column name="POSITION" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false"> to
<column name="POSITION" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">. Now you should be able to update your database.
- Your database now contains the columns you’ve added to your project with the position value as null, now you have to populate this value to do it execute:
UPDATE AD_COLUMN C
SET POSITION=(SELECT COLUMN_ID FROM USER_TAB_COLUMNS U, AD_TABLE T
WHERE T.AD_TABLE_ID = C.AD_TABLE_ID
AND TABLE_NAME = UPPER(T.TABLENAME)
AND COLUMN_NAME = UPPER(C.COLUMNNAME))
WHERE POSITION IS NULL;
- Export now your database to xml files.
- Revert the previous modification in src-db/database/model/tables/AD_COLUMN.xml file.
- And now you are ready to commit