UFO:Alien Invasion

Development => Newbie Coding => Topic started by: Duke on October 06, 2010, 11:37:22 pm

Title: The GIT problem
Post by: Duke on October 06, 2010, 11:37:22 pm
I have to agree - I think the move from SVN to Git was a mistake, ...
Emotionally, I agree with much of what Destructavator wrote in the above post. But let's face the facts. It doesn't help us to discuss how the move could have been done better, later or at all.
We *have* moved to GIT.

It's a classical deadlock:
- Mattn *needs* GIT to merge branches
- many other teammembers and contributers strongly dislike GIT for the inconvience or even ran into serious problems and are nearly *disabled* (and not just Windoze users).
We're stuck. We can't simply move in either direction. We must solve at least the serious problems to get going again.

Such a situation automatically becomes the *#1 priority of the project*. I'd like to see everybody to do whatever he can to help resolving the problems. Don't stand aside.

So let's first collect the *serious* problems. I'm not talking about inconvenience, just *showstoppers*. I only see a few:
SVN:
- merging branches
afaik Mattn is the only one who does this work, but everyone else relies on this work. We need Mattn for more important things ;)

GIT:
- stashing
I don't mean the inconvenience of a few clicks around an upbase. I need a modified .cproject, .project and ufo.rc just to compile. I have no nice idea how to separate these from the actual changes in the source.

- clone
The devs will sooner or later get their clone, but for a *new* contributor the 1.6 GB plus the learning of GIT is too much of a hurdle for most of the potential contributors imho.


For the solutions I'll start separate topics for each problem. I can also imagine a dedicated board for 'GIT problems & solutions'. And YES, there will also be a topic 'GIT convenience problems' ;)

But before starting to talk about solutions: does anyone see more problems that classify as 'showstoppers' ?
Title: Re: The GIT problem
Post by: Destructavator on October 07, 2010, 02:22:57 am
I see a few "showstopper" issues right off the bat, although I'm going to attempt to list a few potential solutions rather than just bitch and whine about them:

- First, The official Git software for Windows doesn't work on my system - I've given it more testing and it repeatedly produces hard disk write errors, as well as destabilizing the system sometimes.  I've already been forced to restore the hard drive partition from a backup once already.

For solutions, is there another software package for Windows that can do the same thing?  Another thought, one that I really should have thought of before, is that I multi-boot some of my systems, and I could try accessing the Git repo for this project when Ubuntu is up and running.  This might work, but would still be inconvenient because most of my design software is for Windows, so I'd have to shut everything down and re-boot to Ubuntu to update or commit changes.

- Second, Even if I don't make any changes to any files at all, or if I get a read-only copy downloaded (I've tried both), I can only get updates for a master branch once or twice before it refuses to update anymore and spits out errors saying it won't do it.  The only thing that works at that point is to delete the whole working copy and start over from scratch by re-downloading the whole entire thing all over again, which on my DSL connection takes a number of long hours.

I can't think of a solution to this one other than fixing the first issue first, which may result in this second issue going away - I really don't know.

Side Note:  Does the *whole* *entire* system absolutely *have* to be in Git?  Could we leave the Data Source in SVN, or even have just the source code in Git?  If if was split than artists and other non-coders could very easily contribute and update their stuff, while the coders would have the code in Git and do what they need to there.  Also, since we have the auto-build bot system now, a non-coding artist could test their changes with recent code by grabbing the built binaries, and not have to bother with Git software at all.  Such a contributor would not need source code anyways.
Title: Re: The GIT problem
Post by: Crystan on October 07, 2010, 03:06:07 am
Side Note:  Does the *whole* *entire* system absolutely *have* to be in Git?  Could we leave the Data Source in SVN, or even have just the source code in Git?  If if was split than artists and other non-coders could very easily contribute and update their stuff, while the coders would have the code in Git and do what they need to there.

That were exactly my thoughts when i noticed the first time that git is total shit for artist stuff. ;) But i thought ppl would dislike the idea.
Title: Re: The GIT problem
Post by: H-Hour on October 07, 2010, 10:48:15 am
Git isn't shit for artists. I'm sorry but there's nothing that's more difficult in GIT than it was in SVN except the initial setup. Comitting is just as easy. And GIT is not a barrier to new art contributors simply because new art contributors don't start by making their own commits anyway.

Destructavator, the file I downloaded for GIT was Git-1.7.0.2-preview20100309.exe. Is that what you've been using? I then downloaded TortoiseGit-1.5.3.0-64bit.exe, but as I said, I don't use that for any of the setup. Use the GitBash interface so that you can put the commands in directly.

Second, also for Destructavator or anyone else, what are the errors you get? I've searched the IRC logs but haven't found any specific errors mentioned. Mattn or Tron will need these in order to help you work through them. Commands like git status and git log can be helpful to get a sense of what's happening on your local repository.

Title: Re: The GIT problem
Post by: Duke on October 08, 2010, 12:50:08 am
@Destructavator:
I'm using Git-1.7.2.3-preview20100911 and have to say that it seems to 'work as designed'. I could do a few commits (assisted by Mattn) and quite some fetches without screwing anything else.
It often refused to do what I *wanted*. but I didn't see anything that would classify as a bug.

Also, I wouldn't expect a software like GIT to go down to a level where it can cause HD problems. But you'll never know...

I don't trust TortoiseGit, though. This SW seems very immature to me. And the attempt to be a bit like SVN and a bit like GIT has failed imho. Well, it exploded here two days ago anyway...

Has anyone tried GIT GUI ? It looks usable. If I could only make it talk english again.
Title: Re: The GIT problem
Post by: H-Hour on October 08, 2010, 11:16:12 am
I haven't used the GIT GUI, but it does look promising. What I couldn't see how to do was Add a file, which is what artists tend to do. But it looks like it might be a decent interface for making local commits and then pushing them, although I've found Tortoise does work for making local commits.
Title: Re: The GIT problem
Post by: Crystan on October 08, 2010, 02:08:40 pm
Well i got a idea today. Wouldnt it be possible to create a .bat (or maybe a simple wingui?) that does the setup automatical? So you just have to enter your "account data" and the clone path. Maybe another bat file for both commits types and for pull/fetch? I dont know - maybe its a dumb idea. Opinions?
Title: Re: The GIT problem
Post by: H-Hour on October 08, 2010, 02:28:22 pm
Well i got a idea today. Wouldnt it be possible to create a .bat (or maybe a simple wingui?) that does the setup automatical? So you just have to enter your "account data" and the clone path. Maybe another bat file for both commits types and for pull/fetch? I dont know - maybe its a dumb idea. Opinions?

GIT GUI basically does this for getting the initial checkout, and then I think it's more straightforward to use the config commands in the wiki (http://ufoai.ninex.info/wiki/index.php/Getting_the_source) for those who need write access.

I don't think it would be a good idea for commits or fetching. It would be more complicated than it's worth for committing -- you'd need an interface for adding new files and then choosing which files to commit (basically what Tortoise will give you). And fetching is as simple as entering "git fetch" into the git command line.
Title: Re: The GIT problem
Post by: Destructavator on October 12, 2010, 10:46:11 pm
Sorry I've been out for a bit, but, anyways:

Yes, I had HD problems and other system stability problems with the official Git installer, although it was an older one than the one now offered for download.

The reason I didn't report error messages in IRC or such is because:

A)  Some of the problems did not cause specific error messages in text I could copy anywhere, it simply f***ed-up my system (even corrupted Windows File Explorer),

and,

B)  Mattn and Tron wouldn't be able to fix them anyways, because it isn't on their end, it's with the Git software itself, and unless Mattn and Tron joined the Git development team, they wouldn't have anything to do about it.

That being said, I've noticed several new released versions that have come out since then, so sometime soon I'll back up everything on my Windows partition and CAREFULLY install the newer Git software to see if it actually works.

As for the TortoiseGit stuff, I agree that it isn't (yet) reliable, so I won't even bother with that.

If things still fail though, I guess I'll have to resort to commit/update via rebooting to Linux - I just noticed a couple of days ago a new version of the Ubuntu and many of its derivatives have been released.
Title: Re: The GIT problem
Post by: Duke on October 13, 2010, 12:10:44 am
@Crystan:
I pretty much agree with H-Hour on those .bat files. Usually not flexible enough.

We certainly are not the only devs on this planet that have these probs with GIT. So our best bet is to figure out how *they* solved it.
Title: Re: The GIT problem
Post by: ManicMiner on October 15, 2010, 06:31:47 pm
I had a ludicrously fat internet pipe available to me the other night, and finally got round to using GIT GUI to grab the source.

Tonight, if I annoy my wife enough to have to sleep on the sofa, I'm going to have a play with it.

Also, a rather mad idea just came to me... If I've downloaded the entire source to a seperate folder, can I not just copy the modified files into the folder used for Muton's build source, and use that to recompile it, without redoing all the maps?


Title: Re: The GIT problem
Post by: O01eg on October 16, 2010, 09:41:35 am
Why do I get archive without base/ directory when I do `git archive` of master branch?
Title: Re: The GIT problem
Post by: Mattn on October 16, 2010, 02:42:54 pm
see .gitattributes
Title: Re: The GIT problem
Post by: Muton on October 24, 2010, 04:05:33 pm
How to push to origin master ???

Code: (sh) [Select]
$ git commit --author="Muton <mutonufoai@users.sourceforge.net>"  -m "* data.mk fixes (do not use 7z)" -v -i build/data.mk
$ git log -1
commit 7a0c75e6f2d861552f489855c14ef9d71d56fb52
Author: Muton <mutonufoai@users.sourceforge.net>
Date:   Sun Oct 24 15:42:19 2010 +0200

    * data.mk fixes (do not use 7z)

$ git push --dry-run -v origin 7a0c75e6f2d861552f489855c14ef9d71d56fb52:master
Pushing to git://ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
fatal: The remote end hung up unexpectedly
Title: Re: The GIT problem
Post by: Mattn on October 24, 2010, 11:22:17 pm
send the output of

git branch -vv

git cherry -v

do you track the remote master? please read the wiki article about configure git (username and email, then you don't have to specify the user or the email each time)
Title: Re: The GIT problem
Post by: geever on October 24, 2010, 11:55:54 pm
How to push to origin master ???

If that's the only output I would say it's a simple network error on SF side and retries "fix" it. But I'm not a Git-mage.


ps. If you didn't commit in our Git for a long(?) time it is possible that you need to do the fixbase stuff to be removed from the blacklist. But that's an other error message...

-geever
Title: Re: The GIT problem
Post by: Destructavator on October 25, 2010, 01:44:34 am
There's now another problem that's come up - I can't access the data source.  After following the instructions in the wiki, Git bombs with an error about an invalid branch.

Even worse, I can't pull up the data source in the web git browser on sourceforge, it doesn't show up anywhere.  It would be really, really nice if it did, so that I could look through the files and not have to download the whole thing.
Title: Re: The GIT problem
Post by: Mattn on October 25, 2010, 07:34:36 am
the weblink is here: link (http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=shortlog;h=refs/other/data_source)
Title: Re: The GIT problem
Post by: Muton on October 25, 2010, 07:36:57 am
$ git branch -vv
* master 7903cdb [origin/master: ahead 1] * data.mk fixes (do not use 7z)

$ git cherry -v
+ 7903cdb830ae0b16b0f007b3f73aa98f973471a4 * data.mk fixes (do not use 7z)

I havent created a brunch for this one change
im on the master
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/ai_lua
  remotes/origin/buildbot
......

Btw. Its my machine which terminates the TCP connection (reset)
Its not a connection problem i receive data from sourceforge (wireshark)
Title: Re: The GIT problem
Post by: Mattn on October 25, 2010, 08:12:01 am
yes, that would be another error message (which is going to come up later - we have to ensure that you have executed fix-base)

please just do git push

Title: Re: The GIT problem
Post by: Muton on October 25, 2010, 10:25:03 am
fix-base ???
Title: Re: The GIT problem
Post by: Mattn on October 25, 2010, 04:58:19 pm
http://tron.homeunix.org/zeug/git-fixbase
Title: Re: The GIT problem
Post by: MCR on October 26, 2010, 10:36:39 am
How to push to origin master ???

Code: (sh) [Select]
$ git commit --author="Muton <mutonufoai@users.sourceforge.net>"  -m "* data.mk fixes (do not use 7z)" -v -i build/data.mk
$ git log -1
commit 7a0c75e6f2d861552f489855c14ef9d71d56fb52
Author: Muton <mutonufoai@users.sourceforge.net>
Date:   Sun Oct 24 15:42:19 2010 +0200

    * data.mk fixes (do not use 7z)

$ git push --dry-run -v origin 7a0c75e6f2d861552f489855c14ef9d71d56fb52:master
Pushing to git://ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
fatal: The remote end hung up unexpectedly

I had the same error the last time I tried to push stuff via git (quite a while ago already)...
If you manage to fix pushing stuff, it would be nice if you could explain how exactly you fixed it, so others (me) could set up git under win correctly also...
Title: Re: The GIT problem
Post by: Muton on October 26, 2010, 05:25:13 pm
There is now way to push with git directly (read only)
you need to use ssh

use this command
git remote set-url --push origin ssh://USER@ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
USER = your sourceforge username
like mutonufoai

If you use MSYSgit you already have everything you need
I've added this into our mingw environment too
Btw. ssh.exe will hang inside of mintty.exe or rxvt.exe, because there is no ssh output shown
added a small script to work around that

The result is this
....
Total 4 (delta 3), reused 0 (delta 0)
Pushing denied. Please contact mattn or tron to unlock you. (You are mutonufoai.)
....
Title: Re: The GIT problem
Post by: ManicMiner on November 05, 2010, 01:32:53 am
I'm still completely bamboozled by GIT, I'm afraid. I'm using 1.7.3.1 on Vista x64.

I've had several large internet pipes at my disposal recently and have attempted to update the source a couple of times but now nothing's downloading when I check for updates.

This is driving me absolutely insane. I'm still playing the last compiled version from Muton's script because for me it's still more playable than the precompiled builds since then (I was using optimized settings for my machine and it doesn't seem as happy with the default build options).

I'm willing to give GIT one more shot IF someone can give me a very straightforward set of noddy instructions on how to use GIT to do what I was doing before... which was a bog-standard update from source, then recompile.

(See attached screenshot)
Title: Re: The GIT problem
Post by: MCR on November 25, 2010, 04:14:57 pm
Please help !
This is the exact error I get when trying to push via msysgit:
Title: Re: The GIT problem
Post by: H-Hour on November 25, 2010, 04:28:15 pm
Quote
Pushing denied. Please contact mattn or tron to unlock you.

This had to do with when we had to run git-fixbase after the GIT switch. IRC will be the place to get help with this probably.
Title: Re: The GIT problem
Post by: Malick on February 12, 2011, 10:22:11 am
I see I'm not the only one with troubles with GIT...

I finally installed it and downloaded the sources, following the instructions of the wiki.
However, after downloading some 500Mo of data, I can't find where GIT put the sources !

This is driving me crazy... Any genius around here or am I just blind ?  8)

Malick

EDIT : While searching, I have found a directory named 'ufoai' inside the GIT install. In this directory, there's a 700Mo *.PACK file and a smaller *.IDX file. Is that the archive with the sources ? How do I extract them ?
I don't think you'll be able to find something more complicated than this. I already lost my few free hours trying to figure out how to install, configure, download, open the damn sources... Do we have to code in russian also ?
I'm loosing motivation every minute.
Title: Re: The GIT problem
Post by: bayo on February 12, 2011, 03:39:23 pm
u must "checkout" something now.

maybe

"git checkout master"
Title: Re: The GIT problem
Post by: Malick on February 12, 2011, 05:09:15 pm
I'm currently trying the 'clone' command. It's several Go of data to download... So it's taking quite long !

I'll tell you if I ever manage to open a file before tonight !

Malick

EDIT : woooot ! Managed to get all the sources, finally.

Now, I'm trying to compile... but I must have missed something when setting in my Code::Blocks.
It compiles correctly, till I get an error when compiling ufoded:
Code: [Select]
gcc: Files\CodeBlocks\MinGW\include: No such file or directory
windres.exe: preprocessing failed.

This is strange, as all paths seem to be correct. Toolchain executables set to
Code: [Select]
C:\Program Files\CodeBlocks\MinGW\
Title: Re: The GIT problem
Post by: geever on February 13, 2011, 01:04:36 pm
Code: [Select]
gcc: Files\CodeBlocks\MinGW\include: No such file or directory
windres.exe: preprocessing failed.

This is strange, as all paths seem to be correct. Toolchain executables set to
Code: [Select]
C:\Program Files\CodeBlocks\MinGW\

I remember CodeBlock didn't like path with space in it. Maybe this is the problem?

-geever
Title: Re: The GIT problem
Post by: Malick on February 15, 2011, 09:23:16 pm
Quote
I remember CodeBlock didn't like path with space in it. Maybe this is the problem?

D'oh...
After all this development, it can still not take spaces ? We're back to Win 3.1 !  ::)

Thanks geever, it works now :) I can update the sources and compile...
Now I'll figure how to mess with the code ^^

By the way, with Git what is the 'smartest' solution to upload any modification : patch, push, commit ...  ?

Malick
Title: Re: The GIT problem
Post by: bayo on February 16, 2011, 02:30:23 pm
like svn, it is commit/push. but the game is not free as you-can-do-what-ever-u-want-on-the-repository. U need rights to push things.

Patch is the way to star't contributing. It is nice to create patch with git metatdata, like author and so on, cause it is very easy to apply.
Title: Re: The GIT problem
Post by: Malick on February 16, 2011, 07:43:08 pm
Hi Bayo,

No prob, I will start with 'patch' for a start :)
Thanks for the help, anyway. I'll have plenty other silly questions (in a separate thread !)

Malick

EDIT : OK, I do need help. I want to create a patch and to submit it here (I created a topic)
Problem : when I click on "Create Patch Serial", well, I don't see anything happening. Any help appreciated :)
Thanks for your patience with noobs like me !
Title: Re: The GIT problem
Post by: Malick on March 02, 2011, 08:47:57 pm
Gents,

I need some help with GIT, it's puzzling me ????

I tried to update the sources with PULL command. Now, I have some weird artifacts which I have to track and erase one by one, such as :
Quote
...soldiers 1
   scientists 3
<<<<<<< HEAD
=======
   workers 1
>>>>>>> 36011dc324793d8b64cd5d4d72c28c2c45de39b8
   pilots   1
   pos "-46 26"

And GIT now refuse to commit any change, because I have unmerged files. When I try to merge them, it tells me that I can't, because, I have some unmerged files...
Any help appreciated !

Malick
Title: Re: The GIT problem
Post by: Destructavator on March 02, 2011, 09:19:53 pm
FYI, the third-party program TortoiseGit has been updated with a new version that actually works.

I've tested it - It now works flawlessly for downloading and updating from the master, you can now effectively use it almost as if you were using TortoiseSVN.

The only hard part is getting TortosieGit to work with the data_source, I'm still playing with it to see if it can handle it or not, and how to go about doing it.

The command-line interface with the official Git has also had new versions put out, I've found the most recent for Windows has no issues anymore working with the data_source as well as the master.

Edit:  Sorry, I'm now wondering if I should have posted this info in a new topic where it might get noticed better.  Sorry, my bad.  Still, if the command-line interface isn't working for you, you might have better luck now with TortoiseGit.
Title: Re: The GIT problem
Post by: bayo on March 02, 2011, 10:19:21 pm
fix the files with hands,

git add -u
git rebase --continue
Title: Re: The GIT problem
Post by: Legendman3 on June 04, 2011, 12:23:06 am
What is the difference between svn and git btw? I hear git is "A evil little demon that is able to do what you want but doesn't tell you how"
Title: Re: The GIT problem
Post by: Legendman3 on June 07, 2011, 09:40:12 pm
I got git up and running. Downloaded the source code for this project compiled it and ran it and all I have to say is... I liked svn better.
Title: Re: The GIT problem
Post by: O01eg on June 14, 2011, 08:41:59 am
What is the difference between svn and git btw? I hear git is "A evil little demon that is able to do what you want but doesn't tell you how"
Svn can continue fetching repository.
Title: Re: The GIT problem
Post by: geever on June 15, 2011, 12:46:03 am
Maybe we should lock this thread. No useful info is added to it for a while.....

-geever
Title: Re: The GIT problem
Post by: Sandro on June 15, 2011, 09:00:06 pm
Just before thread gets locked :) I have a proposal: we could make online zipped copy of master branch (~2 GB now), so everyone could download it after setting up git, unzip without caring for git quirks (everything will be configured properly in the .git/), and have a working local repo.

Objections?
Title: Re: The GIT problem
Post by: Mattn on June 16, 2011, 08:00:33 am
where should we host 2gb? that would produce a lot of traffic.
Title: Re: The GIT problem
Post by: O01eg on July 04, 2011, 07:15:03 pm
I download repository by rsync, rename ufoai to .git, but cann't add origin branches for updates:
Code: [Select]
o01eg@o01eg /mnt/another/game.src/ufoai $ git remote set-url origin git://ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
fatal: No such remote 'origin'
o01eg@o01eg /mnt/another/game.src/ufoai $ git remote set-url --push origin ssh://o01eg@ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
fatal: No such remote 'origin'
o01eg@o01eg /mnt/another/game.src/ufoai $ git branch -a
  ai_lua
  android
  automission
  buildbot
  hud
  maputils_java
* master
  renderer_work
  rudolforadiant
  savegame_break
  sizeless_textures
  ufoai_2.0
  ufoai_2.1
  ufoai_2.2
  ufoai_2.3
  ufoai_2_legacy
  ufoai_firemode_patch
  ufoai_sdl
  ufoai_wilminator
  ui_angelscript
How can I create origin branches?