FlightGear Git: splitting FGData: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (Manuals)
Line 71: Line 71:
* Gitorious does not support dots in repository names.
* Gitorious does not support dots in repository names.
** For now we just skipped dots, so Supermarine-S.6B has a repo called <tt>supermarine-s6b</tt> (note that Gitorious also does not distinct capitals).
** For now we just skipped dots, so Supermarine-S.6B has a repo called <tt>supermarine-s6b</tt> (note that Gitorious also does not distinct capitals).
* What rights should aircraft authors get?
** Commit/review might be best. If they are granted admin rights, they can delete the repo and possibly also remove the fgdata-developers as collaborators...


{{Appendix}}
{{Appendix}}

Revision as of 09:09, 18 October 2011

Aircraft are split to seperate Git repositories, under the FlightGear Aircraft project at Gitorious.

Reasons to split fgdata

  • Advantages
    • Aircraft authors can get commit access to their own aircraft, without granting them global fgdata access.
    • When pulling fgdata, one won't have to download several gigs of aircraft data. People will have to pull the base package, but any additional aircraft will be optional.
    • It will be easier for aircraft authors to check the history of their aircraft.
    • Commiting will go faster, because Git will no longer have to check those thousands of files to see whether they were edited.
  • Disadvantages
    • It will be harder to keep a local up to date copy of all aircraft. No more "git pull" to fetch all the latest updates.
      • Might be fixed by using Git submodules.[1]
    • How to deal with licences? Until now there was a COPYING file in fgdata. When aircraft are split in seperate repositories, they'll likely need to include a license reference themselves.
    • Need a concept for release management, maintaining version numbers, release branches, release tags et. al.

Starting new aircraft

New aircraft should not be commited to fgdata. A seperate repository should be created instead. Contact a FlightGear Aircraft admin to get your repository included in the FlightGear Aircraft project. You, as author, will get full admin rights for that repository.

The current fgdata developers will have access to every single aircraft repository. In order to maintain aircraft that no longer have an active author, fix global bugs etc. Other users can create merge requests to get their fixes/improvements commited.

Step 1: Split aircraft into seperate repositories

Aircraft are split into "private" repositories, under the FlightGear Aircraft project. Repositories for all aircraft in current fgdata have been created as of 17 October. Repository names equal directory-names (with the exceptions of dots (.) and capitals (ABC), as those are not supported by Gitorious.

There are two workflows that both do the trick:

Method 1

Note: the split branch (737-300-split in this example) must NOT exist beforehand.

cd $FG_ROOT 
git subtree split -P Aircraft/737-300 -b 737-300-split
mkdir -p ../split-aircraft/737-300
cd ../split-aircraft/737-300
git init
git fetch $FG_ROOT 737-300-split
git checkout -b master FETCH_HEAD
git push git@gitorious.org:flightgear-aircraft/737-300.git master

Method 2

(need to check this one)

cd fgdata
git clone --no-hardlinks /fgdata /737-300
git filter-branch --subdirectory-filter Aircraft/737-300 HEAD -- --all
git reset --hard
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --aggressive --prune=now

Then all aircraft should be pushed to their new repositories. A script will take care of that.

Step 2: Remove all aircraft from fgdata

Fgdata is frozen, all commit privileges revoked. Meanwhile, a new fgdata repository without any aircraft is created, pushed to gitorious and finally tested.

Step 3: Write/update manuals

Since the aircraft development flow will be different, we should teach our developers how to use the new system.

To be written:

To be updated:

Step 4: Switch fgdata

Once tests show that the new repository is working fine and no data has been lost, the repositories will be switched. The exisiting repository is renamed, and the new repository takes its place and access to the new repository is setup. The historic fgdata is kept but stays frozen, at least until we're sure everything is safe. It may also be a good idea to keep the existing repo, since it contains release branches - which are not part of the new repository and would be lost otherwise.

Questions

  • What to do with Aircraft/UIUC should it be placed like "one" aircraft in a aircraft-repository? Or each individual?
    • An flightgear-aircraft/UIUC repo has been created, we can delete it if needed later on.
  • Gitorious does not support dots in repository names.
    • For now we just skipped dots, so Supermarine-S.6B has a repo called supermarine-s6b (note that Gitorious also does not distinct capitals).
  • What rights should aircraft authors get?
    • Commit/review might be best. If they are granted admin rights, they can delete the repo and possibly also remove the fgdata-developers as collaborators...
References