Guys,
I have used the switch_all_submodules_to_head_and_clean script to update repositories that were about a year old. This has totally messed up my local copies. Please note:
I DO NOT HAVE ANY LOCAL CHANGES.
I JUST WANT TO PULL A FRESH COPY OF NEW/CHANGED FILES FROM THE SERVER.
After running the switch_all script 'git status' shows:
$ git status # On branch master # Your branch and 'origin/master' have diverged, # and have 8438 and 3318 different commits each, respectively. # # Unmerged paths: # (use "git reset HEAD <file>..." to unstage) # (use "git add <file>..." to mark resolution) # # added by us: submodules # # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # (commit or discard the untracked or modified content in submodules) # # modified: main/applications/abakus (modified content) # modified: main/applications/adept (modified content) # modified: main/applications/amarok (modified content) # modified: main/applications/basket (modified content) # modified: main/applications/bibletime (modified content) # modified: main/applications/compizconfig-backend-kconfig (modified content) # modified: main/applications/desktop-effects-tde (modified content) # modified: main/applications/digikam (modified content) # modified: main/applications/dolphin (modified content) # modified: main/applications/filelight (modified content) # modified: main/applications/fusion-icon (modified content) # modified: main/applications/gtk-qt-engine (modified content) # modified: main/applications/gwenview (modified content) # modified: main/applications/k3b (modified content) # modified: main/applications/k9copy (modified content) # modified: main/applications/kaffeine (modified content) # modified: main/applications/kaffeine-mozilla (modified content) # modified: main/applications/katapult (modified content) # modified: main/applications/kbarcode (modified content) # modified: main/applications/kbfx (modified content) # modified: main/applications/kbookreader (modified content) # modified: main/applications/kchmviewer (modified content) # modified: main/applications/kcpuload (modified content) # modified: main/applications/kdbusnotification (modified content) # modified: main/applications/kdiff3 (modified content) # modified: main/applications/kdirstat (modified content) # modified: main/applications/kdmtheme (modified content) # modified: main/applications/kdpkg (modified content) # modified: main/applications/keep (modified content) # modified: main/applications/kerry (modified content) # modified: main/applications/kgtk-qt3 (modified content) # modified: main/applications/kile (modified content) # modified: main/applications/kima (modified content) # modified: main/applications/kio-apt (modified content) # modified: main/applications/kio-locate (modified content) # modified: main/applications/kio-umountwrapper (modified content) # modified: main/applications/kiosktool (modified content) # modified: main/applications/kmplayer (modified content) # modified: main/applications/kmyfirewall (modified content) # modified: main/applications/kmymoney (modified content) # modified: main/applications/knemo (modified content) # modified: main/applications/knetload (modified content) # modified: main/applications/knetstats (modified content) # modified: main/applications/knetworkmanager8 (modified content) # modified: main/applications/knetworkmanager9 (modified content) # modified: main/applications/knights (modified content) # modified: main/applications/knowit (modified content) # modified: main/applications/knutclient (modified content) # modified: main/applications/koffice (modified content) # modified: main/applications/konversation (modified content) # modified: main/applications/kopete-otr (modified content) # modified: main/applications/kpicosim (modified content) # modified: main/applications/kpilot (modified content) # modified: main/applications/kpowersave (modified content) # modified: main/applications/kradio (modified content) # modified: main/applications/krename (modified content) # modified: main/applications/krusader (modified content) # modified: main/applications/ksplash-engine-moodin (modified content) # modified: main/applications/ksquirrel (modified content) # modified: main/applications/kstreamripper (modified content) # modified: main/applications/ksystemlog (modified content) # modified: main/applications/ktechlab (modified content) # modified: main/applications/ktorrent (modified content) # modified: main/applications/kuickshow (modified content) # modified: main/applications/kvirc (modified content) # modified: main/applications/kvkbd (modified content) # modified: main/applications/piklab (modified content) # modified: main/applications/potracegui (modified content) # modified: main/applications/rosegarden (modified content) # modified: main/applications/smartcardauth (modified content) # modified: main/applications/smb4k (modified content) # modified: main/applications/soundkonverter (modified content) # modified: main/applications/tde-guidance (modified content) # modified: main/applications/tde-style-lipstik (modified content) # modified: main/applications/tde-style-qtcurve (modified content) # modified: main/applications/tde-systemsettings (modified content) # modified: main/applications/tdesudo (modified content) # modified: main/applications/tdesvn (modified content) # modified: main/applications/tellico (modified content) # modified: main/applications/twin-style-crystal (modified content) # modified: main/applications/wlassistant (modified content) # modified: main/applications/yakuake (modified content) # modified: main/dependencies/arts (modified content) # modified: main/dependencies/dbus-1-tqt (modified content) # modified: main/dependencies/dbus-tqt (modified content) # modified: main/dependencies/tqtinterface (modified content) # modified: main/libraries/kipi-plugins (modified content) # modified: main/libraries/libkdcraw (modified content) # modified: main/libraries/libkexiv2 (modified content) # modified: main/libraries/libkipi (modified content) # modified: main/libraries/libksquirrel (modified content) # modified: main/libraries/mlt (modified content) # modified: main/libraries/mlt++ (modified content) # modified: main/libraries/pytdeextensions (modified content) # modified: main/libraries/python-trinity (modified content) # modified: main/tde-i18n (modified content) # modified: main/tdeaccessibility (modified content) # modified: main/tdeaddons (modified content) # modified: main/tdeadmin (modified content) # modified: main/tdeartwork (modified content) # modified: main/tdebase (modified content) # modified: main/tdebindings (modified content) # modified: main/tdeedu (modified content) # modified: main/tdegames (modified content) # modified: main/tdegraphics (modified content) # modified: main/tdelibs (modified content) # modified: main/tdemultimedia (modified content) # modified: main/tdenetwork (modified content) # modified: main/tdepim (modified content) # modified: main/tdesdk (modified content) # modified: main/tdetoys (modified content) # modified: main/tdeutils (modified content) # modified: main/tdevelop (modified content) # modified: main/tdewebdev (modified content) # no changes added to commit (use "git add" and/or "git commit -a")
On a second box after trying all the suggested "git add" and "git commit -a", I am left with:
11:25 providence:~/tde/tde> git status # On branch master # Your branch and 'origin/master' have diverged, # and have 9509 and 3318 different commits each, respectively. # # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # (commit or discard the untracked or modified content in submodules) # # modified: experimental (new commits) # modified: main/applications/kdmtheme (modified content) # modified: main/applications/kio-apt (modified content) # modified: main/applications/kio-locate (modified content) # modified: main/applications/kio-umountwrapper (modified content) # modified: main/applications/knetworkmanager9 (modified content) # modified: main/applications/kpowersave-nohal (modified content) # modified: main/applications/kradio (modified content) # no changes added to commit (use "git add" and/or "git commit -a")
But nothing else will help for those files. Further, the content of the local copy does not match the content on http://git.trinitydesktop.org/cgit/scripts/tree/
11:28 providence:~/tde/tde> ll scripts/ total 24 -rwxr-xr-x 1 david david 1571 Dec 31 01:17 commit_all_submodules -rw-r--r-- 1 david david 128 Dec 31 01:17 README -rwxr-xr-x 1 david david 1463 Dec 31 01:17 switch_all_submodules_to_head_and_clean -rwxr-xr-x 1 david david 1940 Dec 31 01:17 update_all_submodules
I have tried every from of git commit command either (1) suggested by git in the error messages or (2) from https://www.kernel.org/pub/software/scm/git/docs/user-manual.html#resolving-... Nothing works. Why does the switch script not simply:
"throw away any changes and get a fresh copy of the source"
That is exactly what I want to do -- how can I do that?
I do not want to waste the bandwidth to pull new copies of the code on 3 different servers, but I've exhausted all suggestions I can find. How do I fix this?
On Tuesday 31 of December 2013 18:36:49 David C. Rankin wrote:
On a second box after trying all the suggested "git add" and "git commit -a", I am left with:
11:25 providence:~/tde/tde> git status # On branch master # Your branch and 'origin/master' have diverged, # and have 9509 and 3318 different commits each, respectively. # # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # (commit or discard the untracked or modified content in submodules) # # modified: experimental (new commits) # modified: main/applications/kdmtheme (modified content) # modified: main/applications/kio-apt (modified content) # modified: main/applications/kio-locate (modified content) # modified: main/applications/kio-umountwrapper (modified content) # modified: main/applications/knetworkmanager9 (modified content) # modified: main/applications/kpowersave-nohal (modified content) # modified: main/applications/kradio (modified content) # no changes added to commit (use "git add" and/or "git commit -a")
But nothing else will help for those files. Further, the content of the local copy does not match the content on http://git.trinitydesktop.org/cgit/scripts/tree/
11:28 providence:~/tde/tde> ll scripts/ total 24 -rwxr-xr-x 1 david david 1571 Dec 31 01:17 commit_all_submodules -rw-r--r-- 1 david david 128 Dec 31 01:17 README -rwxr-xr-x 1 david david 1463 Dec 31 01:17 switch_all_submodules_to_head_and_clean -rwxr-xr-x 1 david david 1940 Dec 31 01:17 update_all_submodules
I have tried every from of git commit command either (1) suggested by git in the error messages or (2) from https://www.kernel.org/pub/software/scm/git/docs/user-manual.html#resolving -a-merge Nothing works. Why does the switch script not simply:
"throw away any changes and get a fresh copy of the source"
That is exactly what I want to do -- how can I do that?
I do not want to waste the bandwidth to pull new copies of the code on 3 different servers, but I've exhausted all suggestions I can find. How do I fix this?
I assume that your folder 'scripts' is not as a separate git module (current state), but as a folder of the 'master' module 'tde' (former state)? Are in your .gitmodules information about git module 'scripts'?
First, try on the master tde module: git checkout master && git pull --rebase
Once you are in your .gitmodules information about git module 'scripts', continue: git submodule init -- scripts && git submodule update -- scripts
Then you can try again: scripts/switch_all_submodules_to_head_and_clean
On 12/31/2013 12:04 PM, Slávek Banko wrote:
I assume that your folder 'scripts' is not as a separate git module (current state), but as a folder of the 'master' module 'tde' (former state)? Are in your .gitmodules information about git module 'scripts'?
You are 100% correct :)
I could see git complaining about the scripts file/directory issue, but I could not figure out what command would fix the conflict.
First, try on the master tde module: git checkout master && git pull --rebase
Once you are in your .gitmodules information about git module 'scripts', continue: git submodule init -- scripts && git submodule update -- scripts
Then you can try again: scripts/switch_all_submodules_to_head_and_clean
Thank you Slavek! I will give it a go and report back. I'm pulling a fresh v3.5.13-sru on the box on a different partition right now (I gave up fixing that one), when it completes I'll try the:
git checkout master && git pull --rebase
But what do you mean by:
<quote>
Once you are in your .gitmodules information about git module 'scripts', continue:
</quote>
Are you saying "When it dies and you have to manually edit .gitmodules to get rid of <<<<<<<<<<< scripts stuff =========== or scripts stuff >>>>>>>>>>, continue: with git submodule init -- scripts && git submodule update -- scripts"
??
On 12/31/2013 01:41 PM, David C. Rankin wrote:
On 12/31/2013 12:04 PM, Slávek Banko wrote:
I assume that your folder 'scripts' is not as a separate git module (current state), but as a folder of the 'master' module 'tde' (former state)? Are in your .gitmodules information about git module 'scripts'?
You are 100% correct :)
I could see git complaining about the scripts file/directory issue, but I could not figure out what command would fix the conflict.
First, try on the master tde module: git checkout master && git pull --rebase
Once you are in your .gitmodules information about git module 'scripts', continue: git submodule init -- scripts && git submodule update -- scripts
Then you can try again: scripts/switch_all_submodules_to_head_and_clean
Thank you Slavek! I will give it a go and report back. I'm pulling a fresh v3.5.13-sru on the box on a different partition right now (I gave up fixing that one), when it completes I'll try the:
git checkout master && git pull --rebase
Uugh :(
16:22 providence:~/tde/tde> git checkout master && git pull --rebase M experimental M main/applications/kdmtheme M main/applications/kio-apt M main/applications/kio-locate M main/applications/kio-umountwrapper M main/applications/knetworkmanager9 M main/applications/kpowersave-nohal M main/applications/kradio Already on 'master' Your branch and 'origin/master' have diverged, and have 9509 and 3318 different commits each, respectively. First, rewinding head to replay your work on top of it... warning: unable to rmdir main/applications/kdmtheme: Directory not empty warning: unable to rmdir main/applications/kio-apt: Directory not empty warning: unable to rmdir main/applications/kio-locate: Directory not empty warning: unable to rmdir main/applications/kio-umountwrapper: Directory not empty warning: unable to rmdir main/applications/knetworkmanager9: Directory not empty warning: unable to rmdir main/applications/kpowersave-nohal: Directory not empty warning: unable to rmdir main/applications/kradio: Directory not empty Applying: updates to my r14.000 to bring up to date fatal: sha1 information is lacking or useless (experimental). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 updates to my r14.000 to bring up to date The copy of the patch that failed is found in: /home/david/tde/tde/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue". If you prefer to skip this patch, run "git rebase --skip" instead. To check out the original branch and stop rebasing, run "git rebase --abort".
16:24 providence:~/tde/tde> git rebase --skip Unstaged changes after reset: M experimental
16:34 providence:~/tde/tde> git checkout master && git pull --rebase M experimental Already on 'master' Current branch master is up to date.
16:34 providence:~/tde/tde> git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: experimental (new commits) # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # main/applications/kdmtheme/ # main/applications/kio-apt/ # main/applications/kio-locate/ # main/applications/kio-umountwrapper/ # main/applications/knetworkmanager9/ # main/applications/kpowersave-nohal/ # main/applications/kradio/ no changes added to commit (use "git add" and/or "git commit -a")
16:36 providence:~/tde/tde> git submodule init -- scripts && git submodule update -- scripts Submodule 'scripts' (http://system@scm.trinitydesktop.org/scm/git/scripts) registered for path 'scripts' Cloning into 'scripts'... remote: Counting objects: 125, done remote: Finding sources: 100% (125/125) remote: Total 125 (delta 61), reused 125 (delta 61) Receiving objects: 100% (125/125), 20.10 KiB, done. Resolving deltas: 100% (61/61), done. Submodule path 'scripts': checked out 'a48d32b281a28dd71ab81b85888965984ba79cb9'
16:37 providence:~/tde/tde> ./scripts/switch_all_submodules_to_head_and_clean drankin Preparing /home/david/tde/tde for development use HEAD is now at 8b539c0 Reset submodule main/tde-i18n to latest HEAD Removing main/applications/kdmtheme/ Removing main/applications/kio-apt/ Removing main/applications/kio-locate/ Removing main/applications/kio-umountwrapper/ Removing main/applications/knetworkmanager9/ Removing main/applications/kpowersave-nohal/ Removing main/applications/kradio/ Already up-to-date. <snip>
Looks to be running normally!
Thank you Slavek! Darrell, save this email, it seems to hold the key to fixing screwed up local repos. What it appears to show is that R14 was rebased at some point between my last update and now. Regardless, it looks like I can trust what I have in my repos now.
On 12/31/2013 04:41 PM, David C. Rankin wrote:
Looks to be running normally!
Thank you Slavek! Darrell, save this email, it seems to hold the key to fixing screwed up local repos. What it appears to show is that R14 was rebased at some point between my last update and now. Regardless, it looks like I can trust what I have in my repos now.
16:54 providence:~/tde/tde> git status # On branch master nothing to commit (working directory clean)
WHOOP!