Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dev:extensions:svn_to_github [2014/11/07 10:28]
plg information about tools are given on another page
— (current)
Line 1: Line 1:
-====== Migrate a plugin from Piwigo.org SVN to Github ====== 
  
-Since November 2014, the [[http://piwigo.org/ext/|plugins repository]] and the [[http://piwigo.org/translate/|translation platform]] both support Github repositories, in addition to our Subversion repository. That mean you can use the power of Github (issues, forks, pull-requests) and seamlessly integrate with piwigo.org (no more need of manual releases and/or git/svn mirrors). 
- 
-This tutorial will guide you in the process to migrate your SVN repository to Github without loosing its history. It is inspired by [[https://www.atlassian.com/git/tutorials/migrating-overview|Atlassian tutorial]] for migrating to Bitbucket but cleaned and adapted for Github. It is adapted for plugins with only one branch (trunk), if you have branches and/or tags on your plugin and wish to migrate them, please refer to the original tutorial. 
- 
-===== Prerequisites ===== 
-I assume you will start with a fresh OS but you certainly have some or all of the required software. (The process was tested on Windows 7 and Ubuntu 14). 
- 
- 
-  * Java 1.7 or 1.8 
-  * Git 
-  * Subversion 
-  * Git SVN 
- 
-=== Windows === 
-You can get Java JRE on [[https://www.java.com/fr/download|Oracle website]]. 
- 
-Subversion binaries can be found on [[http://subversion.apache.org/packages.html#windows|Apache website]]. 
- 
-Also install [[http://msysgit.github.io|mysysGit]] containing both core Git and Git SVN. 
- 
-=== Ubuntu & co. === 
-You will need these packages : 
- 
-  * ''openjdk-7-jre'' (or ''openjdk-8-jre'') 
-  * ''subversion'' 
-  * ''git'' 
-  * ''git-svn'' 
- 
-=== Everyone === 
-You will also need a little tool created by Atlassian: [[https://bitbucket.org/atlassian/svn-migration-scripts/downloads/svn-migration-scripts.jar|svn-migration-scripts.jar]]. 
- 
-===== Prepare ===== 
-In order to get a consistent commit history on Github you will have to tell Git SVN who is who. Open a terminal where ''svn-migration-scripts.jar'' is located (Shift+Click on Windows) and enter the following command: 
- 
-<code> 
-java -jar svn-migration-scripts.jar authors http://piwigo.org/svn/extensions/YOURPLUGIN > authors_YOURPLUGIN.txt 
-</code> 
- 
-This will create a TXT file with the following syntax: 
- 
-<code> 
-j.doe = j.doe <j.doe@mycompany.com>  
-m.smith = m.smith <m.smith@mycompany.com> 
-</code> 
- 
-Left part is Subversion login, right part is Github login and email. 
- 
-=== Adapt authors' file === 
-Now modify the left part of each line to match an actual Github accounts. The email must be one of the emails associated to the Github account. 
- 
-You will certainly get ''TranslationTeam'' in this file, the SVN user used to commit language files. Complete the line as following: 
- 
-<code> 
-TranslationTeam = Piwigo-TranslationTeam <translate-github@piwigo.org> 
-</code> 
- 
-Also if ''plg'' or ''mistic100'' made changes in your plugin, use theses: 
- 
-<code> 
-plg = plegall <plg@piwigo.org> 
-mistic100 = mistic100 <mistic@piwigo.org> 
-</code> 
- 
-For any other users, replace ''mycompany.com'' by ''piwigo.org''. 
- 
-And of course don't forget to specify the correct mapping for your own account! 
- 
-===== Convert ===== 
-Open your terminal on your working directory and type: 
- 
-<code> 
-git svn clone --authors-file=authors_YOURPLUGIN.txt http://piwigo.org/svn/extensions/YOURPLUGIN 
-</code> 
- 
-This will fetch all commits on your plugin and create locally all relevant Git commits. 
- 
-=== Push === 
-Now it's time to push your plugin to Github. 
- 
-[[https://github.com/new|Create a new repository]]. You must leave it empty (no README.md, no LICENSE, no .gitignore). 
- 
-Still in your terminal type: 
- 
-<code> 
-git remote add origin https://github.com/YOURLOGIN/YOURREPOSITORY 
-git push -u origin --all 
-</code> 
- 
-Hooray ! Your plugin is now published to Github. 
- 
-===== Update tools ===== 
- 
-See [[dev:extensions:use_scm]] 
 
 
 
github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact