Changes

Jump to navigation Jump to search

GIT Migration

2,939 bytes added, 17:07, 27 February 2011
Migration is no longer potential
This page is a place holder for gathering contains information on the potential migration from SVN to GIT for the ScummVM source code repositories.
Please use this page to track any blockers that you may foresee (Windows users, I am looking at you ;-)) so the problems can be addressed and the work moved forward.
:Windows users may want to take a look at http://code.google.com/p/gitextensions/ and http://code.google.com/p/tortoisegit/ --[[User:Fingolfin|Fingolfin]] 12:47, 2 November 2010 (UTC)
: There's also http://www.syntevo.com/smartgit/index.html (which is free for personal use). A good article on alternative clients for Windows is here: http://www.makeuseof.com/tag/5-windows-git-clients-git-job/ --[[User:Md5|Md5]] 10:30, 5 December 2010 (UTC)
 
==== Done conversions ====
The tools repository: The script can be found [[/Tools_script|here]] and the repository is available on [https://github.com/scummvm/scummvm-tools GitHub].
 
The main repository: [http://www.usecode.org/scummvm/svn2git/ Conversion script], [https://github.com/scummvm/scummvm-test Repository on github].
 
For historical purposes, a cleaned up git conversion of the FreeSCI darcs repo: https://github.com/wjp/freesci-archive .
 
==== An introduction to the whole process ====
[http://kb.wowace.com/repositories/convert-svn-to-git/ This page] contains some ideas on how to perform the migration process.
==== Things to tweak in the repository conversion ====
:Author names/emails: see this thread: [http://sourceforgepermalink.gmane.netorg/mailarchive/messagegmane.games.php?msg_name=20100807142903devel.71414e9c%40annie scummvm/7939 thread].
:Do we maybe want to use unknown@scummvm.org as email address for some of the unknown authors rather than username@users.sf.net? [[User:Wjp|Wjp]] 13:27, 2 November 2010 (UTC)
:Graft in FreeSCI history from vendor/, rewriting the commit messages
 
::Cleaned up FreeSCI history: https://github.com/wjp/freesci-archive [[User:Wjp|Wjp]] 14:23, 9 November 2010 (UTC)
:Maybe: make merges of branches back into trunk actual merges [[User:Wjp|Wjp]] 22:35, 3 November 2010 (UTC)
:Are there other external histories we can and want to graft in? (Sarien?) [[User:Wjp|Wjp]] 13:09, 2 November 2010 (UTC)
::Well, there are several. All the engines that were developed outside the main tree are likely candidates, e.g.: lastexpress, M4, MADE, mohawk, Sarien (as you mentioned), tinsel ... to name a few --[[User:Md5|Md5]] 09:22, 3 January 2011 (UTC)
:::Groovie is one of them too: http://code.google.com/p/t7gre/ --[[User:Jvprat|jvprat]] 18:30, 7 January 2011 (UTC)
:::I'd rather not have the Mohawk history in there and I don't see it ever being useful (at least I've not had to dive into the old source to hunt for regressions since Mohawk was merged, and I highly doubt I ever will have to). -[[User:Clone2727|Clone2727]] 20:52, 7 January 2011 (UTC)
:::Tinsel is no way since it starts from the original source code which is under NDA --[[User:Sev|Sev]] 20:28, 25 January 2011 (UTC)
::After thinking about this some more, we may just want to leave these out of the main repository, and leave it to the user to graft them in (with the .git/info/grafts file) on-demand. This way we can do a proper git conversion of any desired external history at any time. [[User:Wjp|Wjp]] 10:57, 24 January 2011 (UTC)
From Fingolfin's mail at [http://sourceforgepermalink.netgmane.org/mailarchive/messagegmane.games.php?msg_name=AA4D038A-B948-43F0-87D7-22A2818BA3ED%40quendidevel.descummvm/7999 mail]:
:There was also some cleanup I performed after the CVS -> SVN switch, which in retrospect is not nice to have in the history. E.g. I cleaned up various branches, and many SVN properties. So commits like <http://scummvm.svn.sourceforge.net/viewvc/scummvm?view=revision&revision=20471> would be nice to suppress. Those SVN properties wouldn't be visible in git anyway, I guess.
::Many of those actually change things (like updating version numbers or removing files), so probably not all of them.
::Correction: yes, we can get rid of all of them, and I did in my scummvm-archive repo on github. [[User:Wjp|Wjp]] 14:11, 3 January 2011 (UTC)
:Also, I think when we made the CVS conversion back then, something went slightly wrong with the very old history. Consider e.g. <http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/?pathrev=3486>, where the code that should be in trunk is hidden away in a subdirectory "scummvm-old" of trunk. Not terrible, but certainly annoying. Esp. since later on, at some point the two are mixed: Trunk is populated but "scummvm-old" is still there.This happened in revision 4785, see <http://scummvm.svn.sourceforge.net/viewvc/scummvm?view=revision&revision=4785>, and while it lists me as the committer with commit message "Initial revision", I am not quite sure why that is... probably because we switch to a new CVS repository back then, with a revised file structure... And things were never properly stitched together. The annoying part is that "scummvm-old" is still visible much, much later, see e.g. <http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/?pathrev=18000>. It was only removed in revision 20419, see <http://scummvm.svn.sourceforge.net/viewvc/scummvm?view=revision&revision=20419>, manually.
GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info &&
test -f $GIT_INDEX_FILE.new && mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE || true' HEAD
 
::Work-in-progress git repository with clean-up of cvs2svn conversion: https://github.com/wjp/scummvm-archive
 
: Alternatively, one could directly take content from the two (!) old CVS repositories, and convert these, then graft them together with the newer history of the SVN repository, ignoring the old revisions in it coming from the CVS->SVN conversion. Not sure if this would mean more or less work in the end... --[[User:Fingolfin|Fingolfin]] 10:46, 31 December 2010 (UTC)
 
==== Configure/tools updates to consider ====
 
* Rename SCUMMVM_SVN_REVISION to SCUMMVM_REVISION
* Change "svn" for trunk builds to "devel" (DVCS name can be part of the revision number, since the latter is DVCS-specific)
* Update configure to extract the revision number from a git repository (in addition to svn - and maybe hg/others also?)
* Add branch name to revision number (if not trunk)
* Update create_project to allow extraction of revision numbers from svn/git/hg repositories
==== Where to host the GIT repository? ====
Some of our devs already use github for their own ScummVM trees, and since github makes it super-easy for anybody to branch from another user's tree, and then push changes back (resp. file a "pull request)", this seems ideal to me.
==== Alternatives Client alternatives ====
* The mercurial client, which is written in Python, can perhaps provide a better user experience for Windows, together with tortoise-hg. Relevant guides can be found here:
178

edits

Navigation menu