nn' wrote:I would like a facility to convert modx files to patch files and sql files.
I'm not seeing the broad applicability of a feature like this.
It's not broadly applicable, in fact it may well be considered an "advanced" feature.
Furthermore, I don't think anyone has the will to force another completely new format on MOD authors.
I never intended for patch files to take over modx. I simply wish for it to be a supported output format, let's put it this way.
nn- wrote:Even if patch can't express inline finds, at the moment of installation automod locates the lines it's going to modify and alter them. If in fact modx inline finds cannot be translated to patch hunks using modx information only, then patch generation is actually domain of automod as opposed to modx tools contrary to what was stated earlier.
I don't think I follow the logic. What does patch generation have to do with installing a MOD?
Currently installing mods can be done in two ways:
1. Manual installation following instructions in modx.
2. Installation via automod.
Let's agree that manual installation is something we don't want to do because it is too time consuming, which just leaves automod. Now automod is catered to people who, let's say, are not developers and who would rather not deal with source code at all. My problem with this approach is that it completely ignores developers who do care about the code.
I have local modifications on my board. Many of them are too specific to my environment to ever be distributed outside of my site. This is a fact and it's not going to change in foreseeable future. All of the code I deal with is version controlled (literally). Furthermore the code that php runtime executes is not directly something that lives in version control. Here is a simplified procedure I currently have to follow to install a mod via automod:
1. Upload mod to automod
2. Tell automod to install the mod, this gives me an archive of my board files
3. Unpack the archive, diff against deployed tree, arrive at a patch
4. Apply patch file to source tree
Last time I tried this the download didn't work so the actual process I did use was even more complicated and in the end failed to produce a usable result.
What I would like for automod to do is to give me patch file as output in step 2. There appears to be some debate whether a modx file can by itself be converted ta a patch file. If it can be then automod does not need to be involved, what I would be happy with is a supported tool that converts modx files to patches. If the only way to get a patch file out of a modx is to actually attempt to do the changes, then I would like automod to have an option of patch output in addition to tar/tar.gz/zip.
Finally if I could tell automod to generate the patch off an arbitrary path as base instead of phpbb root, life would be totally good.
One benefit of getting a patch is that it cannot be applied partially or multiple times or parts of it applied multiple times. Partial patch application is trivial to spot (the patch program complains), and reverting partial application is trivial on version controlled trees. So potentially patch output could be used with success by people who version control their code but do not have a hardcore deployment model.