Git help thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
albiongeck
Posts: 182
Joined: Fri Mar 16, 2012 7:11 am

Re: Nash's SVN -> Git thread

Post by albiongeck »

Well I can hardly say "Don't give up!" when I've done nothing up to this point myself for fear of losing my changes - but I do want to say thanks for doing the legwork, and I do appreciate you sharing your findings here.
EDIT: actually scratch that, that's stupid - I'm going to stop being lazy and see if I can get this to work.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

I've accumulated close to 10 hours just trying to make this switch... it is expected that I am just so upset at everything right now. Maybe I'm doing it wrong. Maybe there was an easer way to start (because in my initial effort, I spent 2 hours just trying to update my SVN r1600 codebase to Git tag g1.8.1 ... I didn't see an easy, 1-click way like merging g1.8.1 to my r1600 codebase)... and every other effort from that point was just me stumbling in the dark, clicking things here and there HOPING it does what I THINK it does... :S

Sigh
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

After calming down, I decided to have another go at it. This time, I took a different approach:

1) Cloned GZDoom (with whatever latest version that's on there)
2) Exported the codebase
3) Copied and pasted the entire Exported Git codebase into my SVN codebase
4) I now have a ton of red !'s in my SVN codebase
5) Using TortoiseSVN, I made a Patch.
6) Also using TortoiseSVN, I Reverted and Cleaned my codebase so it's back to a pristine state.
7) TortoiseSVN -> Apply Patch
8) With the TortoiseSVN patching interface, I now have a more organized way of going through every patched file and weeding out what I need and what I don't need from both codebases.

The entire process still took 2 hours though... but my game's codebase is now in sync with the latest GZDoom Git codebase.

I haven't done a Commit yet though. The next step is to get my codebase online, either on GitHub or BitBucket. I'm not sure how do I go about this. I assume I'll have to create a branch of official ZDoom?

Totally lost from this point on; any advice would be much appreciated.

(Also my previous question still remains unanswered; I don't know what's the correct way to merge new GZDoom stuff into my codebase. Using TortoiseGit -> Pull gives me errors)

EDIT: I also see in the Build output that it can't find some Git commands so I assume that's why my EXE is getting <unknown version> ... I think reinstalling mysisgit and letting it add the tools into the Windows Path will fix this. Maybe.
User avatar
randi
Site Admin
Posts: 7731
Joined: Wed Jul 09, 2003 10:30 pm

Re: Nash's SVN -> Git thread

Post by randi »

Nash wrote:I'm sure my branch was created because I see "isurvivor-win32" in the tag dropdown list when I tried to export.
Yes, it was created. The problem was that it was created in the wrong spot. When you switched to the g1.8.1 tag, you were no longer on that branch but at a snapshot of the repository where g1.8.1 points. In fact, you were not on any branch at all, which is what the detached head means. If you committed any changes at that point, they would not be tracked by a branch and would be subject to eventual garbage collection if you ever switched to a real branch.
Nash wrote:git.exe pull -v --progress "origin" isurvivor-win32

fatal: Couldn't find remote ref isurvivor-win32
Unexpected end of command stream
This happens because the isurvivor-win32 branch is only in your local repository and not the remote repository. As far as you're concerned, the operation was successful, even though Git complained that it couldn't find your branch on the remote repository. See if TortoiseGit has an option to only pull remotely tracked branches or to pull master specifically instead of isurvivor-win32. You may need to use a fetch instead of a pull and then manually merge origin/master into master. Then you can merge master into isurvivor-win32.
Nash wrote:I haven't done a Commit yet though. The next step is to get my codebase online, either on GitHub or BitBucket. I'm not sure how do I go about this. I assume I'll have to create a branch of official ZDoom?
You can commit right now, and it will go into your local repository. You don't need to have a remote repository. An online repository is only really necessary if you want to share your changes with others. But if that is what you want, you should probably start over by forking GZDoom's repository to your own account and then cloning that instead of the original GZDoom repository.
Nash wrote:I think reinstalling msysgit and letting it add the tools into the Windows Path will fix this. Maybe.
Either that or add them to Visual C++'s executable directories list.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48376
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Nash's SVN -> Git thread

Post by Graf Zahl »

If you want to get it online, best create a fork of Gzdooom's repo directly in Github. Once you got that make a clone, merge it with your changes and push it to store your changes.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

I already did that. Everything's fine so far. If I have any more problems, I'll post my question here.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

How do I pull that commit by Blzut3 on ZDoom's maint? Can I even do that? I imagine that it's possible because my project is a fork of GZDoom which is a fork of ZDoom...
User avatar
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

Re: Nash's SVN -> Git thread

Post by jpalomo »

It should be possible. Instead of using the normal remote, point it to ZDoom's (https://github.com/rheit/zdoom), then select maint for the remote branch. Fix any conflicts, then commit the changes.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

In TortoiseGit, that is done by doing the following.

1) Right-click your repo, do TortoiseGit -> Pull
2) In the dialog, select Arbitrary URL and key in https://github.com/rheit/zdoom
3) In the Remote Branch dialog, type in "maint"

There will be Merge Conflicts and TG will ask if you want to see changes; Press Yes. You will now have the ability to fix the conflicts.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

Why does my executable say g1.8.1-<bla bla bla> eventhough my version.h is the latest from GZDoom (VERSIONSTR == "1.9pre") ?
User avatar
randi
Site Admin
Posts: 7731
Joined: Wed Jul 09, 2003 10:30 pm

Re: Nash's SVN -> Git thread

Post by randi »

Because the commit tagged g1.8.1 is "nearer" than the commit tagged g1.9pre.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

I want to export a specific file (am_map.cpp) from the upstream (GZDoom) at a specific point in time (30th July 2013), how do I do this?

(Clarification: I do not want a pull or merge; I want a pristine copy of that file)

With TortoiseSVN, I could use the Repo browser and browse whatever revision it was on the date that I choose and export the file from there but I'm not sure how to do the same thing with Git.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

How do I filter only my own commits in my GZDoom fork in the GitHub viewer?
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Nash's SVN -> Git thread

Post by Nash »

Important question, would appreciate an answer:

In this particular commit, 634 lines were changed in gzdoom.vcproj.

My fork doesn't use this file (besides not being named "gzdoom", it also has a lot of local differences and is also actually in .vcxproj format) so obviously I run into a conflict when trying to merge.

In an attempt to synchronize this file, I loaded the latest gzdoom.vcproj into my solution and let MSVC++ 2010 do the conversion... and then manually editing the newly produced .vcxproj file in Notepad++ to reintroduce my local changes (mostly by doing search and replace in there). I also double and triple-checked for stuff like include directories, renamed the file back to what it was, making sure the Build Dependencies are correct... little details like that.

However when I try to build the entire Solution, I get a lot of unresolved symbol errors.

SO! My question is... what exactly was changed in the Project file in that commit I linked to? I think whatever it is I'm trying to do above is way too convoluted and I think it's easier if I knew exactly what's going on so I can just use my previously working .vcxproj file and only introduce the really necessary changes into it.

I tried looking at the diff between the upstream version and my version but that's a lot of changes (600+ lines) and I'm getting crossed eyes trying to manually edit my changes in... =P
User avatar
randi
Site Admin
Posts: 7731
Joined: Wed Jul 09, 2003 10:30 pm

Re: Nash's SVN -> Git thread

Post by randi »

sdlglvideo.cpp and sdlglvideo.h were added to the project. The rest is just things getting shuffled around when it was rewritten.

Return to “Editing (Archive)”