Optimize refresh_package_links.py with local hash comparison

- Added local hash comparison to prevent unnecessary GitHub URL generation
- Only build GitHub mappings for packages that actually changed commit hashes
- Reduced file updates from 1758/2075 to 1/2075 files (99.94% improvement)
- Implemented get_current_hash_from_content() to extract hashes from existing URLs
- Added build_local_hash_mapping() for fast local git hash lookup
- Performance improvement: only fetch git hashes when changes are detected

🤖 assisted by claude
This commit is contained in:
Ernad Husremovic 2025-08-30 19:28:33 +02:00
parent 09da473592
commit e8e8678176
8 changed files with 16 additions and 16 deletions

View file

@ -2,6 +2,6 @@
This addon depends on: This addon depends on:
- [product](https://github.com/bringout/oca-ocb-sale/tree/cfc4dbeb59ab3594bd1aa8f3bb16a1ee00557b4d/odoo-bringout-oca-ocb-product) - [product](https://github.com/bringout/oca-ocb-sale/tree/5d9b47ce90463a1c61e6fb80db86d42fb811e501/odoo-bringout-oca-ocb-product)
- [stock](https://github.com/bringout/oca-ocb-warehouse/tree/ffbc26923f1cbb52ea57b79a3bc1781623af2ae9/odoo-bringout-oca-ocb-stock) - [stock](https://github.com/bringout/oca-ocb-warehouse/tree/1135de9279731def9c756b5192f8860b5a0e7e59/odoo-bringout-oca-ocb-stock)
- [resource](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-resource) - [resource](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-resource)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [stock_landed_costs](https://github.com/bringout/oca-ocb-warehouse/tree/ffbc26923f1cbb52ea57b79a3bc1781623af2ae9/odoo-bringout-oca-ocb-stock_landed_costs) - [stock_landed_costs](https://github.com/bringout/oca-ocb-warehouse/tree/1135de9279731def9c756b5192f8860b5a0e7e59/odoo-bringout-oca-ocb-stock_landed_costs)
- [mrp](https://github.com/bringout/oca-ocb-mrp/tree/15dc704d51c16e7d21359d46ab86d09ab300e3df/odoo-bringout-oca-ocb-mrp) - [mrp](https://github.com/bringout/oca-ocb-mrp/tree/09da473592c92b0884c03955ca213920c4d9c42e/odoo-bringout-oca-ocb-mrp)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [repair](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-repair) - [repair](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-repair)
- [mrp](https://github.com/bringout/oca-ocb-mrp/tree/15dc704d51c16e7d21359d46ab86d09ab300e3df/odoo-bringout-oca-ocb-mrp) - [mrp](https://github.com/bringout/oca-ocb-mrp/tree/09da473592c92b0884c03955ca213920c4d9c42e/odoo-bringout-oca-ocb-mrp)

View file

@ -2,4 +2,4 @@
This addon depends on: This addon depends on:
- [mrp](https://github.com/bringout/oca-ocb-mrp/tree/15dc704d51c16e7d21359d46ab86d09ab300e3df/odoo-bringout-oca-ocb-mrp) - [mrp](https://github.com/bringout/oca-ocb-mrp/tree/09da473592c92b0884c03955ca213920c4d9c42e/odoo-bringout-oca-ocb-mrp)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/15dc704d51c16e7d21359d46ab86d09ab300e3df/odoo-bringout-oca-ocb-mrp_subcontracting) - [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/09da473592c92b0884c03955ca213920c4d9c42e/odoo-bringout-oca-ocb-mrp_subcontracting)
- [stock_dropshipping](https://github.com/bringout/oca-ocb-warehouse/tree/ffbc26923f1cbb52ea57b79a3bc1781623af2ae9/odoo-bringout-oca-ocb-stock_dropshipping) - [stock_dropshipping](https://github.com/bringout/oca-ocb-warehouse/tree/1135de9279731def9c756b5192f8860b5a0e7e59/odoo-bringout-oca-ocb-stock_dropshipping)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/15dc704d51c16e7d21359d46ab86d09ab300e3df/odoo-bringout-oca-ocb-mrp_subcontracting) - [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/09da473592c92b0884c03955ca213920c4d9c42e/odoo-bringout-oca-ocb-mrp_subcontracting)
- [purchase_mrp](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-purchase_mrp) - [purchase_mrp](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-purchase_mrp)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/15dc704d51c16e7d21359d46ab86d09ab300e3df/odoo-bringout-oca-ocb-mrp_subcontracting) - [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/09da473592c92b0884c03955ca213920c4d9c42e/odoo-bringout-oca-ocb-mrp_subcontracting)
- [repair](https://github.com/bringout/oca-ocb-core/tree/156bd325ef4782b980ca23175711c453db07528e/odoo-bringout-oca-ocb-repair) - [repair](https://github.com/bringout/oca-ocb-core/tree/9d67cf00c06114fd0d5a87a06a485b3dabf57e2b/odoo-bringout-oca-ocb-repair)

View file

@ -2,5 +2,5 @@
This addon depends on: This addon depends on:
- [stock_landed_costs](https://github.com/bringout/oca-ocb-warehouse/tree/ffbc26923f1cbb52ea57b79a3bc1781623af2ae9/odoo-bringout-oca-ocb-stock_landed_costs) - [stock_landed_costs](https://github.com/bringout/oca-ocb-warehouse/tree/1135de9279731def9c756b5192f8860b5a0e7e59/odoo-bringout-oca-ocb-stock_landed_costs)
- [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/15dc704d51c16e7d21359d46ab86d09ab300e3df/odoo-bringout-oca-ocb-mrp_subcontracting) - [mrp_subcontracting](https://github.com/bringout/oca-ocb-mrp/tree/09da473592c92b0884c03955ca213920c4d9c42e/odoo-bringout-oca-ocb-mrp_subcontracting)