Mercurial Repository Management

For discussion of the code running behind the game

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8664
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Mercurial Repository Management

Postby Roots » Sat Aug 15, 2015 7:34 pm

There are a few things I'm interested in doing with our Mercurial repository. I haven't done any yet because I'm still new to it and am overly cautious about not breaking something. Here's a list of what I was thinking about doing:

1) Move the game/ directory to a different branch and delete the game/ directory
https://bitbucket.org/allacrost/allacro ... -demo-to-a
I already opened an issue on this one a few days ago. Basically we'd move everything in demo/ out of the default branch and into a new one (probably called the demo branch). Then we'd take everything currently in game/, move it one directory down, and delete the game/ directory.

My main concern here is losing revision history (I'm not sure if this would cause us to lose history or not). FYI, everything in demo/ was what we worked on from the start of the project until around summer 2011 (at that point we decided that we had enough experience and content to move out of making RPG demos and begin making the full game). I'm also not sure how you take a big chunk of files in one branch and move it to a new branch without losing all your file history.


2) Create a new branch to hold Windows library files
Currently we have a ZIP file stored on our FTP and linked to on the forums for Windows developers to grab and unpack in order to build Allacrost. I'd like to open up a separate branch for managing these libraries in an easier way. The reason we don't have these libraries in the default branch is because we don't feel like developers on other systems should have to get these libraries whenever they check out the code.

The issue here is that developers on Windows actually *would* need to have all the files in this branch available in the default branch of their clone checkout (since they can't compile Allacrost without the libs available). So again, I'm not sure if this is a good plan or not. :shrug:



I'm open to hearing other suggestions for anything else we want to put into new branches or re-organize in our repository. Although we should stay away from major re-organization of code/lua files (I already did quite a bit of that myself late last year). I'm kind of hoping that a seasoned Mercurial user will appear and take care of this work, because I'm too trepid at the moment to do it myself with my limited understanding and experience.
Image
User avatar
Roots
Dictator
Posts: 8664
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Mercurial Repository Management

Postby Roots » Tue Sep 20, 2016 7:54 am

Tonight I merged the sdl2 branch into the main. This is a pretty disruptive change, and you'll need to do the following:

1) Grab the latest source, and do a clean rebuild of everything. It may not compile correctly if you fail to fully clean your build files before rebuilding.

2) The settings.lua file has been updated for key mappings. If you have a settings.lua file in your personal folder (eg, "~/.allacrost/profiles/settings.lua" in Linux), replace it with a copy of the file at lua/data/config/settings.lua. If you fail to do this, your key mappings won't be correct and the boot menu is pretty much just going to continuously throw up the help screen every time you press an unmapped key.

3) If you are on Windows, you need to delete your lib/win32/* folder and unzip the win32.zip file to rebuild it. Libraries have been replaced for Windows. If you don't do this, it won't build.

Both Linux and Windows builds should be working. OS X will not and needs to have the dependencies for that updated. But no active developers are currently on OS X so that means we can't do anything about it ourselves for now.

----------

In the coming week or so there will be more disruptive changes. With the sdl2 work done, I am preparing to remove the demo/ folder from the repository (a separate demo branch has already been created to hold this historical content). Additionally, everything in the game/ folder will be moved to the base directory for the repository, and the game/ folder will then be removed.

I'm hoping this work won't be too painful, but we'll see. Once its all over with there shouldn't be any more major file/directory moves or deletes for the foreseeable future. Let me know if you have any comments/questions/concerns.
Image
Lordakius
Junior Member
Posts: 26
Joined: Thu May 26, 2016 9:22 pm

Re: Mercurial Repository Management

Postby Lordakius » Thu Sep 22, 2016 3:48 pm

2) I have got the problem with the unmapped key, but I can't find the .allacrost/profiles/settings.lua on Windows. Anyone has an idea where this is? What does it anyway? (hope this is not the wrong topic xD)
User avatar
Roots
Dictator
Posts: 8664
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Mercurial Repository Management

Postby Roots » Thu Sep 22, 2016 4:54 pm

Check your My Documents folder. There might be a hidden allacrost file or folder there. At least I think that's where it's at. You could always do a search for settings.lua in the start menu and figure out where this file exists.
Image
Lordakius
Junior Member
Posts: 26
Joined: Thu May 26, 2016 9:22 pm

Re: Mercurial Repository Management

Postby Lordakius » Thu Sep 22, 2016 5:12 pm

Yeah, it was in My Documents ... What is the purpose of this file? I mean, it exists in the game folder, so why create another instance of it ?

PS: now it works how it should, thanks :)
User avatar
Roots
Dictator
Posts: 8664
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Mercurial Repository Management

Postby Roots » Thu Sep 22, 2016 8:28 pm

It is a per-user file. If you have Allacrost on a single machine and two different people use that machine to play it, we don't want one person's setting changes to affect the other. The installer just takes the copy in lua/data/config (which never gets altered at run-time) and copies it to the user directory location.
Image
User avatar
Roots
Dictator
Posts: 8664
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Mercurial Repository Management

Postby Roots » Mon Sep 26, 2016 4:41 am

Roots wrote:In the coming week or so there will be more disruptive changes. With the sdl2 work done, I am preparing to remove the demo/ folder from the repository (a separate demo branch has already been created to hold this historical content). Additionally, everything in the game/ folder will be moved to the base directory for the repository, and the game/ folder will then be removed.

I'm hoping this work won't be too painful, but we'll see. Once its all over with there shouldn't be any more major file/directory moves or deletes for the foreseeable future. Let me know if you have any comments/questions/concerns.


I completed this work just now. You should pull the latest changes from the master repository and delete your "demo/" and "game/" folders if the update doesn't do it automatically (make sure to save any files you have under here that are not in the repository).

Sadly, you can no longer view the file revision history on the bitbucket site. The history has not been lost, however. To find changes to a particular file, you need to run the command "hg log --follow myfile.cpp" and it will print all the changes that have been made to it. The --follow tells hg log to look at previous locations of the file, because by default it just looks at the history for its current location.


Let me know if you have any issues.
Image

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 5 guests