advance planning for migration to git
Moderator: Committer
advance planning for migration to git
To plan ahead a little for the expected "someday" on which we migrate to git, one of the things that comes to mind that will need adjustment is our version number handling-- right now it is based on svn version number and I'm not aware of a simple substitute from git. A couple threads regarding getting a roughly comparable number out of git can be found here and here, and a discussion including a little more detail on how to actually use that number to mark revisions can be found here.
Has anyone here had experience with this or any other svn-to-git transition issue? If so, please flag the potential issues here along with any suggested solutions.
Has anyone here had experience with this or any other svn-to-git transition issue? If so, please flag the potential issues here along with any suggested solutions.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: advance planning for migration to git
Question, is the plan to migrate from Sourceforge to Github, or to convert the Sourceforge repo from using SVN to Git? I know the latter is possible as FreeCol did it last year, but I had no direct involvement in that, but the FreeCol Devs would almost certainly be happy to pass experience on if the latter is the plan.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: advance planning for migration to git
Mercurial has a local revision numbers.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: advance planning for migration to git
AFAIK there is none. I've already thought about that issue when I read through the git tutorials, and assuming we'd want to avoid overly complicated solutions, I see these options:Dilvish wrote:one of the things that comes to mind that will need adjustment is our version number handling-- right now it is based on svn version number and I'm not aware of a simple substitute from git
- Simply using the hash id of the commits (probably not very appealing)
- Using git describe
- Tagging each commit that becomes the base of a (test) build (even the weekly ones)
Re: advance planning for migration to git
Both.MatGB wrote:Question, is the plan to migrate from Sourceforge to Github, or to convert the Sourceforge repo from using SVN to Git?
Hm, I guess it'll be worth asking them...the FreeCol Devs would almost certainly be happy to pass experience on if the latter is the plan.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: advance planning for migration to git
Could you describe git describe?Vezzra wrote:git describe
Re: advance planning for migration to git
http://git-scm.com/book/en/v2/Distribut ... ild-NumberGeoff the Medio wrote:Could you describe git describe?
Re: advance planning for migration to git
Version number? The version which gets displayed in the bottom right corner of the game?
Attached patches are released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: advance planning for migration to git
And what's used to discuss various versions of code in SVN, such as for identifying which commit introduced or fixed a bug or feature or similar.Chriss wrote:Version number? The version which gets displayed in the bottom right corner of the game?
Re: advance planning for migration to git
More specifically the part of the version string with the SVN revision number.Chriss wrote:Version number? The version which gets displayed in the bottom right corner of the game?
Re: advance planning for migration to git
Git describe seems very sensible.
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
Re: advance planning for migration to git
Git describe wants tag. Otherwise it can get just commit hash.em3 wrote:Git describe seems very sensible.
IMHO game version can look like: <date> <branch>(<commit>) 42 Jan 2015 master(18e1fd144)
Date will help with commit order and it is human readable
Branch will allow to check if build is special (may be omit for master)
Hash points exact commit and useful for developers
Tag can be set by github when you add release (see release tab on main repo page)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: advance planning for migration to git
I've posted a proposal on the migration procedure here (I think the FreeOrion Project forum is better suited for this kind of discussion).
Re: advance planning for migration to git
Comment about current FreeOrion/cmake/make_versioncpp.py
1) Git branches are located in single folder. I suggest to include branch name to version.
2) Git can have unstaged changes. In what case you commit hash will not be same as build. (Looks like with SVN too.)
Should I make a patch?
PS. You don't need to 'project rootdir' for git. (you can construct related path (os.path.join('..', os.path.dirname(__file__)))) But since svn is still in use it cant be removed.
1) Git branches are located in single folder. I suggest to include branch name to version.
2) Git can have unstaged changes. In what case you commit hash will not be same as build. (Looks like with SVN too.)
Should I make a patch?
PS. You don't need to 'project rootdir' for git. (you can construct related path (os.path.join('..', os.path.dirname(__file__)))) But since svn is still in use it cant be removed.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: advance planning for migration to git
You mean the name of the currently checked out branch?Cjkjvfnby wrote:1) Git branches are located in single folder. I suggest to include branch name to version.
Yep, this is not different from how things work with SVN now already. We can't cover everything...2) Git can have unstaged changes. In what case you commit hash will not be same as build. (Looks like with SVN too.)
Why not? I'd like to see your suggestion.Should I make a patch?
I don't understand - how is the make_versioncpp.py script going to locate the files it operates upon? I don't want to rely on all the build environments on all supported platforms to chdir into the project root directory before they call the script. By requiring to pass the project root dir to the script I can make sure we're exactly where we need to be. This has nothing to do with the VCS used.PS. You don't need to 'project rootdir' for git. (you can construct related path (os.path.join('..', os.path.dirname(__file__))))