Go to file
2025-02-21 20:20:33 +00:00
.allspice s/bash/sh 2025-02-21 19:14:51 +00:00
images Make image smaller 2025-02-21 18:59:13 +00:00
clone-allspice-and-svn.bat Remove 2025-02-21 20:20:33 +00:00
readme.md Update readme.md 2025-02-21 19:18:12 +00:00

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];

Alice workflow

Sam's Workflow (SVN)

graph LR;
    X[Run svn update] --> Y[Edit Files];
    Y --> Z[Commit to SVN];

Sam's Workflow

How It Works

A batch file automates the setup:

  1. Download and run the batch file It prompts users for:
    • AllSpice repository URL
    • SVN repository URL
  2. Repository setup The script:
    • Clones the AllSpice repository
    • Uses git svn clone to pull the SVN repository into the Git repository
    • Synchronizes the repositories
  3. Branching logic Since SVN uses trunk as the active working directory:
    • The trunk branch from SVN is merged into the main branch of the Git repository
    • The main branch becomes the primary branch for design reviews (PRs)
  4. File management The script:
    • Modifies .gitignore to exclude batch files
    • Downloads additional helper scripts into the .allspice folder:
      • svn-to-allspice.sh Handles synchronization
      • fetch-svn.bat Pulls SVN changes via git svn rebase
      • Pre-push Git hook Ensures commits are pushed to both SVN and Git
  • 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

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

  1. Download the batch file from the repository.
  2. Run the batch file.
  3. Follow the prompts to set up repository synchronization.
  4. Use fetch-svn.bat to bring in SVN changes when needed.
  5. 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 and git 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.