3.5 KiB
3.5 KiB
AllSpice Loves SVN
This repository facilitates teams transitioning from an existing SVN system to AllSpice (Git) while maintaining seamless synchronization between the two. It enables users to work in both environments without conflicts and ensures smooth collaboration.

Purpose
This repository allows:
- Alice to work in AllSpice (Git) while Sam continues using SVN.
- Transparent syncing of files between AllSpice and SVN as if both were using Git.
Workflow
Alice's Workflow (AllSpice/Git)
graph LR;
A[Run fetch-svn.bat] --> B[Edit Files];
B --> C[Stage Changes];
C --> D[Commit Changes];
D --> E[Push to AllSpice];
Sam's Workflow (SVN)
graph LR;
X[Run svn update] --> Y[Edit Files];
Y --> Z[Commit to SVN];
How It Works
A batch file automates the setup:
- Download and run the batch file – It prompts users for:
- AllSpice repository URL
- SVN repository URL
- Repository setup – The script:
- Clones the AllSpice repository
- Uses
git svn clone
to pull the SVN repository into the Git repository - Synchronizes the repositories
- Branching logic – Since SVN uses
trunk
as the active working directory:- The
trunk
branch from SVN is merged into themain
branch of the Git repository - The
main
branch becomes the primary branch for design reviews (PRs)
- The
- File management – The script:
- Modifies
.gitignore
to exclude batch files - Downloads additional helper scripts into the
.allspice
folder:svn-to-allspice.sh
– Handles synchronizationfetch-svn.bat
– Pulls SVN changes viagit svn rebase
- Pre-push Git hook – Ensures commits are pushed to both SVN and Git
- Modifies
- Sam (SVN User):
- Works in SVN as usual
- Commits and updates normally
- Notices commits might look slightly different
- Can view changes in AllSpice immediately
- Alice (Git User):
- Works in AllSpice using Git
- Fetches SVN updates using
fetch-svn.bat
- Pushes changes, which automatically syncs with SVN
- Design Review Process:
- PRs in AllSpice are merged into
main
- A tag is created on
main
- The tag is pushed to SVN, ensuring synchronization
- PRs in AllSpice are merged into
Benefits
- Enables a hybrid workflow while SVN sunsets
- Keeps both SVN and Git users happy with minimal disruptions
- Ensures accurate design reviews in AllSpice
- Automates synchronization to reduce manual effort
Installation & Usage
- Download the batch file from the repository.
- Run the batch file.
- Follow the prompts to set up repository synchronization.
- Use
fetch-svn.bat
to bring in SVN changes when needed. - Push commits as usual – they will sync automatically.
Troubleshooting
If you encounter any issues, try the following:
- Sync issues between Git and SVN: Ensure that you have the latest changes from both repositories using
fetch-svn.bat
andgit pull
. - Merge conflicts: Resolve conflicts before committing.
- Pre-push hook failure: Verify that the pre-push hook is correctly installed in
.git/hooks/pre-push
and has execution permissions. - Batch file errors: Check that all required dependencies (Git, SVN, and the batch scripts) are installed and accessible from the command line.
For further assistance, contact support@allspice.io.