Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Github Patch tracking between mods  (Read 2150 times)

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Github Patch tracking between mods
« on: August 09, 2014, 10:31:09 am »

I setup this crazy project inspired by McTeelox's desire to track bugfixes for Masterwork in github.

I used github and version tracking/branching concept to track changes between mods and hopefully derive base patches to apply specific changes to other mods.

https://github.com/thistleknot/BasedOnVanillaRaws/branches

So far, this concept works with mods that don't rewrite an entire raw file where contextual diff changes can't be used.

Update
Spoiler: I have this idea (click to show/hide)

I would like to post what I've come up with so far so other people can start adding to or basing their work on accordingly.

Btw, thanks goes to the original content creators who I try to give credit to if not in name, at least by title of mod.

So far I've added in

  • Accelerated Mod
  • Modest Mod options
  • Billy Jack's leather changes (  Using just 1 type of leather)
  • Tiered Leather
  • Some masterwork shop's & reactions
  • phoebus changes from 34.11
  • 34_11 to 40_06 changes
I'd like to add more mods, and if people start forking, maybe we can track other mod changes so people can piecemeal their own patch files from the work.

The mod I'm working with is based on Phoebus, but due to the way I applied phoebus to the "tree?", the phoebus changes are more down line towards vanilla, so when looking at say Accelerated mod, the patches highlight the changes that accelerated specifically brings to the raws and doesn't muddy it up with say Phoebus changes at the same time.

Spoiler (click to show/hide)
« Last Edit: August 20, 2014, 02:20:52 pm by thistleknot »
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Github Patch tracking between mods
« Reply #1 on: August 11, 2014, 12:58:38 am »

I derived a way to apply patches to mods in a much more efficient manner than previously.

http://www.reddit.com/r/dwarffortress/comments/2d7jxg/tortoisegitmerge_a_great_tool_for_merging_raws/

Basically, I use git to derive a patch from a commit (skipping binaries), then I have a specific mod patch that I can apply to whatever mod I want.  I only have to look for sometimes deleted sections and/or red spots.  But everything else generally auto-merges quite well.  I merged a mod in about 20 minutes.

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Github Patch tracking between mods
« Reply #2 on: August 20, 2014, 10:52:04 am »

I made a major breakthrough/discovery today.

N way merges

I was able to merge 3 mods with little to no fuss
http://www.bay12forums.com/smf/index.php?topic=142295.msg5589237#msg5589237

direforge
advanced civilizations
and
plantfixes

answered from this stackoverflow post
http://stackoverflow.com/questions/25388806/github-3-way-merge-patch
 
I think I can start taking some mod merges requests.

So, please spam this thread with as many mods as you'd like to see as an option to merge, and I'll make a poll

expwnent

  • Bay Watcher
    • View Profile
Re: Github Patch tracking between mods
« Reply #3 on: August 21, 2014, 12:39:48 am »

Yes, git is awesome! I was wondering why more people haven't used it for things like this. A lot of DF players are somewhat familiar with programming so you'd think there'd be more people who know git.
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Github Patch tracking between mods
« Reply #4 on: August 21, 2014, 01:17:12 am »

I just did a 4 way merge of:

accelerated modest mod, civilization forge, fortress defense, and finally a layer of 40_09 on top.

So far the errors I got were due to new files having deprecated object calls (like personality facets and tree colors).

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Github Patch tracking between mods
« Reply #5 on: August 25, 2014, 02:09:12 pm »

So using github.  I can derive a patch between two versions of the game with a command like:

git diff versiona versionb > patch.patch

That means, if I apply a patch in reverse to versionb, then I get versionA

basically subtracting the changes.

I was thinking.  If patches are derived as differences between two versions, subtractive methods can be used to find common ancestor's...  therefore allowing a way to derive a base common ancestor from any version basically (baring re-ordering of object:id's, but kdiff3 does allow for manual re-alignment...don't know if it would work with alphabetized raws)

Shadowclaimer

  • Bay Watcher
  • Looks like cat for dinner.
    • View Profile
Re: Github Patch tracking between mods
« Reply #6 on: August 26, 2014, 09:22:40 am »

Thank you for handling my mod in this =) freaking awesome.
Logged
Advanced Civilizations (0.40.X+)

Former creator of Metallurgy, Atum, Aquaculture, and Agriculture for Minecraft and Toxic Worlds for Starbound.