Board index FlightGear Support 3rd Party Repositories

Cloning fgdata with GIT submodules

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Tue May 05, 2015 1:11 am

IAHM-COL wrote in Sat Apr 18, 2015 1:39 am:FGDATA NEXT with submodules updated to SVN Revision 640

That's it :D
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

fatal: reference is not a tree

Postby pommesschranke » Tue May 05, 2015 3:17 pm

is it ok to do
Code: Select all
git submodule update --init

or
Code: Select all
git submodule init

more than once or will I loose data then ?


i get those messages:

Code: Select all
git submodule update
fatal: reference is not a tree: d13edddb5387b1e702471f84cdab25f21e6d0371
fatal: reference is not a tree: 8755432e09e2218e4c1c49aa1e1143e6a9f79f6f
fatal: reference is not a tree: a3de246bcec6b88a175a972bf704b3f76878c67f
fatal: reference is not a tree: 4f85decdde6a22715f6bd60c7a70afa7cd17f586
fatal: reference is not a tree: 7c16a99db8d42a34186abdd86c53b3bcbce715a9
fatal: reference is not a tree: dc7592d37d620e086f74d49f73e9ee10d8868d58
fatal: reference is not a tree: ceaca671d76af9cdcdb479666c4f456b9fca57c0
fatal: reference is not a tree: e832ffc8832c7a83aec15851e502621665da7c6a
Unable to checkout 'd13edddb5387b1e702471f84cdab25f21e6d0371' in submodule path 'Aircraft/777'
Unable to checkout '8755432e09e2218e4c1c49aa1e1143e6a9f79f6f' in submodule path 'Aircraft/A320-family'
Unable to checkout 'a3de246bcec6b88a175a972bf704b3f76878c67f' in submodule path 'Aircraft/Antonov-An-12'
Unable to checkout '4f85decdde6a22715f6bd60c7a70afa7cd17f586' in submodule path 'Aircraft/Antonov-An-22'
Unable to checkout '7c16a99db8d42a34186abdd86c53b3bcbce715a9' in submodule path 'Aircraft/Beechcraft-Staggerwing'
Unable to checkout 'dc7592d37d620e086f74d49f73e9ee10d8868d58' in submodule path 'Aircraft/CRJ700-family'
Unable to checkout 'ceaca671d76af9cdcdb479666c4f456b9fca57c0' in submodule path 'Aircraft/Tornado'
Unable to checkout 'e832ffc8832c7a83aec15851e502621665da7c6a' in submodule path 'Aircraft/Victor'
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Tue May 05, 2015 4:17 pm

Hi D-laser

I don't think you are loosing data (that's one of the hardest thing to do in a git repo)
To loose data you have to do an operation call filter branch and it is totally not advisable unless you really know what you are doing.
(it will rewrite history)

Now
For your output, it seems to me you are trying to reinit without pulling.
The aircrafts outputting a problem were recently updated, so a "git pull" should be the way-2-update

You can init a submodule as many times as you want, but if you had not de-init before, and it is updated, it will come at no effect.

I suggest we begin by trying this

Code: Select all
git pull
git submodule update


Let me know what outputs
Best,
IH-COL
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Cloning fgdata with GIT submodules

Postby pommesschranke » Wed May 06, 2015 5:33 pm

x@i3:~/submodules$ git pull
Already up-to-date.
x@i3:~/submodules$ git submodule init
x@i3:~/submodules$ git submodule update
fatal: reference is not a tree: f4a2afc5e6a054fb62ca7ca1778d5a499f22169e
fatal: reference is not a tree: bb543e51cdaf89eb9281d5109385e9c33d47db33
fatal: reference is not a tree: 7c16a99db8d42a34186abdd86c53b3bcbce715a9
fatal: reference is not a tree: 0273529fb67b4727fbac7bf28b06cfe55805d1e3
fatal: reference is not a tree: ceaca671d76af9cdcdb479666c4f456b9fca57c0
fatal: reference is not a tree: e832ffc8832c7a83aec15851e502621665da7c6a
Unable to checkout 'f4a2afc5e6a054fb62ca7ca1778d5a499f22169e' in submodule path 'Aircraft/Antonov-An-12'
Unable to checkout 'bb543e51cdaf89eb9281d5109385e9c33d47db33' in submodule path 'Aircraft/Antonov-An-22'
Unable to checkout '7c16a99db8d42a34186abdd86c53b3bcbce715a9' in submodule path 'Aircraft/Beechcraft-Staggerwing'
Unable to checkout '0273529fb67b4727fbac7bf28b06cfe55805d1e3' in submodule path 'Aircraft/CRJ700-family'
Unable to checkout 'ceaca671d76af9cdcdb479666c4f456b9fca57c0' in submodule path 'Aircraft/Tornado'
Unable to checkout 'e832ffc8832c7a83aec15851e502621665da7c6a' in submodule path 'Aircraft/Victor'


http://stackoverflow.com/questions/1342 ... not-a-tree
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Wed May 06, 2015 5:56 pm

Hi D-LASER

Ok
Before entering in full diagnostics mode, lets try to deinit and re-init the few conflicting aircraft
The SHA1 summaries indicated in the error log are correct, except for the CRJ700-Family. I don't recognize 02735

Code: Select all
git submodule deinit Aircraft/{Antonov-An-12,Antonov-An-22,Beechcraft-Staggerwing,CRJ700-family,Tornado,Victor}
git submodule init Aircraft/{Antonov-An-12,Antonov-An-22,Beechcraft-Staggerwing,CRJ700-family,Tornado,Victor}
git submodule update Aircraft/{Antonov-An-12,Antonov-An-22,Beechcraft-Staggerwing,CRJ700-family,Tornado,Victor}


Let me know what are the outputs please

:D

Thanks
IH-COL

PS;
First step deinits the list of conflicting aircraft
Second step inits them again
Last step updates them again
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Cloning fgdata with GIT submodules

Postby pommesschranke » Fri May 08, 2015 7:09 pm

Code: Select all
git submodule deinit -f Aircraft/{Antonov-An-12,Antonov-An-22,Beechcraft-Staggerwing,CRJ700-family,Tornado,Victor}
Cleared directory 'Aircraft/Antonov-An-12'
Cleared directory 'Aircraft/Antonov-An-22'
Cleared directory 'Aircraft/Beechcraft-Staggerwing'
Cleared directory 'Aircraft/CRJ700-family'
Cleared directory 'Aircraft/Tornado'
Cleared directory 'Aircraft/Victor'
x@i3:~/submodules$ git submodule init Aircraft/{Antonov-An-12,Antonov-An-22,Beechcraft-Staggerwing,CRJ700-family,Tornado,Victor}
Submodule 'Aircraft/Antonov-An-12' (https://github.com/FGMEMBERS/Antonov-An-12.git) registered for path 'Aircraft/Antonov-An-12'
Submodule 'Aircraft/Antonov-An-22' (https://github.com/FGMEMBERS/Antonov-An-22.git) registered for path 'Aircraft/Antonov-An-22'
Submodule 'Aircraft/Beechcraft-Staggerwing' (https://github.com/FGMEMBERS/Beechcraft-Staggerwing.git) registered for path 'Aircraft/Beechcraft-Staggerwing'
Submodule 'Aircraft/CRJ700-family' (https://github.com/FGMEMBERS/CRJ700-family.git) registered for path 'Aircraft/CRJ700-family'
Submodule 'Aircraft/Tornado' (https://github.com/FGMEMBERS/Tornado.git) registered for path 'Aircraft/Tornado'
Submodule 'Aircraft/Victor' (https://github.com/FGMEMBERS/Victor) registered for path 'Aircraft/Victor'
x@i3:~/submodules$ git submodule update Aircraft/{Antonov-An-12,Antonov-An-22,Beechcraft-Staggerwing,CRJ700-family,Tornado,Victor}
fatal: reference is not a tree: f4a2afc5e6a054fb62ca7ca1778d5a499f22169e
fatal: reference is not a tree: bb543e51cdaf89eb9281d5109385e9c33d47db33
fatal: reference is not a tree: 7c16a99db8d42a34186abdd86c53b3bcbce715a9
remote: Counting objects: 44, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 44 (delta 18), reused 41 (delta 15), pack-reused 0
Unpacking objects: 100% (44/44), done.
From https://github.com/FGMEMBERS/CRJ700-family
   a744b96..b93b7cc  master     -> origin/master
fatal: reference is not a tree: 0273529fb67b4727fbac7bf28b06cfe55805d1e3
fatal: reference is not a tree: ceaca671d76af9cdcdb479666c4f456b9fca57c0
fatal: reference is not a tree: e832ffc8832c7a83aec15851e502621665da7c6a
Unable to checkout 'f4a2afc5e6a054fb62ca7ca1778d5a499f22169e' in submodule path 'Aircraft/Antonov-An-12'
Unable to checkout 'bb543e51cdaf89eb9281d5109385e9c33d47db33' in submodule path 'Aircraft/Antonov-An-22'
Unable to checkout '7c16a99db8d42a34186abdd86c53b3bcbce715a9' in submodule path 'Aircraft/Beechcraft-Staggerwing'
Unable to checkout '0273529fb67b4727fbac7bf28b06cfe55805d1e3' in submodule path 'Aircraft/CRJ700-family'
Unable to checkout 'ceaca671d76af9cdcdb479666c4f456b9fca57c0' in submodule path 'Aircraft/Tornado'
Unable to checkout 'e832ffc8832c7a83aec15851e502621665da7c6a' in submodule path 'Aircraft/Victor'


this is just as a feedback for you. I does not bother me much when I cannot pull 1% (6 out of 600) of the aircraft, but I am still interested in learning to understand git.
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Fri May 08, 2015 7:12 pm

ok
Diagnostics mode

we need to know what you get over these commands

apply them over the FGDATA next with submodules
Code: Select all
git remote -v
git log next
git pull
git log next


for a comparison

Code: Select all
israel@linux-hkow:~/local/source/fgdataNew> git remote -v
origin   ssh://iahm-col@git.code.sf.net/p/fgdata/submodules (fetch)
origin   ssh://iahm-col@git.code.sf.net/p/fgdata/submodules (push)


Code: Select all
commit 783aef6435b692c31897ed9c31a40bc25c2e092f
Author: IAHM-COL <israel.a.hernandez@gmail.com>
Date:   Fri May 8 11:05:02 2015 -0700

    Submodules::Aircraft Liveries added from the database (iv)

commit 6a1c21678e24c09921901ab8f3db16bd0c8eea84
Author: IAHM-COL <israel.a.hernandez@gmail.com>
Date:   Fri May 8 08:40:34 2015 -0700

    Submodules::Aircraft updated SVN revision 647

commit f65ef564c817d4983c7ab411430785ae398573a8
Author: IAHM-COL <israel.a.hernandez@gmail.com>
Date:   Thu May 7 13:02:20 2015 -0700

    Submodules::Aircraft updates with liveries form the database added (iii)
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Fri May 08, 2015 8:20 pm

Hi D-LASER
I dont know how far you are in the diagnostics commands above.
we will still need them, but I have a question.
Had you modified locally the CRJ700-family (ie, make commits in your repository within the FGDATA next with submodules?)

I had seen the SHA1 summaries output in the error log, all are normal except the CRJ700 family. I can't recognize that particular
commit 0273529fb67b4727fba in the FGMEMBERs repo.
https://github.com/FGMEMBERS/CRJ700-family

That seems to be the root of our current problem

Also,
had you commit to your FGDATA next with submodules (anything at all?); Specially referring to a CRJ700-family change?


This is what it seems happening (with the information I currently have)
your FGDATA next submodule is trying to update to a commit that also can't find in the remote repo (CRJ-700).

This is a "best practice" when working with submodules:
It is safer to modify any particular submodule in an independent tree, outside of the super-repository. Then after pushing to the remote, pulling with the submodule

in FGDATA next
Code: Select all
git submodule Aircraft/CRJ700-family git pull


that way, you can make sure you have a "clean" submodule tree --instead of having commits that the remote know nothing about.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Cloning fgdata with GIT submodules

Postby legoboyvdlp » Mon Jun 01, 2015 1:37 pm

OK Isreal.

So I first do this.
Code: Select all
$git clone http://git.code.sf.net/p/fgdata/submodules fgdata


Is that updated? Like is it the latest 01/06/15 fgdata? Do I point FlightGear to it?
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Mon Jun 01, 2015 1:40 pm

yes. You clone the FGDATA with submodules as first step
Yes. It is updated as on commit : 1142bde5e9cc13d320e137c by Curtis Olson on May28
(which is the last commit over FGDATA)

Then Aircrafts are updated to SVN revision 691 (which again is the last revision on the moment I am typing here)

Therefore, FGDATA with submodules is up to date with the tip of development.

Step 1: Clone fgdata with submodules as you indicate above

legoboyvdlp wrote in Mon Jun 01, 2015 1:37 pm:
So I first do this.
Code: Select all
$git clone http://git.code.sf.net/p/fgdata/submodules fgdata




Step2: : Enter the directory of the repository

Step3: Initialize the Aircraft you are interested in
You said ALL aircraft. So


Code: Select all
$git submodule init

Does the trick

Step 4: Perform the install of Initialized aircraft

Code: Select all
$git submodule update

That is going to take some time, while you install about 650 aircraft.
Its about 16G of downloads,
It goes blasting fast. GIthub speeds are unbelievable.
But your connection is a limitant too :)

Expect a minimun of 3 hours of fetching aircraft. But it is worthy

Updating the aircraft will take you a few minutes, everyonce in a while
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Cloning fgdata with GIT submodules

Postby legoboyvdlp » Mon Jun 01, 2015 1:44 pm

So I would set $FG_ROOT to what I download? What if I did the --depth 1? (Which is what I did! You see, I don't want to sit all day with "2 or 3 coffees", main reason being there is hardly any coffee in Venezuela! "Seriously Overpriced Coffee" - Lego Movie!
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Mon Jun 01, 2015 1:54 pm

I am not sure about --depth=1 being great idea

Why?
Because then you cannot easily update again.

If you do your normal clone

Code: Select all
git pull
git submodule update


Will keep you cleanly updated

With --depth=1
you get a shallow clone which can't update anymore.

I believe that rumor that --depth=1 is a good idea is spread by a misinformed someone. Sorry :(
Last edited by IAHM-COL on Mon Jun 01, 2015 2:02 pm, edited 1 time in total.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Cloning fgdata with GIT submodules

Postby legoboyvdlp » Mon Jun 01, 2015 1:59 pm

Alright, I will cancel, start, and go get breakfast.
100KIB/s
1000KB = 1 MB.
10s/MB
1GB= 1000MB
10x1000 is 10000
+10x300 (3000) is 13000 seconds or ~3.5 hrs! Lunchtime then :) Not to mention init. Might be all day!
Cool, I was able to pick up where I finished yesterday in cloning. Instant 15%! Might just be 3hrs!
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Cloning fgdata with GIT submodules

Postby IAHM-COL » Mon Jun 01, 2015 2:01 pm

Well
That's nothing compared to the several months it has taken me collecting all that information in a single place ;)
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4057
Joined: Wed Aug 08, 2012 6:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Cloning fgdata with GIT submodules

Postby legoboyvdlp » Mon Jun 01, 2015 2:03 pm

Yes! Thanks so much Isreal-- it is quite easy to do, and is much in the spirit of FlightGear!
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

PreviousNext

Return to 3rd Party Repositories

Who is online

Users browsing this forum: No registered users and 0 guests