Skip to content

Improve revs and restore commands, clarify restore help#244

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
improve-revs-restore
Jun 18, 2026
Merged

Improve revs and restore commands, clarify restore help#244
AndreyVMarkelov merged 1 commit into
masterfrom
improve-revs-restore

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • revs: refactored to use commandOutput/filesNewFunc for testability, added --time and --time-format flags for consistent formatting with ls and search
  • restore: clarified help text (addresses restore command <file> is the target, where to restore the file #109) — explains that <target-path> is where the restored file is saved, added verbose output with revision and server-modified time
  • Added comprehensive tests for both commands using mock infrastructure

Closes #109

Test plan

  • dbxcli revs /path lists revision IDs
  • dbxcli revs -l --time-format=rfc3339 /path shows absolute timestamps
  • dbxcli restore --help clearly explains target-path and revision
  • dbxcli restore -v /path rev prints confirmation with revision info
  • All tests pass (go test ./...)

- revs: use commandOutput/filesNewFunc for testability, add --time and --time-format flags for consistent formatting with ls and search
- restore: clarify help text (addresses #109), explaining that target-path is where the restored file is saved; add verbose output showing revision and server-modified time
- Add tests for both commands using mock infrastructure

Closes #109
@AndreyVMarkelov AndreyVMarkelov merged commit 2b266b4 into master Jun 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restore command <file> is the target, where to restore the file

1 participant