[Lazarus] Auto Update Request

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Mon Apr 13 19:48:45 CEST 2015


On 2015-04-13 16:41, Michael Van Canneyt wrote:
> 
> IMHO the problem is primarily: what happens if it goes wrong.

Not sure about SubVersion (too too familiar with it any more, but the
solution is pretty simple when using the Git mirrors. On a failure,
revert to last used commit (SHA1).

> i.e. the compile fails somewhere halfway the LCL.
> The IDE will continue to function, but you won't be able to compile any apps.

Giving the problem 15 seconds of my time (a better solution could
probably be realised with more thought)... Instead of a "check for
updates" which does everything, make it a dialog which tracks the last
used commit (SHA1 value). So if anything goes wrong like you described,
you can always go back into that dialog and select the "revert to
previous commit", and you are back in action. ;-)


> Also, doing this requires a checkout. This will increase diskspace etc.

Probably with SubVersion yes, but not a problem with Git. Git has the
full history locally and you can switch to any commit in that history in
an instant. Git previously noted, a git checkout with full history is
still smaller than a single commit SVN checkout (which duplicates
everything in the .svn directories).  [this is how SVN used to work]

Summary of workflow using the Git mirror:

  (dialog takes not of current SHA1 commit value)
  git stash          // save local changes you might have made
  git fetch
  git stash pop      // reapply your local changes (maybe this should be
                        optional)
  (trigger the IDE recompile)
  ... compilation failure detected...
  (click that revert button)
  git checkout <SHA1> // git resets back to the last good commit


A basic working package of this is still possible 15-30 minutes, even
with the extra step.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the Lazarus mailing list