FreeOrion

Forums for the FreeOrion project
It is currently Thu Dec 14, 2017 12:39 am

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Feb 25, 2015 4:26 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
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.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Wed Feb 25, 2015 5:48 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
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.


Top
 Profile  
 
PostPosted: Wed Feb 25, 2015 5:52 pm 
Offline
Space Squid

Joined: Sat Dec 10, 2011 5:46 am
Posts: 53
Mercurial has a local revision numbers.

_________________
Gentoo Linux amd64, gcc-6.4.0, boost-1.63.0
Ubuntu Server 16.04.3 x64, gcc-5.4, boost-1.58.0
Welcome to multiplayer public server at 78.47.71.237. Version 2017-12-11.05ee54a
SMAC participant: play multiplayer with us!


Top
 Profile  
 
PostPosted: Wed Feb 25, 2015 6:39 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4289
Location: Sol III
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
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:

  • 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)

Personally I think that the second option (combined with reasonable tagging) will probably be the best solution.


Top
 Profile  
 
PostPosted: Wed Feb 25, 2015 6:40 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4289
Location: Sol III
MatGB wrote:
Question, is the plan to migrate from Sourceforge to Github, or to convert the Sourceforge repo from using SVN to Git?
Both.
Quote:
the FreeCol Devs would almost certainly be happy to pass experience on if the latter is the plan.
Hm, I guess it'll be worth asking them...


Top
 Profile  
 
PostPosted: Wed Feb 25, 2015 6:41 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
Vezzra wrote:
git describe
Could you describe git describe?


Top
 Profile  
 
PostPosted: Wed Feb 25, 2015 6:51 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4289
Location: Sol III
Geoff the Medio wrote:
Could you describe git describe?
http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Generating-a-Build-Number


Top
 Profile  
 
PostPosted: Thu Feb 26, 2015 10:39 pm 
Offline
Dyson Forest

Joined: Sun May 11, 2008 10:50 am
Posts: 231
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.


Top
 Profile  
 
PostPosted: Thu Feb 26, 2015 10:48 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
Chriss wrote:
Version number? The version which gets displayed in the bottom right corner of the game?
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.


Top
 Profile  
 
PostPosted: Fri Feb 27, 2015 8:21 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4289
Location: Sol III
Chriss wrote:
Version number? The version which gets displayed in the bottom right corner of the game?
More specifically the part of the version string with the SVN revision number.


Top
 Profile  
 
PostPosted: Fri Feb 27, 2015 1:29 pm 
Offline
Vacuum Dragon
User avatar

Joined: Sun Sep 25, 2011 2:51 pm
Posts: 500
Git describe seems very sensible.

_________________
[...] 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


Top
 Profile  
 
PostPosted: Fri Feb 27, 2015 2:23 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
em3 wrote:
Git describe seems very sensible.


Git describe wants tag. Otherwise it can get just commit hash.

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


Top
 Profile  
 
PostPosted: Thu Mar 12, 2015 12:26 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4289
Location: Sol III
I've posted a proposal on the migration procedure here (I think the FreeOrion Project forum is better suited for this kind of discussion).


Top
 Profile  
 
PostPosted: Fri Mar 13, 2015 5:15 am 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
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.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Sun Mar 15, 2015 6:16 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4289
Location: Sol III
Cjkjvfnby wrote:
1) Git branches are located in single folder. I suggest to include branch name to version.
You mean the name of the currently checked out branch?
Quote:
2) Git can have unstaged changes. In what case you commit hash will not be same as build. (Looks like with SVN too.)
Yep, this is not different from how things work with SVN now already. We can't cover everything...
Quote:
Should I make a patch?
Why not? I'd like to see your suggestion.
Quote:
PS. You don't need to 'project rootdir' for git. (you can construct related path (os.path.join('..', os.path.dirname(__file__))))
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group