Moderator: OpenTTD Developers
As I have stated I am trying to teach myself about C++, Patching, and the GIT system.
I have started by picking a patch which interests me ...
Now according to this website ....
https://wiki.openttd.org/Compiling_on_( ... ng_a_patch
I must first start with the version mentioned in the patch itself which in this case seems to be OpenTTD version 0.5 revision 22470
Looking at this website ....
https://github.com/OpenTTD/OpenTTD/rele ... .6.0-beta3
I can find no version 0.5 revision 22470
So the question is where is this mysterious v5_r22470?
New question ....
I just cloned from ...
openttd v 1.0 and v 1.1
When I ran findversion.sh on each of them they gave the same result ...
20181008-gfbfa4eb5 20181008 0
The only thing difference is the 40 digit alpha/numeric sequence following the above information
So why does two separate version clones result in the same version number?
Another question ..
From here ....
I clone openttd v1.1
And from here ...
I download the zip file
Why are these two completely different?
The zip file has a /src/ai/api folder but the cloned file does not
When I put the two files into Meld the quantity of differences is mind boggling
Are the people in charge trying to make me crazy?
As an accountant who sees the world in black, white, and red I am struggling to make sense of this.
you seem to misunderstand a bit here, "v5" refers to the version of the patch itself, means this is the 5th attempt at that patch released by the personwhtemple1959 wrote:I have started by picking a patch which interests me ...
[...] which in this case seems to be OpenTTD version 0.5 revision 22470
the relevant information here is the "r22470", which refers to the revision of the development tree (in SVN-terms "trunk", in git-terms "master") it was developed for (patches are almost never against the "releases" tree)
this old SVN-revision number is included in the imported commit messages, so on the github page you search for "r22470" in the "commit" section like this:
https://github.com/OpenTTD/OpenTTD/sear ... pe=Commits
which gives you the matching git commit hash (that 40 digit hex number), which you can use with "git checkout" on your local clone to get the appropriate revision
from there on, you could add the patch, commit it to your local clone, and then attempt a "git rebase master" to update it
from my experience so far, the people who developed git are almost definitely trying to make everyone else crazy.whtemple1959 wrote:Are the people in charge trying to make me crazy?
Thanks for the lesson in versioning control and the guidance on tracking down versions in the "Commit" section.
Following your advice I found r22470 I cloned it and downloaded the zip file
Once again the clone version differs greatly from the zip file.
The clone version compiles with no problems ... but the patch is looking for ....
company_gui.cpp (revision 22470)
+++ company_gui.cpp (working copy)
@@ -1621,6 +1621,10 @@
CW_WIDGET_SELECT_RELOCATE, ///< View/hide the 'Relocate HQ' button.
+ CW_WIDGET_LOAD_PROFILE, ///< Load a company profile
+ CW_WIDGET_SAVE_PROFILE, ///< Save a company profile
while the clone file has some sort of WID "command/input"
The patch works in the zip file but once again the zip file tosses up errors beginning with fileio.cpp
So once again I have to ask what happens in the nether that makes a source code malfunction and why is the cloned version so different from the zip file?
- you changed your working copy with "git checkout <id>"? (check the current revision with "git status")
- you're applying the patch with -p0 option?
- you're in the right directory?
I was working on this response in my text editor when of course I exited without moving it over to here.
I was trying to describe the craziness I encountered when I followed your link ... https://github.com/OpenTTD/OpenTTD/sear ... pe=Commits
Long story short with all the links that page has I ended up with 3 cloned files and according to "meld" they were exactly alike and 4 zipped files 3 of the 4 zip files were exactly like the cloned files and of course none of these are compatible with the patch I am interested in.
I will be honest and state that the cli does confuse me very often (plus my chubby fingers always miss-type so I have to re-input the commands often) so i do tend to use guis when possible. are you familiar with git-cola?
I will attempt to teach myself about git checkout and git status and see if that gets me on the right path.
Granted I am an idiot, although I am trying to understand the way "coder's" minds work but it seems that a lot of what is going on intentionally is designed to ignore real world lay people.
The journey continues
Thanks for the help so far
Don't feel bad about this. Different software has different target audiences. Openttd is intended for everyone while, in the case of git, Linus Torvalds wrote the code to manage the Linux kernel source code and his intended audience was very experienced C coders who generally prefer to work on the command line. Git has grown a lot since it's birth and lots of people have done a lot of work to expand and correct core functionality but there has also been a lot of work to make things more useful for people outside the core audience (e.g. graphical front ends and integration with IDEs)whtemple1959 wrote:Granted I am an idiot, although I am trying to understand the way "coder's" minds work but it seems that a lot of what is going on intentionally is designed to ignore real world law people.
As a result, git has a ton of options but you really need to know only a few of the commands to use git. Now, I'm no git wizard but I found it quite easy to find those few commands that I use on a daily basis from the document known as "Everyday git"
Really, I'm quite impressed to see an accountant tackle C++ because it's a "serious" language that takes a lot of learning to use. My own experience is that I've been programming since the 70s and I've found git quite easy to use. On the other hand, I'm sure you have accounting software that would make me feel pretty overwhelmed at first but would, hopefully, make sense in time.
I do have 3 accounting packages that are very robust
I would be happy to do your taxes ....
Thank you for the link and I will begin studying it today.
I guess the thing which confuses me the most is from the main page where it gives you the option to paste the clone info to the clipboard or download a zip you get two completely different versions.
And that I simply can not get my head around.
But, maybe your link will help because as it says "distributed-even-if-your-workflow-isnt" and my workflow is not distributed.
This is mostly a GitHub UI fail. The GitHub UI will always just tell you the git repository URL, no matter which sub-page you are on, but a simple git clone <URL> will always default to the latest current revision on the master branch. It fails to tell you that you either need to do git checkout <BRANCH> after the clone or use git clone -b <BRANCH> <URL> for a one-stop command (or whatever the equivalent command/menu option in your git client is). <BRANCH> can either be a real branch or tag like release/1.1 or a (shortened) hash for a specific revision.whtemple1959 wrote: I guess the thing which confuses me the most is from the main page where it gives you the option to paste the clone info to the clipboard or download a zip you get two completely different versions.
And that I simply can not get my head around.
-- Michael Lutz
Users browsing this forum: No registered users and 21 guests