-
Notifications
You must be signed in to change notification settings - Fork 0
Session System
Mikhail Deynekin edited this page Dec 22, 2025
·
1 revision
Manage complex replacement operations with named sessions.
Sessions provide complete audit trails and rollback capabilities for bulk replacements.
# Create a new session
sr --session "project-refactor" --find "old" --replace "new" --recursive ./src/
# Session with specific date
sr --session "2024-migration" --find "legacy" --replace "modern" /path/sr --session listsr --session show "project-refactor"
sr --session show "project-refactor" --detailedsr --session stat "project-refactor"# Revert all changes in a session
sr --session rollback "project-refactor"
# Rollback with confirmation
sr --session rollback "project-refactor" --confirm# Permanently commit session
sr --session commit "project-refactor" --message "Refactoring complete"| Property | Description |
|---|---|
| ID | Unique session identifier |
| Timestamp | Creation date/time |
| Files Modified | Count of changed files |
| Total Changes | Total replacements made |
| Status | active/committed/rollbacked |
| Audit Trail | Complete change log |
- Descriptive Names - Use clear, meaningful session names
- Review Before Commit - Always verify changes first
- Regular Cleanup - Archive old sessions periodically
- Backup Strategy - Combine with backup system
- Change Documentation - Add detailed commit messages