Difference between revisions of "Fossil"

From Organic Design wiki
(Migrating a repository from Subversion to Fossil)
(Change source-code blocks to standard format)
 
Line 7: Line 7:
  
 
First we install ''svn2git'' as follows:
 
First we install ''svn2git'' as follows:
{{code|<bash>apt-get install git-core git-svn ruby rubygems
+
<source lang="bash">
 +
apt-get install git-core git-svn ruby rubygems
  
gem install svn2git</bash>}}
+
gem install svn2git
 +
</source>
  
  
 
Next migrate the repos - ours at OD are not standard layout as they have no trunk, branches, or tags at the root level of the repo, the root level of the OD repos are equivalent to the trunk and there are no tags or branches. So we use the '''--rootistrunk''' switch in our Git import command as follows:
 
Next migrate the repos - ours at OD are not standard layout as they have no trunk, branches, or tags at the root level of the repo, the root level of the OD repos are equivalent to the trunk and there are no tags or branches. So we use the '''--rootistrunk''' switch in our Git import command as follows:
{{code|<bash>svn2git svn+ssh://svn.organicdesign.co.nz/svn/tools --rootistrunk</bash>}}
+
<source lang="bash">
 +
svn2git svn+ssh://svn.organicdesign.co.nz/svn/tools --rootistrunk
 +
</source>
  
  
 
Then import the Git repository into Fossil,
 
Then import the Git repository into Fossil,
{{code|<bash>git fast-export --all | fossil import --git tools.fossil</bash>}}
+
<source lang="bash">
 +
git fast-export --all | fossil import --git tools.fossil
 +
</source>
 
[[Category:Libre software]]
 
[[Category:Libre software]]

Latest revision as of 18:11, 22 May 2015

Cone.png This article or section is a stub. Stubs are articles that have not yet received substantial attention from the authors. They are short or insufficient pieces of information and require additions to further increase the article's usefulness. The project values stubs as useful first steps toward complete articles.


Migrating a repository from Subversion to Fossil

Fossil is able to import and export from Git so first we migrate our subversion repository to Git.

svn2git is a tiny utility for migrating projects from Subversion to Git while keeping the trunk, branches and tags where they should be. It uses git-svn to clone an svn repository and does some clean-up to make sure branches and tags are imported in a meaningful way, and that the code checked into master ends up being what's currently in your svn trunk rather than whichever svn branch your last commit was in.

First we install svn2git as follows:

apt-get install git-core git-svn ruby rubygems

gem install svn2git


Next migrate the repos - ours at OD are not standard layout as they have no trunk, branches, or tags at the root level of the repo, the root level of the OD repos are equivalent to the trunk and there are no tags or branches. So we use the --rootistrunk switch in our Git import command as follows:

svn2git svn+ssh://svn.organicdesign.co.nz/svn/tools --rootistrunk


Then import the Git repository into Fossil,

git fast-export --all | fossil import --git tools.fossil