Revision/Source Code Control
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Revision/Source Code Control
I'm just curious if anyone uses revision control software such as git, Mercurial, svn, etc. with their scenario and/or map files. I am thinking about using git and am looking for tips from others on how to organize the files and get the game to see them with limited fuss.
My current thought is to use a remote gitdir in my add-ons directory. This way the actual git files live elsewhere and can be updated from my local Wesnoth data directory.
If you use git or something for revision control, I'm curious to hear about what you do to minimize file copying, etc.
My current thought is to use a remote gitdir in my add-ons directory. This way the actual git files live elsewhere and can be updated from my local Wesnoth data directory.
If you use git or something for revision control, I'm curious to hear about what you do to minimize file copying, etc.
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Revision/Source Code Control
I have git for all my add-ons these days. Helps in a lot of maintenance and patching.Dyrcona wrote: ↑January 21st, 2022, 5:21 pm I'm just curious if anyone uses revision control software such as git, Mercurial, svn, etc. with their scenario and/or map files. I am thinking about using git and am looking for tips from others on how to organize the files and get the game to see them with limited fuss.
My current thought is to use a remote gitdir in my add-ons directory. This way the actual git files live elsewhere and can be updated from my local Wesnoth data directory.
If you use git or something for revision control, I'm curious to hear about what you do to minimize file copying, etc.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Revision/Source Code Control
Thanks for creating this thread, I'm hoping that it will have something better/less complex that my current setup. I'm currently using git-subtree to have a dedicated repo for each add-on that I want to edit, and then a single Git repo covering wesnoth's data/add-ons directory.
The data/add-ons directory's .git/config includes these for Non Fatal Wounds:
I either edit in the dedicated repo and then merge with git subtree, or edit in the big repo and then split or cherry-pick back to the dedicated repo.
The data/add-ons directory's .git/config includes these for Non Fatal Wounds:
Code: Select all
[alias]
subadd-nfw-master = subtree add --prefix Non_Fatal_Wounds/ dedicatedNonFatalWounds/master -m "Merge.nfw/master"
submerge-nfw-master = subtree merge --prefix Non_Fatal_Wounds/ dedicatedNonFatalWounds/master -m "Merge.nfw/master"
subsplit-nfw = subtree split --prefix Non_Fatal_Wounds/ -b splits/nfw
Re: Revision/Source Code Control
That seems like an interesting approach. I've never used git subtrees before, though I do contribute to a project that uses git submodule. I'm going to have to look into subtree as an alternative to submodule.
I've had a look at Lord-Knighmare's github account, and I'm impressed. I'm definitely not ready to share anything, yet, but I'll consider putting the source on github when I am.