HOWTO Create a SDCC Branch

From SDCC wiki
Jump to: navigation, search

There are two different ways to make a branch (see Branching and Merging):

  • remote copying to the URL
  • local copying to the snapshot

Remote copying is simpler but suitable only when branching the complete tree, for example branching trunk to branches/<branch_name>:

svn copy<branch_name> -m "Creating branch <branch_name>."

In this case branches/<branch_name> will include everything that is in trunk: directories sdcc, sdcc-build, sdcc-cf, sdcc-extra, sdcc-web, ...

Usually we want to create branch of just the sdcc directory: branches/<branch_name>/sdcc. This can be accomplished by copying to the local snapshot:

  • create branches directory under the same parent as sdcc and cd into it:
mkdir branches
cd branches
  • start the branches checkout:
svn checkout .
  • abort the checkout after some files are checkouted by pressing ^C
  • create the <branch_name> directory and add it to the source control:
mkdir <branch_name>
svn add <branch_name>
  • svn copy the sdcc directory to branches/<branch_name>/sdcc
svn copy ../sdcc <branch_name>/sdcc
  • commit the branch:
svn commit <branch_name>
  • voila, the branch is created!


Personal tools