FreeCAD-addons icon indicating copy to clipboard operation
FreeCAD-addons copied to clipboard

[FEATURE] Skipping restart with this git trick ?

Open luzpaz opened this issue 6 years ago • 4 comments

Per @sgrogan in https://github.com/looooo/freecad.gears/issues/1#issuecomment-537256864

I think something like this, from FreeCAD python console, should work?

import git
repo = git.Repo(FreeCAD.getUserAppDataDir()+'/Mod/FCGear')
repo.git.pull('origin','develop')
repo.git.checkout('develop')
import importlib
importlib.reload(pygears)

EDIT: no restart required PY3.4+

luzpaz avatar Oct 23 '19 23:10 luzpaz

only the import importlib importlib.reload(pygears) is necessary. The other stuff is to checkout a development branch of the repo instead of master.

sgrogan avatar Oct 24 '19 21:10 sgrogan

Related: https://forum.freecadweb.org/viewtopic.php?f=10&t=29805

luzpaz avatar Feb 06 '20 16:02 luzpaz

@wmayer does https://github.com/FreeCAD/FreeCAD/commit/0bbc253ddee6801770c78e011c5201b7c2c36080 have any relevance to this feature request? (ignoring the 'git trick' referenced in this ticket, I mean the ability to not requiring a FreeCAD restart)

luzpaz avatar Feb 16 '22 22:02 luzpaz

No.

wwmayer avatar Feb 17 '22 09:02 wwmayer

I'm going to close this as "Not planned" -- avoiding restarts when major changes are made is not a high enough priority to keep open: it's never going to be as reliable as just restarting FreeCAD.

chennes avatar Feb 28 '24 04:02 chennes