in reply to How to apply patches to PM code

Excellent documentation. What I'd really like to see is
"How to test patches (a guide for pmdevils)"

The only patches I've submitted are tiny one or two line changes, since I don't feel comfortable slinging more code than that around w/o a reasonable way to test it. Is there any way to test a patch other than installing a local copy of Everything2, or is the patching process mostly like coding in the dark?

who should probably know better by now....

Replies are listed 'Best First'.
(tye)Re: How to apply patches to PM code
by tye (Sage) on Oct 02, 2002 at 16:14 UTC

    It is mostly like coding in the dark1. You should install your own copy of Everything. If mt2k can do it in one sitting (on Win32 even), then I bet you can too.

    We already have two central test environments. One allows new *.pm files to be tested without affecting the public access. The other does that plus also works on the backup database instead of the live database. It would be nice to add another database, backup all of the "code" and at least some of the "content" to it, but only copy volunteer users (mostly members of pmdev) and don't copy sensitive information (so, for example, you'd have a different password in this alternate database). Then most of the users could be made gods on this alternate system so that they could test code on it.

    Add to this a procedure for backing up the "code" from the live database to this new Olympus database (playground of the many gods), plus a feature to turn a node on the Olympus database into a patch on the live database, and we'd have a nice test environment.

    Unfortunately, we can't host this test system alongside the production system. Being able to create nodes in the Olympus system means that you can run any Perl code you like on that web server, which means you can work through any tricks we set up to try to hide the production DB password from you. Getting creative with security on the web server is probably not an option due to how the server is set up in order to make it easy for Pair to maintain it.

    And hosting it elsewhere adds lots of other problems to the mix. So feel free to find a place where you can set up Everything such that lots of pmdev members can use it for testing. Then you can use that to write and test the code for backing up PM code to Olympus and making PM patches from Olympus nodes.

            - tye (1which just makes your screen easier to read)
Re (2): How to apply patches to PM code
by VSarkiss (Monsignor) on Oct 02, 2002 at 15:56 UTC

    <aol> Me too! </aol>

    I very much second this. I often think I could contribute more if only I felt what I submitted would actually work. I have my own copy of E2, but that still isn't enough, because changes usually depend on other, existing, PM nodes.

    The other thing that stops me is that it's often necessary to patch two or three nodes at once (like the display page and the htmlcode behind it), and I'm not sure how to make a group of patches. A patchball, if you will. Is writing about it in the wiki enough?

    I'm still just an egg in so many ways...

      I have my own copy of E2, but that still isn't enough, because changes usually depend on other, existing, PM nodes.

      ...which you have full access to the source of. If you want more than that, then you are in a great position to write such (for example, see my other reply).

              - tye (abusing PM for over 1/50th of a century)