git svn.
trunk, release branches and release tags. This is already enough confusion for users that are not scm literate developers, but tracks the minimally bounded core focus - manage foswiki releases.
One improvement that could become interesting, is to discourage direct pushes to the master repository, and instead, have developers send a pull request to the Smoke Test farm (a set of systems with different Perl's, OS's and configurations), and if a changeset passes, the System pulls that changeset in.
That would ensure that everyone can sync to a codebase that has been tested as effectively as possible...
git svn fetch --all on each directory). You end up with a directory structure very similar to a trunk checkout, except that each extension is its own separate git-svn repo, with ability to switch between scratch/release/trunk branches, and dcommit/svn rebase from them independently.
And it's fast - all three branches of TinyMCEPlugin come to a 32MB .git directory.
The good: git log shows only TinyMCEPlugin history
core, rather than the whole checkout
.git on an average svn.foswiki.org clone is only around ~250MB
fatal: http://github.com/foswiki/foswiki/info/refs not found: did you run git update-server-info on the server? ) but is ok with the gitorious one.
-- SvenDowideit - 14 Jun 2010
I like the "social coding" aspect of github. TinyMCE (and many other projects) have picked up quite a few contributions from random forkers there. As you know, spocke even accepted a patch from me, where previously it sat unnoticed on sf.net for over 6 months.
Do we lose much if github/gitorious is merely tracking a hypothetical git.foswiki.org repo? Sounds like we need pros/cons for self-hosted vs gitorious vs github.
My thoughts: svn up. I really don't care if we push to a github account or not. It will only hold the official trunk to pull from. Everybody can pull from each other as well. So risks are rather low, a lot lower compared to the current single point of failure.
Before moving to git we should think about which development model we should use. While I am pretty sure that best would be to keep a centralized approach (as the github question suggests), we should not discard alternatives too hastily.
-- MichaelDaum - 14 Jun 2010
I had previously opposed a move to git, because windows tools were not available. However, git clients are now available for windows so that argument is moot. I now definitely support a general move to git.
-- MichaelTempest - 14 Jun 2010
I also support such a move, and will be willing to help since I have some experience in moving projects from Subversion to Git.
-- AntonioTerceiro - 14 Jun 2010
I think I don't need to state where I stand on this
Just to mention that I tried TortoiseGIT? today, and was able to clone the github repo without any issue.
I guess we now need to hear from the "less technical" ones of us (no harm intended, just not everybody is happy with like 10 git commands to do something, but I do love it).
Also, I've written the HowToUseGit, but I agree with MichaelDaum, if we were to move to git, we should define a clear way of working. An easy one is to branch per bug item, commit on the branch, and then merge to trunk once ready.
Finally, all the concerns I've raised about the use of $Rev$ (CDot loves them), and the like, are still valid. Even though I tried to make some hooks where I could to support git, I haven't really tested BuildContrib? upload and the like with it, so we might need some dev.
And just to dream... imagine committing your LocalSite? .cfg into git, and all your wonderful tools you're using daily but you don't want everybody to look at because you're ashamed of how they're written. Now imagine getting all the latest changes and merging them with your local repo using git pull. It requires some discipline, but I'm pretty confident it's easy to do.
-- OlivierRaginel - 14 Jun 2010
I have never used GIT. I have read about it and I must admit I do not really understand how it works. From the documentation some of you have added it seems to me that there is much more of a learning curve compared to subversion which is extremely simple.
I would not want to fight with a new software CM tool now that we should be focused on getting 1.1 done
And before all you geeks make the decision to do this - please consider how this will impact the occasional extension developer. Will they have an easier learning curve or a steaper learning curve?
You win something with GIT I am sure. But what do we loose? Who do we loose. THINK. Please. And please wait till after 1.1
-- KennethLavrsen - 14 Jun 2010
Hi Kenneth,
I understand you're quite busy at the moment, but probably to partially address your concerns I feel that one of us should evaluate easygit for svn users - it is designed to be as much of a drop-in replacement for svn as possible.
Not sure about windows support.
Git has certainly increased my productivity - I can maintain local ("embarrassing") branches amongst my three staging VMs with ease. In fact, just git clean -fd is a really nice way to clean the checkout compared to some find...exec command.
-- PaulHarvey - 15 Jun 2010
first up, there's no way we do anything before 1.1 is out. As I said, the move from cvs to svn took 6months - there is no way we're changing quickly.
secondly, the occasional extension developer usecase is one of the main things that is slowing down the currently active developers (ok, so Crawford hasn't actually commented
) and we clearly have a strong history of trying to accommodate them (and will continue to do so)
specifically, I don't think what we've done works for the occasional developers either! many have never used svn, and ideally we wouldn't force them to learn any tool.
additional notes: Snerp Vortex. Anagram of Svn Exporter. It's a set of tools I wrote for the POE repository conversion. It converts POE's nearly 2900 revisions in about five minutes, so it's pretty cheap for me to scrap converted repositories and try again. And again.-- AndrewJones - 29 Aug 2010 Given that we import a lot of javascript code, can I just say that it would be nice to have git to pull from Eg. http://github.com/tinymce/tinymce, http://github.com/jquery/jquery... I am concerned that we haven't discussed how to utilise git submodules (I've not tried them yet). Possible benefits:
git submodule update $submodule
-- OlivierRaginel - 16 Nov 2010
I am evaluating easygit. I'll see how it goes
-- MichaelTempest - 17 Nov 2010
What I would like to see, beforehand, is a proposal on the development model using pure GIT (not git svn stuff). This document should show both the "casual user" workflow (that will be, at the end, pretty similar to the current workflow) and the "hardcore developer" workflow (which includes branching and stuff... I think they are covered by the HowToUseGit but the workflow is not clear)
This should mitigate any fear of moving to git. The learning curve is steeper than svn, but for a simple workflow you'll end up with using 3 or 4 commands only which are pretty much the same as the svn counterparts.
Anyway, I'm all for moving to git.
-- RafaelAlvarez - 25 Nov 2010
Interposed question from an user: Did anyone try the Trademark Wikis GitPlugin on Foswiki yet? Wouldn't that rise the acceptance of the inevitable
considerably?
-- FranzJosefGigler - 26 Nov 2010
Crawford migrated this plugin to Foswiki and uploaded it. He read the code a bit, and stopped. I read it for 5 minutes before concluding whoever wrote that had no idea whatsoever what git was, and its power. So, unless I'm totally wrong (and so is CDot), this plugin should be forgotten and stored in the category: Things you shouldn't do.
To reply to Soronthar, when I wrote HowToUseGit I tried to explain how I was using it, and why. It seems nobody understood, and found it too complex. So I stopped. I agree I should have split it into 2 like you suggest. But any Git SVN crash course would do:
| Action | Subversion | git | Remark |
|---|---|---|---|
| Initial checkout | svn checkout url | git clone url | git gets the entire history |
| Get latest version | svn update | git pull | git gets the new stuff, and tries to merge the tree. SVN merges the files, one by one |
| Commit | svn commit | git commit -a | git will commit LOCALLY. You have to push your changes back before they're published |
| Add a new file | svn add | git add | identical |
| Remove a file | svn rm | git rm | identical |
| Move a file | svn mv | git mv | identical |
| Revert a file | svn revert path | git checkout path | identical |
| Revert a commit | svn merge -c -<rev> svn commit |
git revert commit-id; | git revert creates a new commit that removes the changes of the identified commit. svn merge with a negative rev-id removes the rev into the working copy and requires a commit |
| Get the current status | svn status | git status | identical |
| Get a diff of changes | svn diff | git diff | identical, but git is faster and more powerful for that, afaik |
| View history | svn log | git log | identical |
| Show an individual commit | svn log -v -r nnnn svn diff -c nnnn |
git show commit-id | git can show the complete commit atom with commit messages and the diff of changes using a single command. svn requires 2 commands. |
| Apply a commit from one branch into another | svn merge -c rev | git cherry-pick commit-id | As for a revert, git commits, whereas SVN does not |
| Amend file with checkins per line | svn blame | git blame | identical |
| Find which commit broke something | N/A | git bisect | git can apply checkouts between a "known good" and "known bad" release so the bad commit can be identified. |
| Publish back your changes | N/A | git push | Everything you do in git is local, so before you push, nobody will see anything. It pushes people to commit often, try things, then revert, and when they're ready to push, they clean their changelog |
Thanks George for amending. Honestly, reading any crash course should be much better and worth it, but at least you have the basics all in one table. A kind of cheat sheet
-- OlivierRaginel - 26 Nov 2010
I want to address some people who might be put off by reading on IRC about some of the problems myself and perhaps others have had with git... But it's worth noting that in my case, most of the problems I've encountered have been dealing with the git-svn side of things, where if it was a pure git workflow I'd likely not be exposing myself quite so much to git's more boring details.
Having said that, git-svn isn't that difficult to operate, and there's still no way I'd go back to a svn client even if foswiki.org stuck with svn for another 10 years.
-- PaulHarvey - 27 Nov 2010
Thanks to Oliver's excellent comparison git vs svn commands, it should be clear that for a contributor most common steps doesn't change that much at all. However there are still some things to lay down: most importantly building a release.
Another crutial point of moving to git is submodules, as Paul already outlined. What we lose when moving from svn to git is partoal checkouts, that is: using git you will no longer be able to check out a specific subdirectory of your choice anymore. This sounds as a disadvantage at first but stems from a fundamental difference in how these two VCSes work.
That's why there are "submodules" in git.
Before being able to MoveCodeRepositoryToGit, we will ultimately have to define which submodules we want to have and how this is related not only to daily work on the code but also how this is related to the release management and of course branching. I am not sure how switching to a different branch of the main module is propagated to the submodules part of the ckeckout.
It might very well be that even though git has got support for submodules, we will have to ease branching and releasing with a set of management scripts. We already have a bunch of them related to building a release. These need to be rewritten very carefully covering the submodule structure whatever they look like.
Related to slicing the source code into submodules is the directory structure in git: some of the practices we have become familiar working with the svn repo might need a review. For one of course, we will not have to keep branches and tags checked out in separate directories per default. But what does that mean for people that are used to run multiple branches simultaneously as virtual hosts or on different ports or paths from the same checkout area now, e.g. foswiki-1.0.x: port 8000, foswiki-1.1.x: port 8001, foswiki-trunk: port 80, all of these running from their respective checked out branch in a pseudo-install env. How does that look like using git? This also relates to how we will backport fixes in one branch to trunk or vice versa.
The last question is sort of on the fringe of two separate oportunities of using git: (1) code management of an open source project and (2) suporting virtual hosting using git.
As part of (2) it would be even nicer to have foswiki's revision control itself on git as well instead of RCS. So docu and wiki apps you write online are checked in directly and don't need an extra ckeckin to YAFR (yet another f* repository).
-- MichaelDaum - 27 Nov 2010
Michael, some of the stuff you said are either incorrect or misleading, unfortunately.
git submodule update --init --recurse).
-- OlivierRaginel - 27 Nov 2010
Olivier, thanks for the clarification. -- Fixed my name
-- MichaelDaum - 27 Nov 2010
I've just started using repo-per-extension at work. I absolutely think this is the way to go - I suppose the only thing that might be more difficult are the 'global' changes we sometimes do in one commit; these would need a separate commit on every plugin git submodule foreach
-- OlivierRaginel - 28 Nov 2010
./pseudo-install.pl does everything, including get the source, updates things - ala ./pseudo-install.pl rebase developer to update all the developer modules, or ./pseudo-install.pl checkout Release01x01 developer to convert all the developer modules to 1.1, while leaving the other plugins there for testing...
-- SvenDowideit - 19 Dec 2010
http://git.trin.org.au/foswiki/ is now finished sync'ing all ~500 extensions from svn into their own separate git repos, with self-contained scratch/trunk/release branches. There won't be any updates until I have finished the script which will intelligently run git svn fetch --all only on those extensions which have had changes.
-- PaulHarvey - 20 Dec 2010
From discussions with pharvey and babar on IRC:
super-module.
git clone --recurse will populate all of the Extensions, similar to a full SVN checkout
git fetch in the sub-module will populate the sub-module from the repo.
pi of a "empty" directory triggers the fetch to populate the extension
-- GeorgeClark - 21 Dec 2010
Added a quick & dirty script to connect a bunch if git cloned repos back up to svn. Example:
git clone http://git.trin.org.au/foswiki/core.git
git clone http://git.trin.org.au/foswiki/TinyMCEPlugin.git
git clone http://git.trin.org.au/foswiki/TablePlugin.git
./fixclonedrepo.pl *
find . -maxdepth 1 -type d -exec bash -c 'cd {} && git svn rebase' \;
NB: http is a very slow transport for git, need to get these repos up on github.
-- PaulHarvey - 22 Dec 2010
tools/check_manifest.pl is tied to svn commands to list the files in the repository. (Fixed by OlivierRaginel on trunk)
lib/Foswiki/Net.pm uses the keyword substition of $Rev$ to set the agent string for net requests by Foswiki
tools/build.pl sets the keyword LASTBUILD - this is not supported by git svn.
<!-- Foswiki Checkin: $Date$ --> If we go ahead with this Foswiki distribution document: %REVSTAMP% %IF{"'%REVINFO{format="$rev"}%'!='1'" then="Local Revisions"}%
Where REVSTAMP is either dynamic repo information or a static string inserted by build.pl
-- GeorgeClark - 07 Oct 2011
| TopicSummary | migrate from Subversion to git |
| CurrentState | UnderInvestigation |
| CommittedDeveloper | OlivierRaginel, PaulHarvey, SvenDowideit |
| ReasonForDecision | None |
| DateOfCommitment | 17 Jul 2010 |
| ConcernRaisedBy | |
| BugTracking | |
| RelatedTopics | |
| PlannedFor |
| I | Attachment | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|
| |
fixclonedrepo.pl.txt | manage | 3.7 K | 22 Dec 2010 - 03:16 | PaulHarvey | Fix a git cloned repo so that it can dcommit/svn rebase again |
| |
foswiki-git-branching.png | manage | 24.6 K | 21 Dec 2010 - 01:53 | GeorgeClark | |
| |
foswiki-git-repo.png | manage | 26.1 K | 20 Dec 2010 - 22:49 | GeorgeClark | git repo organization |
| |
gitrepoperextension.pl.txt | manage | 2.0 K | 22 Dec 2010 - 03:18 | PaulHarvey | Create a git-repo-per-extension on svn.foswiki.org |
| |
pseudo-install.pl.txt | manage | 22.5 K | 22 Dec 2010 - 04:52 | PaulHarvey | a pseudo-install that tries to fetch with git if the module is missing |
