Migrate to DVCS

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
User avatar
heilkitty
Posts: 20
Joined: Fri Mar 08, 2013 6:36 am

Migrate to DVCS

Postby heilkitty » Wed Oct 02, 2013 5:21 am

Sorry if it has been discussed already, but I want to propose a migration from svn to git or mercurial (the latter being easier to use for folks who are haven't used DVCSs much). Development using forks, feature branches and pull requests would be much more neat than the current state - with patches on maillist. Maybe, who knows, this transition could attract some new developers which are now confused with current process.

sveinung
Elite
Posts: 436
Joined: Wed Feb 20, 2013 4:50 pm

Re: Migrate to DVCS

Postby sveinung » Wed Oct 02, 2013 1:11 pm

Please note that I only speak for my self.

Not commenting on if switching to a DVCS is bad or good. Only asking for a clarification about what you want.

Do you wish to use a VCS when working on Freeciv? This is already supported. As far as I know all big DVCS supports SVN. In Bazaar just do

Code: Select all

bzr branch http://svn.gna.org/svn/freeciv/trunk/


Do you wish to preserve meta data? At the moment stuff like author information is there but in custom tags in the description of SVN commits. Should we change to a DVCS and someone is willing to do it our custom tags could be converted during the conversion. Example: SVN only record commiter ID. During the conversion a scripts could look for "patch by " and set author ID based on that. Note that there is no guarantee that this will be done even if we change to a DVCS. (Personally I think it should be done in the case of a conversion)

Do you want us to change the development process? At the moment Freeciv use a gerrit like process. A patch is posted. It gets feed back. The feed back is addressed by posting a new patch. The patch is not committed until it is ready. The rejected versions of the patch aren't added to the VCS. See http://julien.danjou.info/blog/2013/rant-about-github-pull-request-workflow-implementation for more about this process. Another process is the one Bazaar is built around. A merge request is sent. It gets feed back. The feed back is addressed by additional commits to the branch. When the branch is ready it is merged. The rejected version is a part of the history and added to the VCS. Note that even if we switch to a DVCS it is not a given that the process will be Bazaarish. Bazaar it self has stagnated so I don't think it is an option. Using that process in Git is IMHO a bad idea.
Last edited by sveinung on Wed Oct 02, 2013 4:12 pm, edited 2 times in total.

User avatar
heilkitty
Posts: 20
Joined: Fri Mar 08, 2013 6:36 am

Re: Migrate to DVCS

Postby heilkitty » Wed Oct 02, 2013 2:25 pm

I meant the development process. I, personally, find github-like workflow more comfortable. But it's all up to active developers, at the end of the day.

sveinung
Elite
Posts: 436
Joined: Wed Feb 20, 2013 4:50 pm

Re: Migrate to DVCS

Postby sveinung » Wed Oct 02, 2013 4:12 pm

Please note that I only speak for my self.

heilkitty wrote:I meant the development process. I, personally, find github-like workflow more comfortable.

I used to prefer it too. Didn't want to loose details in the history. Those details could later turn out to be useful. I still keep the Bazaar branches I develop my Freeciv patches in after the patches them self have been merged. But those branches are separate. An arguments against the GitHub work flow even when the tool (git) issue is ignored is that when I read a version control history I'm interested in the logical changes, not the order the developer did them in his private branch.

I still have a slight preference for the GitHub work flow when all tools involved support it. Git don't*. Bazaar is stagnant. Do you know if Mercurial support it? In Bazaar one merge-trunk is considered special. Tools can focus on it and ignore the non approved and therefore possibly broken commits in merged branches. For more information about how Bazaar implements this support (with a focus on the disadvantages) read this.

heilkitty wrote:But it's all up to active developers, at the end of the day.

Sure. But it is nice to get input. Both on the technical aspect (what DVCS can do what) and on the social aspect (what developers prefer).

* It didn't the last time I checked.

User avatar
heilkitty
Posts: 20
Joined: Fri Mar 08, 2013 6:36 am

Re: Migrate to DVCS

Postby heilkitty » Thu Oct 03, 2013 8:48 am

It is possible to list logical changes only in mercurial if you follow certain conventions: http://icablog.org/2011/02/generating-u ... mercurial/ (TL;DR: make sets of small changes in branches, then merge to default, the commit message after merge being the overall description of that changes).
Dunno about git, but I think the similar technique is possible too.

cazfi
Elite
Posts: 1720
Joined: Tue Jan 29, 2013 6:54 pm

Re: Migrate to DVCS

Postby cazfi » Thu Oct 03, 2013 9:36 am

Switching to git (and probably to github hosting of master) has been suggested several times over the years. While mercurial has its user base (many projects), git is still by far more familiar to linux developers. However, switching would be no small task. It's not like our current processes are just what they are, but the result of decades of careful adjustments to make things, especially peer review and patch acceptance, to work best way posible. Even if we switch to another vcs, we want to keep at least some parts of our current process (for example, we'd still want to get patches sent to mailing list - probably even as gna tickets. Pull request would not be enough). Some code changes would be needed as there's things expecting that cvs checkout is from svn (--enable-svnrev -feature being one).
Also, for myself there's a problem that I've perfected my own freeciv development workflow around svn (and before that CVS, but transition between similar enough systems was quite painless). I'd need to rework pile of helper scripts and generally reorganize by freeciv development environments.
So, switch to git might be worthwhile at some point, but with our limited manpower it will be away from other development, and should be timed so that distruption to the project would be as small as possible. (Not just before major release, when we should be perfecting that release).

freeciv-web part of freeciv project is in git, master in github.

sveinung
Elite
Posts: 436
Joined: Wed Feb 20, 2013 4:50 pm

Re: Migrate to DVCS

Postby sveinung » Thu Oct 03, 2013 12:51 pm

Please note that I only speak for my self.

cazfi wrote:However, switching would be no small task.

My goal for this thread is to create a page in out Wiki about how big it would be and what choices would have to be made. A page like that would explanation why we still use SVN. Should we decide that moving is a good idea it could work as a TODO list for potential volunteers.

heilkitty wrote:Dunno about git, but I think the similar technique is possible too.

I should probably have explained that I was referring to tools like git bisect. In Git all repositories are equal. This is by design. The first parent in a merge isn't special. Expecting tools to see it as special isn't reasonable. This is why it is common to drop the original history when organizing it into logical commits in Git.

Currently I try to avoid the Bazaar work flow even when I use Bazaar. This makes it easier to convert to Git if Bazaar goes from stagnant to dead. Based on the existence of git replace I think that support for the Bazaar work flow could be done as a Git extension. (Note that even if it is possible to support Freeciv may still choose to not use it)

sveinung
Elite
Posts: 436
Joined: Wed Feb 20, 2013 4:50 pm

Re: Migrate to DVCS

Postby sveinung » Mon Mar 10, 2014 11:51 am

Useful resources if we are going to convert:

sveinung
Elite
Posts: 436
Joined: Wed Feb 20, 2013 4:50 pm

Re: Migrate to DVCS

Postby sveinung » Mon Mar 10, 2014 12:49 pm

In February this was discussed on the mailing list.

Issues raised by Jacob Nevins:
JTN wrote:integration with the ticket tracker is the dealbreaker. It is
still painful having lost our RT history; I'm not not willing to lose
our history again (or linkage to the VCS) without a very good reason.

JTN wrote:I believe a version of Savane supports Git, but not the version
installed on Gna. If that were ever fixed we might be able to keep our
history but change our VCS, but I'm not holding my breath.


JTN wrote:A possible downside is that we might lose translators who are used to
svn and aren't up for learning a new VCS.


Status update from Marko Lindqvist:
cazfi wrote:The only thing changed since this was discussed last time
( viewtopic.php?f=13&t=160 )
is that now we have initial version of --enable-gitrev feature.