Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 16, 2011, 05:24   #1
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Trying to get GIT

One of these days, I need take about 3 hours and do some research on how to fully use the GIT. Then, I could stick the borg files into the angband project.

I signed up for a github account. I have gitbash or something like that on my machine. But I have not had the chance to sit down with it and see how to download and integrate the git files with those on my machine. Or even better, how do I upload my frequent borg updates to the git repository?

I hope youtube has some good training videos.

Oh ya, BTW. Can I get permission to make commit changes to the library? The borg and screen-saver need to have a few changes to the game code. It's easiest if I make them.

Last edited by APWhite; April 16, 2011 at 05:35.
APWhite is offline   Reply With Quote
Old April 16, 2011, 07:15   #2
camlost
Sangband 1.x Maintainer
 
camlost's Avatar
 
Join Date: Apr 2007
Posts: 522
camlost is on a distinguished road
I think, basically, you can clone the main angband repository and make and commit changes to your own version. Then, someone with access to the main-line can merge your changes into the production version.

Whenever you want to update your version to production, you simply merge any changes in production into your own version. You'll keep any changes that you've made that aren't in production and get any that made it into production after you cloned it initially.

Does that make sense? Is this more or less correct for git (I'm more experienced with SVN)?
__________________
a chunk of Bronze {These look tastier than they are. !E}
3 blank Parchments (Vellum) {No french novels please.}
camlost is offline   Reply With Quote
Old April 16, 2011, 07:53   #3
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
You should follow the instructions on the GitMaster page on the rephial wiki. The "Setting up" and "Feature branches" apply to you. Once you have changes that you want us to pull into the mainline, let us know, and we can merge them.
myshkin is offline   Reply With Quote
Old April 16, 2011, 09:21   #4
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by myshkin View Post
You should follow the instructions on the GitMaster page on the rephial wiki. The "Setting up" and "Feature branches" apply to you. Once you have changes that you want us to pull into the mainline, let us know, and we can merge them.
http://trac.rephial.org/wiki/GitUsage might also be helpful. The the key steps are

1. Go to http://github.com/angband/angband and click Fork. That will create a copy of the official repository in your own github account.

2. git clone git://github.com/you/angband. That will make you a local copy of your github fork, so that you can work on the code. Once you've done this, you can make a borg branch and start integrating your code - including making any changes you need to the rest of the code.

3. git push origin borg. That will push your new branch, with the integrated borg code, up to github. When you've done that, let us know and we can try to merge it. Don't worry about keeping up-to-date with nightlies - merging will be tricky anyway.
Magnate is offline   Reply With Quote
Old April 16, 2011, 10:07   #5
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,372
AnonymousHero is on a distinguished road
Quote:
Originally Posted by APWhite View Post
One of these days, I need take about 3 hours and do some research on how to fully use the GIT.
That is the exact point at which you will find out about the bottled awesomesauce that accompanies every git install.
AnonymousHero is offline   Reply With Quote
Old April 17, 2011, 03:53   #6
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Is there a way to copy the files from the online repository onto my machine or do I have to do some line-by-line copying?
APWhite is offline   Reply With Quote
Old April 17, 2011, 03:58   #7
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,947
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by APWhite View Post
Is there a way to copy the files from the online repository onto my machine or do I have to do some line-by-line copying?
You might want to read a git primer, e.g. this one and go from there.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old April 17, 2011, 07:38   #8
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by APWhite View Post
Is there a way to copy the files from the online repository onto my machine or do I have to do some line-by-line copying?
Git clone does exactly that - copies the entire online repo to your local machine.
Magnate is offline   Reply With Quote
Old April 17, 2011, 14:35   #9
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,947
Donated: $40
takkaria is on a distinguished road
Hey APW,

I've seen the changes you've made so far in your repository, but I'd like to suggest different changes:

1. Putting 'extern' (and an extra comment line) in front of all the arrays in player/calcs.c is bad style. "extern" means "this is defined in another file", not "this is used in another file". When you define an array at the same time as saying "don't use this definition, it's defined elsewhere", compilers will get confused (I think this is the cause of some warnings in another thread). Just removing "static" will have the intended effect, and if you want us to pull this code into the main repository, I'd prefer not to have 'apw' tags.

2. I see you've re-added some removed macros to z-virt... please could you update the borg code not to use them instead of adding them back in? They were removed because they're really bad style and there are better ways to write the same code that makes it more obvious what's going on. Replacing all instances of
i. MAKE(P, T) with P = ZNEW(T) and
ii. C_MAKE(P, N, T) with P = C_ZNEW(N, T)
will do the trick.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old April 18, 2011, 04:01   #10
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Quote:
Originally Posted by takkaria View Post
Hey APW,

I've seen the changes you've made so far in your repository, but I'd like to suggest different changes:

1. Putting 'extern' (and an extra comment line) in front of all the arrays in player/calcs.c is bad style. "extern" means "this is defined in another file", not "this is used in another file". When you define an array at the same time as saying "don't use this definition, it's defined elsewhere", compilers will get confused (I think this is the cause of some warnings in another thread). Just removing "static" will have the intended effect, and if you want us to pull this code into the main repository, I'd prefer not to have 'apw' tags.

2. I see you've re-added some removed macros to z-virt... please could you update the borg code not to use them instead of adding them back in? They were removed because they're really bad style and there are better ways to write the same code that makes it more obvious what's going on. Replacing all instances of
i. MAKE(P, T) with P = ZNEW(T) and
ii. C_MAKE(P, N, T) with P = C_ZNEW(N, T)
will do the trick.
Sure I can make those changes.

Removing the apw tags would simple enough. Its not ego. I have them there because it is easy to search for apw to find the needed code changes. Once the code changes have been added to the main code base, there would be no need to have the tags.

I was using GIT GUI and it does not seem to be very friendly. I do not see how I can add files to my repository. Staging them and committing them poops out as well. I have not had enough free (uninterrupted) time to learn all the terms (push, stage, commit, etc).

I found today, that after making some changes to my code, when I loaded up the Git GUI, it recognized the changes and listed those code changes. That was nice.

I have not seen how I can add a file to the online repository. My local repository has the borg stuff but the GUI did not ask for my online login information. Again, this is through the GUI, I have not used the command line tool.
APWhite is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
git misery Pete Mack Development 11 February 6, 2011 10:46
Moving to Git takkaria Development 57 December 4, 2010 09:22
Vanilla, Trac, Git, etc. takkaria Development 2 November 2, 2010 13:52
Bug in current vanilla, Git? Trac? Timo Pietilš Development 4 October 10, 2010 21:12
Sangband SVN/Git/? camlost Development 7 September 9, 2010 18:31


All times are GMT +1. The time now is 20:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.