Author Topic: Official way for patches to survive an upgrade  (Read 608 times)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Official way for patches to survive an upgrade
« on: July 15, 2009, 11:07:30 am »
The official way for patches to survive an upgrade, is to not patch the stock macros directly, and instead copy pieces out to separate user macros, and load the user macros.  When upgrading, find the original pieces in the stock macros, apply the new changes to the user macros, and reload the user macros.

But it's true, in many cases it is difficult or even impossible to reasonably pull out pieces into separate user macros.

The way I do it is by keeping the entire SE installation under source control.  I briefly explain how here, but lately I've been thinking I should probably start a topic that explains in more detail how and shares two helper macros I use in the process.  The process is simple, mechanical, and smooth; all you need is a source control repository where you can store the stuff (and the source control system must support applying changes/patches from one tree to another -- e.g. Perforce does, and is free for up to 2 users), and the rest is mostly automated.  (Of course, if you get ambitious and make complex changes then you might get some merge conflicts, but that's to be expected).  Using a lightweight process like this, your don't lose your patches to stock macros when upgrading.

Getting back on topic:

It's an interesting feature request, for the editor to natively support carrying patches forward somehow.  Ideally, it would be possible to overlay/override anything about any stock macro, using a separate file, i.e. without needing to directly modify the stock macro file at all.
« Last Edit: July 15, 2009, 11:10:51 am by chrisant »

dunkers

  • Senior Community Member
  • Posts: 606
  • Hero Points: 27
Re: Official way for patches to survive an upgrade
« Reply #1 on: July 15, 2009, 11:30:19 am »
I tried putting SE under source control, but ran into problems with upgrades - it's messy to add a new directory after the upgrade (where, say, the controlled directory is 14.1 and the new is 14.2) but you can't pre-checkout an empty new directory because then SE won't auto-migrate things.

One for another topic though, as you say :)