Hi Jonas, On 2009-08-15 at 03:46:24 [+0200], Jonas Sundström <jonas@xxxxxxxxxxx> wrote: > > Are there any do:s and don't:s about creating or using > a branch that I should be aware of? Short version: -------------- * DO create branches directly in the repository, not locally * DON'T ever forget to include the last merged revision in the commitlog of a merge Long version: ------------- Unlike popular reasoning, branching isn't that difficult in svn, however, with subversion-1.2 that our server is using, you need to keep track of the revisions that you copied. Create the branch by 'svn copy'-ing the source folder directly in the repository, in your case something like svn copy https://svn.berlios.de/svnroot/repos/haiku/haiku/trunk \ https://svn.berlios.de/svnroot/repos/haiku/branches/features/mipsel \ -m "* creating branch for mipsel arch" Svn will tell you which trunk revision it copied, alternatively, you can find that out by doing svn log --verbose --stop-on-copy \ https://svn.berlios.de/svnroot/repos/haiku/branches/features/mipsel [See below for why it is important to know the exact trunk-revision which has been copied to the branch] After you have created the branch, you either switch your local trunk sandbox to the branch or make a separate checkout, depending whether or not you like to be able to build the trunk, too. I personally always make a separate checkout. Now and then, you should update your branch with all the changes that have been applied to the trunk in the meantime. At the time of a merge, there shouldn't be an uncommitted changes in your branch, as it would be rather difficult to separate those from the changes coming in through the merge. In order to do a merge, you invoke svn merge (in the root folder of your branch): svn merge -r<last-merged-trunk-rev>:<to-be-merged-trunk-rev> \ https://svn.berlios.de/svnroot/repos/haiku/haiku/trunk This will apply all changes from trunk-revision <last-merged-trunk-rev> up to <to-be-merge-trunk-rev>. This is where subversion-1.2 is a bit clumsy, as you have to pass in the revisions whose changes you'd like to merge. So, for the first merge, <last-merged-trunk-rev> should be the trunk-revision that you used to create your branch from and <to-be-merged-trunk-rev> should be the last trunk-revision that you'd like to merge (usually HEAD). So, assuming that the branch has been created from the trunk-revision 32411, you'd do this (in the root folder of your branch): svn merge -r32411:HEAD \ https://svn.berlios.de/svnroot/repos/haiku/haiku/trunk Svn will tell you the last trunk-revision it merged (the HEAD at the time of operation, e.g. 32823). After you have resolved any potential conflicts and checked that the branch still builds, commit the merge, using that specific revision: svn commit -m "* merging all changes from trunk up to r32823" Next time round, you have to merge from there onwards, i.e.: svn merge -r32823:HEAD \ https://svn.berlios.de/svnroot/repos/haiku/haiku/trunk I hope that helps? > > BTW, any advice on how to flesh out the mips side of > glibc would be great. So far I'm just copying files > from glibc 2.3.5 one by one. (I know its old. > I couldn't find the mips files in recent glibc.) I think it would be best to copy files of the glibc matching the one in our repo. I am not sure, but I think that's glibc-2.3.2. If anyone knows otherwise, please tell! cheers, Oliver