-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How was the (git) history flattened? #3
Comments
Well, I don't remember much how I did. I think I just got the svn version somewhere and simply create a new git from that. Also, I think I manualy "merged" the latest version of trunk (so windows only) with (your?) linux changes, to have the most up-to-date version to work with. That's not how your are supposed to do, I know :( sorry about that. Now, about what your are proposing. Well, I'm ok I guess (but as you probably already understood, my git-fu isn't that great), and I'm unsure what will be the aim: send all the linux changes back to the linux branch of the svn repo? And then merge that branch to trunk so only one source for windows / linux exist? |
Hm, to my understanding that could be the source for the mixup, but I am not sure. As far as I know it would be best either to log into GH and at the + button choose import repository and then supply the svn URL. This way GH does the import and apparently quite a good job, except that the SHAs do not turn out the same for corresponding commits if you or someone else does the same again. That way the git repos do not sync as they could.
To my understanding your version is missing all changes from any other branch than master/trunk it only containes empty commits (like the one I pointed out above, identical in message, date and author but without any file changes) which fake the impression the changes are considered.
No problem, one learns as one goes ahead, and here not only git-fu but also svn-fu is needed (which I mostly lack). I often wonder what odd commands or commits I did 10 years ago... Anyway, you are free to do what you want with open source but I would find it a pity if the very few efforts on ctp2 for linux would not be synced, and it seems we are very close to have it all wrapped up.
As it appears to me, you only used the code from svn trunk. Your conversion to git just added empty commits from all other branches into master. E.g. 8437856 is also empty and originates from branch port-trunk. For https://github.com/LynxAbraxas/ctp2_git-svn I followed https://stackoverflow.com/questions/2244252/how-to-import-svn-branches-and-tags-into-git-svn
After using git svn I added your repos as a remote and rebased you commits onto the last commit in common with svn trunk (https://github.com/LynxAbraxas/ctp2_git-svn/commit/ef644f69fd9002a3cb31bc45cd9fae057d58b13d) which did not yield any problems.
Due to the commits from Manuel Selinger ptitSeb, master and trunk are currently out of sync, which might be problematic for committing back to svn with git svn dcommit. We can then consider how to best merge things, e.g.: |
Hi @LynxAbraxas and @ptitSeb I had a look at existing ctp2 repos on GH and these are the repos I managed to find: @ptitSeb's repo: https://github.com/ptitSeb/ctp2 I fetched them all to one repo and did some analysis.
I verified however that they all have exact same content: git diff for every pair shows no differences. Now some comments about those different repos: @LynxAbraxas, @jleclanche and @RolandTaverner repos are equivalents with regard to following branches:
All seem to be imported from SVN using the same or similar method, and all those equivalent branches have identical content (i.e. Only @ptitSeb and @RolandTaverner have significant extra work done on master branch
I can easily find this revision in @talentlesshack's repo thanks to SVN references:
Now, in order to have correct history and also @ptitSeb's changes, I took two different approaches:
Rebase result is in my repo (https://github.com/DEVoytas/ctp2) on branch ptitSeb_master_rebased_onto_LynxAbraxas_master and it's content is exactly the same as original ptitSeb/master branch. For merge, which is on branch ptitSeb_master_merged_to_LynxAbraxas_master. I had to create artificial common commit combining both histories (more details on it in commit message). I hope it's going to helpful to someone, and waiting for your feedback. |
Oh, now I realized you created another repo which also have advantage of SVN references (as @talentlesshack's repo I mentioned above).
Do you have access to SVN repo? If yes we could create 'trunk' branch in git that would track changes in SVN and we could merge back those changes to master.
This is weird. If you rebase the changes the committer will obviously change, but the author should stay intact. At least this is how it worked in my case.
Option 3 is exactly what I thought of. What do you think? |
Hi folks, I couldn't remember any more how I actually got into hosting the CtP2 source… that was about 12 years ago. However, I always understood that the license dictated me to get the real names of everyone who wanted write access. Mostly as a safe-guard for me if anyone does commit things that violate the license agreement, but I vaguely remember there was another reason. Reading the license again there's only one part mentioning names: New Game Materials must contain prominent identification at least in any on-line description and with reasonable duration on the opening screen: (a) the name and E-mail address of the New Game Materials creator(s) and (b) the words “THIS MATERIAL IS NOT MADE OR SUPPORTED BY ACTIVISION.” Anyway, this "I need the contributor's real name" was the main reason I didn't move to GitHub; I still have worries about legal issues but maybe I'm just overcautious. Also the SubVersion repository didn't need much maintenance and I rarely had to even think about it. I was only briefly involved with the project and to be honest, my priorities shifted to other things. I have no issues with someone maintaining an "official" CtP2 GitHub repository and retiring the SubVersion repository. I'd be happy to redirect people to this repository on my CtP2 site. Maybe it would be a good idea to create a GitHub account just for that so that it can it easily be "passed on" to someone else without breaking things. |
Many thanks to @DEVoytas and @DarkDust for chiming in with feedback. I fetched and rebased all other repos changes @DEVoytas found, i.e. All this shows how the contributions go out of sync without an official git repos. I agree to @DarkDust suggestion to create an official CtP2 GitHub repository and to create a GitHub account or organization for that, so that we end up with a git repos like https://github.com/ctp2/ctp2 (or civctp2). Looking for volunteers to do so. If @ptitSeb is happy with him being the author and me being the committer for his contributions, https://github.com/LynxAbraxas/ctp2_git-svn/ could just be pulled and then pushed to the newly created user/org repos, pulled and pushed and not forked to make it the official one and to change the name to e.g. ctp2 or civctp2. After that everyone wanting to contribute could just fork on GH work on their own copy and contribute back via Pull-Requests that then can be merged by the maintainer of the official repos, if appropriate, i.e. the common GH workflow. Who would like to volunteer to be the maintainer of the official ctp2 GH git repos? Ideally for as long as possible. The overall maintenance work should be quite low, i.e. initially creating the user/org and the repos and then only sync work and PRs as it seems fitting. |
When should I turn off SubVersion write access? Would it make sense to do so right now or do we want to wait until the GitHub repo is ready? |
One pro for using GH for the main repos is that it is easily possible to see if others have made any new contributions in the Network-view, if they forked the project on GH and have pushed their commits to their fork on GH. Then it is even possible to merge in some of those contributions even if the contributor did not create a PR (which is basically just a hint to point the maintainer to the new contribs). |
Hm, good question. Perhaps first put a link to this conversation and give others a chance to share their ideas on this for a day or a week? This made me have a look whether it is possible to move this issue/conversation to the future official repo. Seems to be wanted badly, some non GH methods exist, see e.g. mislav/hub#886. |
I just wanted to emphasize, that same SHAs will only be ensured, if clones and forkes are from the same SVN to git import. This is why it is important to agree to base all further work on the same import, so people can work on their owns copies (forks, clones) but are able to pull from each other as well. |
Yes, that is why I think removing write access to the SVN repos would be good so that when someone new wants to contribute is forced to read up on how further contributions are expected. |
Having a github account/organisation seems a good idea yes. I think this is the first step to do (create the organisation, get all the contributor / maintainer inside it). Once this is done, the the SVN can be put read-only while the migration is done. |
@ptitSeb As you got the main master/trunk working under Linux (and got rid of the need for bothering about case sensitivity (a contrib I welcome very much because I ended up here with the intend to create a docker image which would be problematic with a vfat partition/image)), would you like to be the initial maintainer and create the official repo? |
Thank you @LynxAbraxas , but I think you can create it, you have contribute a lot to the linux port of ctp2, so I don't see why you should not initialize that ctp2 group. |
I switched the SubVersion repository to read-only and put up a note on https://ctp2.darkdust.net . Simply putting a note on the site won't do while maintaining write-access won't do, nobody is going to look at that site. 😁 If people want to commit and fail they're going to contact me and I can redirect them to this discussion as well. |
How about you @DEVoytas? Would you mind to be the initial maintainer? |
Hi @LynxAbraxas I created new user and initial repo (based on your import) here: https://github.com/civctp2/civctp2/ With regard me being maintainer, thank you for the proposition, but I do not think I am the best person for that position. For all those reason, I think that for the maintainer (even the initial one), someone with reasonably good knowledge of existing code base is needed. I am happy to pass the new repo credentials to you, or @DarkDust or whoever you think should take a role of the initial maintainer. PS. |
I've added a link to the GitHub repo. Regarding the search for a maintainer, I would recommend to add |
How many maintainer can there be? Also, doesn't the next task, first, is to merge all changes from the different Repo before altering the README.md (plus, some changes included a new README.md :p ). |
Many thanks @DEVoytas for initiating the "official" repository. It is most important to have a central repo to fork from. Finding someone to decide on merges/PRs and directions might become easier then. So far I'm not sure how to contact those from old like Martin Gühmann, ctplinuxfan or Fromafar, as they do not seem to be active any more. |
@DEVoytas, I just noticed that the "official" repository is missing the 13 "releases" i.e. tags. Did you do a |
I will then delete my ctp2 and ctp2_git-svn repositories and only work with the fork of civctp2 to avoid confusion to others and to make PRs and easy merges possible. I would recommend that also to @ptitSeb, @DEVoytas, @RolandTaverner, @jleclanche, @talentlesshack and unknow others, but that is of course up to each repos owner. |
@DEVoytas : Did you create an organisation (using "Profile" menu and select Organisation then the "Create New Organisation" button) or is that a simple user account? |
About Windows build, my changes shouldn't break the build indeed, but I must say I haven't tried out. |
I have deleted my mirror. Thanks folks. |
Hi all.
@LynxAbraxas, I indeed did not notice that |
I hope just one is enough :)
Yes, it is the first task, but is should be done by the maintainer, who is currently missing. So in order to find him, we add the info about it in README file (as suggested by @DarkDust and @LynxAbraxas ). When someone agrees for the role, the new maintainer can remove "maintainer needed" info, and replace the content with "real" README file.
For now just regular user, but it can be easily converted to organization as I mentioned above.
Not sure I understood fully. You want merge all @ptitSeb's commits to master branch, or just use his README as a base?
Feel free to fork https://github.com/civctp2/civctp2 then |
OK folks, I creted 2 new issues: and added new README.md file Please let me know what you think, especially if you find any errors/mistakes/misinformation. |
The new README.md is nice, but I guess the How to build on window is missing (I don't know how to build on windows.. using mingw?). Also, I think the How to build on Linux will not work with the current sources, at least because of the FreeType (1!) dependancy (I have added the sources of it in my repo and it's built automatically). Also travis (and appveyor) would be nice to have soon (but I have no idea how the migration User -> Group Account work on travis/appveyor side). |
Unfortunately, I don't know either.
Yes, exactly. I was going to bring that up (I mean the fact that there is already a note that readme is for your branch, not the current master), but now it made me think that maybe this info is not visible enough, and the whole page is more confusing because of that. Maybe instead of pasting the copy of your page we should rather link to readme on your branch... What do you think guys ?
Agree, but I do not know either. Maybe create new issue for that? |
I meant all @ptitSeb's commits, as in my test they all worked out well. Though it would be great to have a working appveyor for the windows build before (which I think used MS c compilers, see e.g. @RolandTaverner commit 4a60c81c31ed3a). Anyway I would suggest to move further discussion to either civctp2 issues or concerning the merge that @ptitSeb forks the new civctp2 repos and opens a PR for his contributions so far so that further discussion can go there. To not loose this discussion, I would either recommend to port it as an issue to civctp2 or ask @ptitSeb not to delete this repos but make it an archive (which preserves the issues as far as I know) |
I had planed to archive and not delete anyway. For the appveyor, I tried to play with that yesterday on an other of my repo (https://github.com/ptitSeb/stuntcarremake ) and yeah, it's pretty easy to use, and similar to travis. |
Agree! I created civctp2/civctp2#4 Let's continue there.
That one I do not know how to do, but since @ptitSeb agreed to archive the repo, the link from new issue to this discussion should probably be enough.
Great! Thank you! I put the reference to this discussion from there then. EDIT:
|
Let's close this issue. In short: The source of the flattening of the git history (branch commits (all empty) all intermixed in one master branch) is unclear. Therefore, a git-svn import was made that preserves branches and SVN IDs and always results in the same SHA1 for each commit (details see above). An official civctp2 git repository was created from this import: |
Hi @ptitSeb,
Cool to see some work done on a linux port. I had worked on the svn linux branch some years ago and had that ported to git by github's svn import: https://github.com/LynxAbraxas/ctp2
It seems you did port to git somehow differently such that only the very first commit is the same in both repos. Furthermore your port somehow "flattened" the history of various branches all into one, where e.g. those from the original linux branch are empty commits (i.e. the changes to files got lost), compare e.g. these same commit messages, dates:
03a905a (0 changed files)
and
https://github.com/LynxAbraxas/ctp2/commit/29994a179e080b5a244411c2294d4b47a7a1b3bd (198 changed files)
So it seems you basically did a new port to linux, missing the changes already done on the original linux branch, which could e.g. be the reason for the missing resolutions (#1).
There have been quite a few tries to merge the original master and the linux branches ( https://github.com/LynxAbraxas/ctp2/branches), the latest was port-trunk. I once considered merging with git-imerge, but so far had not the time to try. I think a clean way of getting the old stuff and your new contributions together would be to do a merge (with e.g. git-imerge) of the original master and linux branch and then rebase your new commits on top of that. It seems imerge could even handle merging your current master with the original linux branch, but the resulting history would be very screwed then due to the different commit SHAs for the same commit content.
What do you think? Would you want to give it a try?
PS: There is one other github repos for ctp2 (https://github.com/talentlesshack/C2P2) which was also imported differently and lacks all branches except master but seems to have some more commits in common than only the very first, not sure how that git port was done.
The text was updated successfully, but these errors were encountered: