We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 727
    • 502 Posts
    I’m currently using 0.9.2.1 and I am looking forward to 0.9.5 (I have beta 3 running on my dev server and I like it). However I have hacked the core.
    I know how to use diff to generate a report on what I changed, but how do I then use that to apply the changes to 0.9.5? I know I can manually go through the files and try to match up the changes and then test, but is there a better solution? Maybe partially automated?

    Andy
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: ajayre at Sep 28, 2006, 03:12 PM

      I’m currently using 0.9.2.1 and I am looking forward to 0.9.5 (I have beta 3 running on my dev server and I like it). However I have hacked the core.
      I know how to use diff to generate a report on what I changed, but how do I then use that to apply the changes to 0.9.5? I know I can manually go through the files and try to match up the changes and then test, but is there a better solution? Maybe partially automated?

      Andy
      Sorry Andy, but we obviously can’t support everyone’s hacks to core code through automation. Progress means change, and once you modify the core code, we cannot guarantee that your hacks will even be recreatable in the new code. It’s difficult enough to hold changes back to minimize compatiblity issues from affecting add-ons that use the prescribed core API’s; I’m sure you can imagine.

      In any case, this community has been simply amazing at supporting users and we thrive on real-world contributions which typically start out as "hacks" anyway. Perhaps discussing the hack and how it can be adopted into the core would be a better solution, and if not, I’m sure someone here will be able to help you get your specific hacks re-applied in most cases.
        • 727
        • 502 Posts
        Ah, what I meant was - is there a way can I use a tool like diff to create a custom patch which I then apply and be reasonably sure nothing was missed. I’m not familiar with patching, etc. so I’m just looking for pointers, not for support for my specific modifications from anyone else. smiley

        Andy
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: ajayre at Sep 28, 2006, 05:05 PM

          Ah, what I meant was - is there a way can I use a tool like diff to create a custom patch which I then apply and be reasonably sure nothing was missed. I’m not familiar with patching, etc. so I’m just looking for pointers, not for support for my specific modifications from anyone else. smiley

          Andy
          Patching is useful when there are small changes to specific files, and in most cases between 0.9.2 and 0.9.5, you would be able to use a merge tool (I use TortoiseMerge on WinXP, part of the TortoiseSVN package) to visually compare such files with your modified version, though even that can get tricky, depending on what kind of changes are made. But the fact is that as MODx evolves, filenames and locations are likely going to change significantly, and in the case of the 1.0 code base specifically, which has been 100% rewritten from scratch, there’s not a tool in the world that’s going to help you identify the diffs.

          This is why IMO, it’s important for users that decide to hack open source software, often for very necessary and valid reasons, share what they’ve done with the community. More often than not, there are easy ways to accomplish the things people want to do without hacks, and they just don’t realize it, or it’s something that needs to be addressed in the core of the product which those close to it are unaware of.
            • 727
            • 502 Posts
            I’m sure you guessed from my other thread - I modified how encrypted passwords are stored. Something that won’t be incorporated before 1.0 and hopefully will be redundant with 1.0. I was just hoping for an easy way/nifty 3rd party tool to apply my changes to 0.9.5, but I guess I will have to do a diff and then by hand.

            Andy
              • 31337
              • 258 Posts
              Andy,

              If you’re just looking for help with the ’patch’ syntax, that’s easy. Are you on a Unix/OS X system or on Windows? If it’s the former, I’d be happy to help. If it’s the latter, I think you’ll need to get someone more Windows savvy to help
                • 727
                • 502 Posts
                I’m using Linux. Thanks for the offer, I think I can experiment with this myself and post back if I have problems.

                Andy