Git

Post Reply
SoulSpirit
Posts: 17
Joined: Wed Aug 22, 2018 1:16 pm

Git

Post by SoulSpirit »

Hi,
I'd like to develop a set of plugins for a MUD collaborating with some friend, and I'm trying to figure out how to setup the project to handle it.
I'm not interested in simply exporting and importing sources, I'm looking for a way to have my plugins sources (identified by a "group", using the naming convetion of Mudlet) always synched with my team.

By looking at .config/mudlet directory, it seems that when sources are modified, only the profiles/MUD/current/autosave.xml file is updated, but that file contains all the sources of all the plugins in the profile: way too much.

Isn't there a way to share only a group of sources with git without the need to export/import it?

The perfect with would be a directory tree for each category of script (triggers,aliases,...) that exactly reflects the organization of sources as seens through the mudlet source editor.

Thanks

Jor'Mox
Posts: 1101
Joined: Wed Apr 03, 2013 2:19 am

Re: Git

Post by Jor'Mox »

Given the constraints of Mudlet, I would set up a repo that syncs with a directory on your computer, write all the relevant code in Lua files (which are just plain text with .lua instead of .txt, not that I actually know if that last bit matters), do all your real editing in a text editor, and have only a single actual script within Mudlet that goes through that target directory and loads all the files when you connect and also on demand (so you can easily load in changes to test them out).

That makes the actual syncing part easy, but it adds two complications. The first is obvious, in that none of your real code is in Mudlet, so you have an extra step for editing, but I know of no way to change the contents of a script programmatically, so even if you could read and write it, you couldn’t overwrite what is there via some command. The second is that since you can’t overwrite things, all triggers/aliases/etc. have to be temporary rather than permanent, so you need some sort of management system in place to purge temp stuff before recreating it whenever you tell it to resync.

User avatar
Vadi
Posts: 4844
Joined: Sat Mar 14, 2009 3:13 pm

Re: Git

Post by Vadi »

SoulSpirit wrote:
Mon Aug 27, 2018 7:34 pm
Isn't there a way to share only a group of sources with git without the need to export/import it?
Yep, there is. Export what you want first, then import it via the module manager (and delete the originals). What you import will be automatically saved back to the files you originally imported now - and you can sync those with Git.

SoulSpirit
Posts: 17
Joined: Wed Aug 22, 2018 1:16 pm

Re: Git

Post by SoulSpirit »

Vadi wrote:
Tue Aug 28, 2018 4:09 am
Yep, there is. Export what you want first, then import it via the module manager (and delete the originals). What you import will be automatically saved back to the files you originally imported now - and you can sync those with Git.
Thanks, it works!
Not very intuitive to setup, but it works :)

User avatar
Vadi
Posts: 4844
Joined: Sat Mar 14, 2009 3:13 pm

Re: Git

Post by Vadi »

Agreed.

Post Reply