HOWTO Create a SDCC Branch - roybaer/sdcc-wiki GitHub Wiki

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></branch_name>:
svn copy https&#58;//sdcc.svn.sourceforge.net/svnroot/sdcc/trunk https&#58;//sdcc.svn.sourceforge.net/svnroot/sdcc/branches/&lt;branch_name&gt; &#45;m &quot;Creating branch &lt;branch_name&gt;.&quot;
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/&lt;branch_name&gt;&lt;/branch_name&gt&lt;/sdcc.&gt;</branch_name>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 https&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;//sdcc.svn.sourceforge.net/svnroot/sdcc/branches .
  • abort the checkout after some files are checkouted by pressing ^C
  • create the <branch_name> directory and add it to the source control:
<pre>mkdir &lt;branch_name&gt; svn add &lt;branch_name&gt; </pre>
  • svn copy the sdcc directory to branches/&lt;branch_name&gt;&lt;/branch_name&gt&lt;/sdcc&gt;</branch_name>
svn copy ../sdcc &amp;amp&#59;amp&amp;&#35;59&#59;amp&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;lt&amp;amp&#59;amp&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;35&amp;&#35;59&#59;59&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;branch_name&amp;amp&#59;amp&amp;&#35;59&#59;amp&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;gt&amp;amp&#59;amp&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;35&amp;&#35;59&#59;59&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;/sdcc
  • commit the branch:
svn commit &amp;amp&#59;amp&amp;&#35;59&#59;amp&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;lt&amp;amp&#59;amp&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;35&amp;&#35;59&#59;59&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;branch_name&amp;amp&#59;amp&amp;&#35;59&#59;amp&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;gt&amp;amp&#59;amp&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;35&amp;&#35;59&#59;59&amp;amp&#59;&amp;&#35;35&#59;59&amp;&#35;59&#59;
  • voila, the branch is created!
Borut
⚠️ **GitHub.com Fallback** ⚠️