fix: detect rclone version for --create-empty-src-dirs support#473
fix: detect rclone version for --create-empty-src-dirs support#473phernandez merged 1 commit intomainfrom
Conversation
The --create-empty-src-dirs flag was added in rclone v1.64.0. Users with older versions (e.g., v1.60.1-DEV on Raspberry Pi) get "unknown flag" errors when running bisync. This change: - Adds get_rclone_version() to detect installed rclone version - Adds supports_create_empty_src_dirs() to check version >= 1.64.0 - Conditionally includes the flag only when supported - Uses @lru_cache for version detection (runs once per session) - Gracefully handles version detection failures (skips the flag) Fixes #472 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 2m 2s —— View job PR #473 Review: Rclone Version CompatibilityI've completed a thorough review of this PR against the Basic Memory team checklist. Here's my detailed analysis: SummaryThis PR adds rclone version detection to conditionally use the Overall Assessment: ✅ Excellent implementation The code is well-designed, thoroughly tested, and follows all Basic Memory conventions. I found only minor observations below. Code Quality & Standards ✅Positives:
Code Review: src/basic_memory/cli/commands/cloud/rclone_commands.py:52-86
src/basic_memory/cli/commands/cloud/rclone_commands.py:273-275 # Add --create-empty-src-dirs if rclone version supports it (v1.64+)
if supports_create_empty_src_dirs():
cmd.append("--create-empty-src-dirs")
Testing & Documentation ✅Test Coverage (tests/test_rclone_commands.py):
Documentation:
Minor Observation:
Basic Memory Architecture ✅
Security & Performance ✅Security:
Performance:
Error Handling:
Compatibility ✅
Minor Cleanup: test-int/mcp/test_lifespan_shutdown_sync_task_cancellation_integration.py:1-2
Detailed Checklist ResultsCode Quality & Standards
Testing & Documentation
Basic Memory Architecture
Security & Performance
Compatibility
Recommendations
ConclusionThis is a high-quality PR that:
Recommendation: Approve and merge after running the test suite to verify all tests pass. Great work on this fix! 🎯 |
Summary
--create-empty-src-dirsflag (v1.64.0+)Changes
get_rclone_version()- Parsesrclone versionoutput to get (major, minor, patch) tuplesupports_create_empty_src_dirs()- Returns True if version >= 1.64.0@lru_cacheto only run version check once per sessionTest plan
pytest tests/test_rclone_commands.py -vFixes #472
🤖 Generated with Claude Code