Community
Participate
Working Groups
During the CDO svn -> git migration (Bug 360970), I have used a suboptimal mapping for the SVN authors to Git authors/committers. In particular, the Git authors names are now set to the dev.eclipse.org userids (e.g. swinkler). The Git convention, however, is to use the full name (e.g. Stefan Winkler). We want to fix the Git history. So please execute the following steps: 0. Confirm the execution time for the following steps on the bug: Friday, Oct 21st 11:00 EDT (17:00 CEST) or propose a different timeframe 1. All CDO committers have to push their local commits before that time (because of step 10). 2. At the agreed time, backup the four CDO Git repositories (git.eclipse.org/gitroot/cdo/*.git). If something goes wrong below, please restore the repos from the backup. 3. Copy the attached script (conv-authors.sh) and the authors file (author-conv-file) attached to this Bug to a directory on the Eclipse Git server and chmod u+x conv-authors.sh 4. Edit the file conv-authors.sh and change the line export authors_file=<..path..to..>/author-conv-file so that $authors_file points to the absolute path of the author-conv-file just copied in step 3. 5. cd into /gitroot/cdo/org.eclipse.emf.cdo.git and execute conv-authors.sh by calling it: bash$ cd /gitroot/cdo/org.eclipse.emf.cdo.git bash$ /path/to/script/conv-authors.sh This will rewrite all Git commits and set the correct author name. 6. repeat step 5 for /gitroot/cdo/org.eclipse.emf.cdo.incubator.git 7. repeat step 5 for /gitroot/cdo/org.eclipse.emf.cdo.infrastructure.git 8. repeat step 5 for /gitroot/cdo/org.eclipse.emf.cdo.old.git 9. Check the results. In each Git repo, the ouput of bash$ git log | grep Author: | sort | uniq should contain only full names, as in Author: Andre Dietisheim <andre.dietisheim@gmail.com> Author: Eike Stepper <stepper@esc-net.de> ... Author: Victor Roldan Betancort <vroldan@opencanarias.com> 10. Tell us that all went fine :-) 11. All CDO committers have to clone their repositories again.
Created attachment 205690 [details] Script to rewrite Git history and adjust author names
Created attachment 205692 [details] Author conversion file (maps user IDs to real names)
Stefan, I do not feel that I understood correctly what I should do. Especially that I had not get familiar with Git yet. Step *2* should I login to git.eclipse.org ? If I do this, I do not see folder *gitroot*. Al visible folders are "Documents bin downloads public_html". Can I make this "transformation" in any different time, convenient for me? Does my name changes effect others committers work? Should everyone make efforts to change history on main repository? Isn't possible for one committer to adjust history for all? Thank You
Sorry, I forgot the most important part :-( CDO Committers: Only steps 1 and 11 are for you. (i.e., you have to push any committed changes you have locally to git.eclipse.org, because you cannot use your existing clone after the process has finished. You have to clone again afterwards) Eclipse Webmasters: Steps 0 and 2 to 10 are for you. :-)
(In reply to comment #4) > you have to push any committed changes you have locally to git.eclipse.org, > because you cannot use your existing clone after the process has finished. In the worst case, e.g. you're still unexperienced with Git and can't push until that time, you can also save (rename) your clone and merge local changes from old clone to new clone with any external tool. Stefan, would that be right?
(In reply to comment #5) > (In reply to comment #4) > > you have to push any committed changes you have locally to git.eclipse.org, > > because you cannot use your existing clone after the process has finished. > > In the worst case, e.g. you're still unexperienced with Git and can't push > until that time, you can also save (rename) your clone and merge local changes > from old clone to new clone with any external tool. Stefan, would that be > right? Partially. Case#1: You have already committed locally (e.g. in a branch) => please push your local commits to the main Git repo Case#2: You have uncommitted changes in your workspace => either commit your changes locally (e.g. in a branch) and follow Case#1 => or: after the above maintenance has completed, close your workspace, rename your cloned repository, clone from scratch, checkout the projects, and copy the files from the renamed (original) repo on top of the checked out ones. This should correctly recognize the changes. The rationale behind the whole procedure is this: In Git, every commit is identified by its hash value and every commit references its parents (the preceding commit) by their hash value. In the process of correcting the author names, the hash value of every commit that is adjusted, will change. If you would continue with your currently cloned workspace, you would end up with your own commits referring to a non-existent parent (because its hash value has changed). Therefore, you need to clone again, to get the history you base your work on, right.
(In reply to comment #6) > Case#1: You have already committed locally (e.g. in a branch) > => please push your local commits to the main Git repo > > Case#2: You have uncommitted changes in your workspace > => either commit your changes locally (e.g. in a branch) and follow Case#1 > => or: after the above maintenance has completed, close your workspace, rename > your cloned repository, clone from scratch, checkout the projects, and copy the > files from the renamed (original) repo on top of the checked out ones. This > should correctly recognize the changes. While this note was send this morning (21 of October) and migration should end by the end of this day, I have doubt, that all committers will read it and push changes. My concern is, if they can loose their local changes? If yes, then perhaps we need to postpone migration for the few days in order to get all active committers to be aware and prepared for migration. For me is ok, I have no changes in my local repository.
I've just had a talk with Eike and it's even simpler than in my last comment. If you have a current workspace (committed or uncommitted doesn't matter), after the migration has been done, you can just close the workspace, rename the git clone (which is where your workspace files are located now), clone the migrated git repo from scratch and then copy the renamed files on top of the checked out files. Then no changes whatsoever get lost. So, basically: - today, after the migration is done, make a backup of your current files - clone from scratch - copy backupped files (without the .git directory) on top of the fresh cloned/checked-out files and you are done without losing anything.
Great! :)
0) 11am today is fine. 2) I can do that, I'll update here when the backup is done. 10) I suspect you'll know it worked before I will(since I presume you may update this bug requesting the backups be restored :) -M.
(In reply to comment #10) > 0) 11am today is fine. > 2) I can do that, I'll update here when the backup is done. > 10) I suspect you'll know it worked before I will(since I presume you may > update this bug requesting the backups be restored :) > > -M. Sorry, if the description led to confusions. I don't think I can execute steps 3-9 for myself (I have only the restricted shell on eclipse.org) That's why I wrote: > Eclipse Webmasters: Steps 0 and 2 *to* 10 are for you. :-) So, I need you to do steps 3-9 as well as 2 and 10 you mentioned above... If you want me to do these steps instead, please give me (temporary) shell access to git.eclipse.org for the operation.
(In reply to comment #11) > > Eclipse Webmasters: Steps 0 and 2 *to* 10 are for you. :-) Ah I missed that. > If you want me to do these steps instead, please give me (temporary) shell > access to git.eclipse.org for the operation. Up to you really. -M.
(In reply to comment #12) > > If you want me to do these steps instead, please give me (temporary) shell > > access to git.eclipse.org for the operation. > > Up to you really. Ok, then I'll do it. After creating the backup in step 2, could you set my account (swinkler) to a non-restricted shell? I'll then perform steps 3-10 and report back on the bug. After that you can switch me back to restricted shell access.
Ok, you've got a shell and I've finished the backups. -M.
Ok, I have finished and all went fine :-) You can disable my shell again and remove the backup. As a remark: Eike called me last minute and told me that he wanted the repo names to be shortened (i.e., stripped of the org.eclipse.emf prefix). So I have renamed the repo directories accordingly. So, committers, please adjust to the new names. I guess they will show up on http://git.eclipse.org/c/ in the next hour. Thank you once again, Matt, for your help and support. :-)
Ok, I've removed your shell and the backup data. -M.
Cool. Then all is done.
Hi Stefan, when I am trying the clone the repository I am getting some strange errors (see trace attached). I am inexperienced with git, so I cannot judge the importance of the message. Due to my humble git knowledge it might be that I did something wrong when cloning the repo. But as far as I remember I did the same things as before. ----------------------------------------------- $ git clone git://git.eclipse.org/gitroot/cdo/cdo.git Cloning into cdo... remote: Counting objects: 281750, done. remote: Compressing objects: 100% (58147/58147), done. remote: Total 281750 (delta 168581), reused 261511 (delta 154438) Receiving objects: 100% (281750/281750), 90.05 MiB | 157 KiB/s, done. Resolving deltas: 100% (168581/168581), done. error: refs/tags/drops/S20110927-0522 does not point to a valid object! error: refs/tags/drops/S20110923-0630 does not point to a valid object! error: refs/tags/drops/S20110907-0210 does not point to a valid object! error: refs/tags/drops/S20110831-0135 does not point to a valid object! error: refs/tags/drops/S20110818-0438 does not point to a valid object! error: refs/tags/drops/S20110524-1425 does not point to a valid object! error: refs/tags/drops/S20110524-0406 does not point to a valid object! error: refs/tags/drops/S20110518-0459 does not point to a valid object! error: refs/tags/drops/R20110913-0010 does not point to a valid object! error: refs/tags/drops/R20110608-1407 does not point to a valid object! error: refs/tags/drops/R20110607-1502 does not point to a valid object! error: refs/tags/drops/R20110607-1319 does not point to a valid object! error: refs/tags/drops/R20110607-0653 does not point to a valid object! error: refs/tags/drops/R20110215-2220 does not point to a valid object! error: refs/tags/drops/R20100914-1022 does not point to a valid object! error: refs/tags/drops/R20100614-1613 does not point to a valid object! error: refs/tags/drops/M20111007-0410 does not point to a valid object! error: refs/tags/drops/M20110930-0410 does not point to a valid object! error: refs/tags/drops/M20110923-0410 does not point to a valid object! error: refs/tags/drops/M20110909-0410 does not point to a valid object! error: refs/tags/drops/M20110902-0951 does not point to a valid object! error: refs/tags/drops/M20110826-0411 does not point to a valid object! error: refs/tags/drops/M20110819-0410 does not point to a valid object! error: refs/tags/drops/M20110729-0410 does not point to a valid object! error: refs/tags/drops/M20110715-0410 does not point to a valid object! error: refs/tags/drops/M20110708-0552 does not point to a valid object! error: refs/tags/drops/M20110708-0410 does not point to a valid object! error: refs/tags/drops/M20110701-0410 does not point to a valid object! error: refs/tags/drops/M20110626-0722 does not point to a valid object! error: refs/tags/drops/I20111013-0217 does not point to a valid object! error: refs/tags/drops/I20111012-1207 does not point to a valid object! error: refs/tags/drops/I20111008-0737 does not point to a valid object! error: refs/tags/drops/I20111007-0410 does not point to a valid object! error: refs/tags/drops/I20110930-0410 does not point to a valid object! error: refs/tags/drops/I20110927-2318 does not point to a valid object! error: refs/tags/drops/I20110927-1129 does not point to a valid object! error: refs/tags/drops/I20110925-0426 does not point to a valid object! error: refs/tags/drops/I20110924-1048 does not point to a valid object! error: refs/tags/drops/I20110924-0553 does not point to a valid object! error: refs/tags/drops/I20110923-0228 does not point to a valid object! error: refs/tags/drops/I20110922-1405 does not point to a valid object! error: refs/tags/drops/I20110921-1205 does not point to a valid object! error: refs/tags/drops/I20110921-0546 does not point to a valid object! error: refs/tags/drops/I20110920-0704 does not point to a valid object! error: refs/tags/drops/I20110918-1405 does not point to a valid object! error: refs/tags/drops/I20110918-0603 does not point to a valid object! error: refs/tags/drops/I20110917-1327 does not point to a valid object! error: refs/tags/drops/I20110909-0443 does not point to a valid object! error: refs/tags/drops/I20110902-0512 does not point to a valid object! error: refs/tags/drops/I20110826-1253 does not point to a valid object! error: refs/tags/drops/I20110826-0419 does not point to a valid object! error: refs/tags/drops/I20110819-2329 does not point to a valid object! error: refs/tags/drops/I20110818-0608 does not point to a valid object! error: refs/tags/drops/I20110715-0410 does not point to a valid object! error: refs/tags/drops/I20110714-2329 does not point to a valid object! error: refs/tags/drops/I20110714-1441 does not point to a valid object! error: refs/tags/drops/I20110711-1247 does not point to a valid object! error: refs/tags/drops/I20110708-0410 does not point to a valid object! error: refs/tags/drops/I20110701-0410 does not point to a valid object! error: refs/tags/drops/I20110626-0739 does not point to a valid object! error: refs/tags/drops/I20110514-0431 does not point to a valid object! error: refs/tags/drops/2.0.2 does not point to a valid object! error: refs/tags/committers/smcduff/merge-20080609 does not point to a valid obj ect! error: refs/tags/committers/estepper/pop-20081018 does not point to a valid obje ct! error: refs/tags/committers/estepper/pop-20080726 does not point to a valid obje ct! error: refs/tags/committers/estepper/initial002 does not point to a valid object ! error: refs/tags/committers/estepper/initial001 does not point to a valid object ! error: refs/tags/committers/estepper/cdo2-first-roundtrip does not point to a va lid object! error: refs/tags/committers/estepper/before-revision-holder does not point to a valid object! error: refs/tags/committers/estepper/2.0-end-of-maintenance does not point to a valid object!
Hi, > when I am trying the clone the repository I am getting some strange errors (see > trace attached). Please ignore these for now. These messages don't hinder your work. Obviously, the author correction did not adjust the tags to their new positions. I have started to fix this by re-tagging manually and pushing the corrected tags, so the tags will be corrected on the server and should be copied to you when you pull next time.
(In reply to comment #15) > Eike called me last minute and told me that he wanted the repo > names to be shortened (i.e., stripped of the org.eclipse.emf prefix). So I have > renamed the repo directories accordingly. Stefan, for the main repo you did it right but for the other three you've also stripped off the leading cdo, which is wrong. Reopening because I think Stefan has no shell access anymore. Webmasters, please rename in http://git.eclipse.org/c/cdo the following repos: incubator.git --> cdo.incubator.git infrastructure.git --> cdo.infrastructure.git old.git --> cdo.old.git Sorry for the inconvenience.
Done, sorry about the delay. -M.
Excellent. Thanks!