I don't know if this is the git config for tde or me that is causing the git clone of the tde tree to fail to clone the needed admin, cmake and other submodules when doing a clone of the entire project.
I cloned using:
git clone http://drankin@scm.trinitydesktop.org/scm/git/tde ./scripts/switch_all_submodules_to_head_and_clean
I have since used:
git pull ./scripts/switch_all_submodules_to_head_and_clean git submodule update --init
git reports the tree is up to date: 10:00 archangel:/dat_f/tde> git pull Already up-to-date.
However, working on tqtinterface, the tqtinterface/admin and tqtinterface/cmake directories are empty -- and tqtinterface will not build. Comparing what I see browsing the git repository online and what I have locally, there is no question files are missing.
For example, browsing:
http://git.trinitydesktop.org/cgit/admin/tree http://git.trinitydesktop.org/cgit/cmake/tree
both show fully populated directories on the server. However looking at the local copy I have after cloning -- I have nothing in either directory:
10:00 archangel:/dat_f/tde> ls -al main/dependencies/tqtinterface/{admin,cmake} main/dependencies/tqtinterface/admin: total 8 drwxr-xr-x 2 david david 4096 Feb 8 18:47 . drwxr-xr-x 5 david david 4096 Feb 8 18:47 ..
main/dependencies/tqtinterface/cmake: total 8 drwxr-xr-x 2 david david 4096 Feb 8 18:47 . drwxr-xr-x 5 david david 4096 Feb 8 18:47 ..
How is this possible? Is it me or git? Are there other command needed to activate the submodules after cloning the entire project and running the switch_all_submodules_to_head_and_clean script?
Also, when I run the switch_all_submodules_to_head_and_clean script, I get the following error:
This script can only be run from a top level git directory. Exiting... Stopping at 'experimental'; script returned non-zero status.
Now when I try and run the update_all_submodules script, I get errors like:
fatal: Not a git repository: /dat_e/tde/.git/modules/experimental Unable to find current revision in submodule path 'experimental' fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface Committing changes to /home/david/tdegit/tde fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface
fatal: Not a git repository: /dat_e/tde/.git/modules/experimental Unable to find current revision in submodule path 'experimental' fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface fatal: Not a git repository: /dat_e/tde/.git/modules/main/dependencies/tqtinterface Committing changes to /home/david/tdegit/tde fatal: Path 'main/dependencies/tqtinterface/cmake' is in submodule 'main/dependencies/tqtinterface' error: pathspec 'main/dependencies/tqtinterface/cmake' did not match any file(s) known to git.
Can I fix this, or do I just need to pull another complete copy of the tree?
On 02/16/2012 10:40 AM, David C. Rankin wrote:
I don't know if this is the git config for tde or me that is causing the git clone of the tde tree to fail to clone the needed admin, cmake and other submodules when doing a clone of the entire project.
I cloned using:
git clone http://drankin@scm.trinitydesktop.org/scm/git/tde ./scripts/switch_all_submodules_to_head_and_clean
I have since used:
git pull ./scripts/switch_all_submodules_to_head_and_clean git submodule update --init
git reports the tree is up to date: 10:00 archangel:/dat_f/tde> git pull Already up-to-date.
However, working on tqtinterface, the tqtinterface/admin and tqtinterface/cmake directories are empty -- and tqtinterface will not build. Comparing what I see browsing the git repository online and what I have locally, there is no question files are missing.
<snip>
Can I fix this, or do I just need to pull another complete copy of the tree?
One of the primary problems seems to be the creation of '.git' FILES instead of '.git' DIRECTORIES on checkout:
11:37 archangel:/dat_f/tde> find main -type f -name .git main/tdegraphics/.git main/tdeartwork/.git main/tdepim/.git main/libraries/libkexiv2/.git main/libraries/libksquirrel/.git main/libraries/mlt/.git main/libraries/pytdeextensions/.git main/libraries/libkdcraw/.git main/libraries/libkipi/.git
On 02/16/2012 11:41 AM, David C. Rankin wrote:
One of the primary problems seems to be the creation of '.git' FILES instead of '.git' DIRECTORIES on checkout:
11:37 archangel:/dat_f/tde> find main -type f -name .git main/tdegraphics/.git main/tdeartwork/.git main/tdepim/.git main/libraries/libkexiv2/.git main/libraries/libksquirrel/.git main/libraries/mlt/.git main/libraries/pytdeextensions/.git main/libraries/libkdcraw/.git main/libraries/libkipi/.git
I have identified the source of the problem, but I do NOT know what is causing it yet. The problem is .git FILES are being created by switch_all_submodules_to_head_and_clean. If I run:
cd tde find . -type f -name .git -exec rm '{}' ;
and then run
./scripts/switch_all_submodules_to_head_and_clean
all of the .git files are re-created and the 'admin' and 'cmake' files for the apps that have .git files are not populated with the shared data. eg:
12:51 archangel:/dat_f/tde> l main/dependencies/tqtinterface/ total 108 drwxr-xr-x 5 david david 4096 Feb 16 11:54 . drwxr-xr-x 14 david david 4096 Feb 8 17:37 .. drwxr-xr-x 2 david david 4096 Feb 8 18:47 admin drwxr-xr-x 2 david david 4096 Feb 8 18:47 cmake drwxr-xr-x 6 david david 4096 Feb 16 11:54 qtinterface -rw-r--r-- 1 david david 61 Feb 16 11:54 .git -rw-r--r-- 1 david david 206 Feb 16 11:54 .gitmodules -rw-r--r-- 1 david david 70 Feb 16 11:54 AUTHORS -rw-r--r-- 1 david david 1236 Feb 16 11:54 CMakeLists.txt -rw-r--r-- 1 david david 18277 Feb 16 11:54 COPYING -rw-r--r-- 1 david david 7265 Feb 16 11:54 ConfigureChecks.cmake -rw-r--r-- 1 david david 1375 Feb 16 11:54 Makefile.am.in -rw-r--r-- 1 david david 661 Feb 16 11:54 NAMING -rw-r--r-- 1 david david 5968 Feb 16 11:54 README -rw-r--r-- 1 david david 11 Feb 16 11:54 TODO -rw-r--r-- 1 david david 74 Feb 16 11:54 configure.in.bot -rw-r--r-- 1 david david 10611 Feb 16 11:54 configure.in.in -rw-r--r-- 1 david david 319 Feb 16 11:54 configure.in.mid -rw-r--r-- 1 david david 387 Feb 16 11:54 tqtinterface.lsm
If on the other hand I remove and clone a specific module itself, then I get a proper .git directory:
12:53 archangel:/dat_f/tde/main/dependencies> rm -r tqtinterface/ 12:54 archangel:/dat_f/tde/main/dependencies> git clone http://drankin@scm.trinitydesktop.org/scm/git/tqtinterface Cloning into 'tqtinterface'... remote: Counting objects: 4579, done remote: Finding sources: 100% (4579/4579) remote: Total 4579 (delta 3951), reused 4579 (delta 3951) Receiving objects: 100% (4579/4579), 1.55 MiB | 96 KiB/s, done. Resolving deltas: 100% (3951/3951), done. 12:54 archangel:/dat_f/tde/main/dependencies> l tqtinterface/ total 108 drwxr-xr-x 6 david david 4096 Feb 16 12:54 . drwxr-xr-x 14 david david 4096 Feb 16 12:54 .. drwxr-xr-x 8 david david 4096 Feb 16 12:54 .git drwxr-xr-x 2 david david 4096 Feb 16 12:54 admin drwxr-xr-x 2 david david 4096 Feb 16 12:54 cmake drwxr-xr-x 6 david david 4096 Feb 16 12:54 qtinterface -rw-r--r-- 1 david david 206 Feb 16 12:54 .gitmodules -rw-r--r-- 1 david david 70 Feb 16 12:54 AUTHORS -rw-r--r-- 1 david david 1236 Feb 16 12:54 CMakeLists.txt -rw-r--r-- 1 david david 18277 Feb 16 12:54 COPYING -rw-r--r-- 1 david david 7265 Feb 16 12:54 ConfigureChecks.cmake -rw-r--r-- 1 david david 1375 Feb 16 12:54 Makefile.am.in -rw-r--r-- 1 david david 661 Feb 16 12:54 NAMING -rw-r--r-- 1 david david 5968 Feb 16 12:54 README -rw-r--r-- 1 david david 11 Feb 16 12:54 TODO -rw-r--r-- 1 david david 74 Feb 16 12:54 configure.in.bot -rw-r--r-- 1 david david 10611 Feb 16 12:54 configure.in.in -rw-r--r-- 1 david david 319 Feb 16 12:54 configure.in.mid -rw-r--r-- 1 david david 387 Feb 16 12:54 tqtinterface.lsm
Then running switch_all_submodules_to_head_and_clean will pull in the submodule information (in this case abakus -- it is done first in the script), but fails on the next module with a .git FILE instead of a DIR.
Entering 'experimental' Preparing /dat_f/tde/experimental for development use HEAD is now at 61616ea Update autoconversion script Already up-to-date. HEAD is now at 61616ea Update autoconversion script Entering 'main/applications/abakus' Preparing /dat_f/tde/main/applications/abakus for development use HEAD is now at 9d4c1cd Reset submodule main/applications/abakus/admin to latest HEAD Already up-to-date. HEAD is now at 9d4c1cd Reset submodule main/applications/abakus/admin to latest HEAD Submodule 'admin' () registered for path 'admin' Submodule 'cmake' () registered for path 'cmake' Entering 'admin' Already on 'master' Entering 'cmake' Already on 'master' Entering 'admin' Already up-to-date. Entering 'cmake' Already up-to-date. Entering 'admin' This script can only be run from a top level git directory. Exiting... Stopping at 'admin'; script returned non-zero status. Entering 'main/applications/adept' This script can only be run from a top level git directory. Exiting... Stopping at 'main/applications/adept'; script returned non-zero status.
I'll leave this one to the git experts, I'm just chasing my tail...
I don't know if this is the git config for tde or me that is causing the git clone of the tde tree to fail to clone the needed admin, cmake and other submodules when doing a clone of the entire project.
I run a simple shell script to update my local GIT tree. Although originally I manually first created the local tree with the clone option, I wrote my script to perform that same function as well, just in case something awful happened at this end and I needed to start from scratch.
============================================================== GIT_TREE_ROOT="/home/public/builds/slackware/trinity" GIT_TREE="zz_src_trinity_git" echo "Updating the Trinity GIT tree..." CWD=$(pwd) if [ -d $GIT_TREE_ROOT/$GIT_TREE ]; then echo "Changing directory to $GIT_TREE_ROOT/$GIT_TREE." cd $GIT_TREE_ROOT/$GIT_TREE sh ./scripts/switch_all_submodules_to_head_and_clean anonymous else mkdir -p $GIT_TREE cd $GIT_TREE_ROOT git clone http://scm.trinitydesktop.org/scm/git/tde $GIT_TREE fi ==============================================================
Darrell
On 02/16/2012 12:50 PM, Darrell Anderson wrote:
I don't know if this is the git config for tde or me that is causing the git clone of the tde tree to fail to clone the needed admin, cmake and other submodules when doing a clone of the entire project.
I run a simple shell script to update my local GIT tree. Although originally I manually first created the local tree with the clone option, I wrote my script to perform that same function as well, just in case something awful happened at this end and I needed to start from scratch.
============================================================== GIT_TREE_ROOT="/home/public/builds/slackware/trinity" GIT_TREE="zz_src_trinity_git" echo "Updating the Trinity GIT tree..." CWD=$(pwd) if [ -d $GIT_TREE_ROOT/$GIT_TREE ]; then echo "Changing directory to $GIT_TREE_ROOT/$GIT_TREE." cd $GIT_TREE_ROOT/$GIT_TREE sh ./scripts/switch_all_submodules_to_head_and_clean anonymous else mkdir -p $GIT_TREE cd $GIT_TREE_ROOT git clone http://scm.trinitydesktop.org/scm/git/tde $GIT_TREE fi ==============================================================
Darrell
Thanks Darrell,
I've been doing it manually. I'll try pulling an anonymous copy and seeing if that may be the problem. I don't know. git is Greek to me :)
I've been doing it manually. I'll try pulling an anonymous copy and seeing if that may be the problem. I don't know. git is Greek to me
Yes, I connect anonymously. I don't have check-in permissions.
Darrell
On 02/16/2012 12:50 PM, Darrell Anderson wrote:
else mkdir -p $GIT_TREE cd $GIT_TREE_ROOT
I think this needs to be:
else cd $GIT_TREE_ROOT mkdir -p $GIT_TREE
:)