pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.33k stars 338 forks source link

Update clone from CLI fails #1030

Closed thumDer closed 4 years ago

thumDer commented 4 years ago

Describe the bug When I try to update a clone (base deployment) it fails, pyrevit forgets the clone and also removes it from the config.ini.

To Reproduce

pyrevit clones delete --all
pyrevit clone main base --dest="C:\pyRevit\main"
pyrevit clones update main

Expected behavior It should update the clone if possible, or report if it is up to date.

Desktop (please complete the following information):

Microsoft Windows 10 [Version 10.0.19041]
Executing User: IN-EX\tamas.deri
Active User: IN-EX\tamas.deri
Admin Access: No
%APPDATA%: "C:\Users\tamas.deri\AppData\Roaming"
Latest Installed .Net Framework: 4.8
Installed .Net Target Packs: v3.5 v4.0 v4.5 v4.5.1 v4.5.2 v4.6 v4.6.1 v4.7 v4.7.1 v4.7.2 v4.X
Installed .Net-Core Target Packs: v3.1.401
pyRevit CLI 4.8.2.0

Additional context

The complete process from powershell:

PS C:\Users\tamas.deri> pyrevit clones delete --all
PS C:\Users\tamas.deri> pyrevit clone main base --dest="C:\pyRevit\main"
PS C:\Users\tamas.deri> pyrevit clones
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
main | Deploy: "base" | Branch: "master" | Version: "4.8.2" | Path: "C:\pyRevit\main"
PS C:\Users\tamas.deri> pyrevit clones update main
Error: Clone source must be a ZIP image.
Run with "--debug" option to see debug messages
PS C:\Users\tamas.deri> pyrevit clones
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
PS C:\Users\tamas.deri> pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
==> Attachments
Unknown | Product: "2021 First Customer Ship" | Manifest: "C:\Users\tamas.deri\AppData\Roaming\Autodesk\Revit\Addins\2021\pyRevit.addin"
Unknown | Product: "2020.2.2 (Full Install)" | Manifest: "C:\Users\tamas.deri\AppData\Roaming\Autodesk\Revit\Addins\2020\pyRevit.addin"
Unknown | Product: "2019.2.1" | Manifest: "C:\Users\tamas.deri\AppData\Roaming\Autodesk\Revit\Addins\2019\pyRevit.addin"
Unknown | Product: "2018.3.3 Security Fix" | Manifest: "C:\Users\tamas.deri\AppData\Roaming\Autodesk\Revit\Addins\2018\pyRevit.addin"
==> Installed Extensions
pyNexTools | Type: Unknown | Repo: "https://gitlab.com/tderi/pynextools" | Installed: "C:\_stuffz\pyRevit\Extensions\pyNexTools.extension"
==> Default Extension Search Path
C:\Users\tamas.deri\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
M:\Revit_Library\General\pyRevit\Extensions
C:\_stuffz\pyRevit\Extensions
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
2021 First Customer Ship | Version: 21.0.0.383 | Build: 20200220_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021"
2020.2.2 (Full Install) | Version: 20.2.11.3 | Build: 20200206_0915(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020"
2019.2.1 | Version: 19.2.10.7 | Build: 20190225_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019"
2018.3.3 Security Fix | Version: 18.3.3.18 | Build: 20190510_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2018"
==> Running Revit Instances
==> User Environment
Microsoft Windows 10 [Version 10.0.19041]
Executing User: IN-EX\tamas.deri
Active User: IN-EX\tamas.deri
Admin Access: No
%APPDATA%: "C:\Users\tamas.deri\AppData\Roaming"
Latest Installed .Net Framework: 4.8
Installed .Net Target Packs: v3.5 v4.0 v4.5 v4.5.1 v4.5.2 v4.6 v4.6.1 v4.7 v4.7.1 v4.7.2 v4.X
Installed .Net-Core Target Packs: v3.1.401
pyRevit CLI 4.8.2.0
eirannejad commented 4 years ago

Fixed and will be published with next release

thumDer commented 4 years ago

Only one comment on this: the first run of update still breaks the currently deployed clone, so it needs to be cloned again, but after that it seems to perform the update. Is there any way to only execute the update if the current clone is not up-to-date?

eirannejad commented 3 years ago

Yeah I'm doing another round of fixes on the update mechanism

thumDer commented 3 years ago

Thx! In the meanwhile I'm handling it in the PowerShell script to check the clones version number.