Results 1 to 4 of 4

Thread: How to commit to multiple SVN repositories?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Australia
    Posts
    252

    How to commit to multiple SVN repositories?

    Hi,

    I have a SVN setup in SourceForge for this C# project we have been working on.

    http://zscreen.svn.sourceforge.net/v...zscreen/trunk/

    Recently we started migrating to Google Code slowly.

    http://code.google.com/p/zscreen/sou...se/#svn/trunk/

    Have no intention to close down SF yet and want to commit to both SVN Repos for the time being. Is this possible?

    Thanks in advance,
    McoreD

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: How to commit to multiple SVN repositories?

    Hey,

    You can combine multiple projects in different repos using svn:externals, but I don't think that that is what you are after.

    What you want to do is maintain the same code in two separate repos, so that they each have the same revisions, correct?

    I haven't heard of that being done.

    You can sync the two repos, would that help?

    http://www.thoughtspark.org/node/10

    Gary

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Australia
    Posts
    252

    Re: How to commit to multiple SVN repositories?

    Hi Gary,

    YES! That's exactly what I need. I have two visual studio projects: One uses ImageUploader project in SourceForge, other uses ImageShack uploader in Google Code. I should be able to Update/Commit from both projects and both Google Code and SourceForge SVN Repos should be updated when I commit.

    This looks too hardcore:
    Code:
    * Create your local repository: svnadmin create PATH
    * Create an empty pre-revprop-change hook script: echo "#!/bin/bash" > PATH/hooks/pre-revprop-change
    * Make the pre-commit-hook script executable: chmod +x PATH/hooks/pre-revprop-change
    * Initialize svnsync: svnsync init file:⁄⁄⁄PATH URL_TO_REPO_ROOT_TO_CLONE
    * Synchronize: svnsync sync PATH
    Does this mean I need FTP access to do chmod operations etc? If so, I don't think I do have access like that to either Google Code or SourceForge.

    Thanks.

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: How to commit to multiple SVN repositories?

    Hey,

    I have never used a remote Subversion repo, I use one locally on my own machine, so I have never had to do what you are suggesting. However, the concept behind Subversion, would suggest that what you are wanting to do is not possible. When you check out items, they are checked out from one place, and the changes that are made are compared against what is in that repo, and when you commit, you commit only to there.

    I could be wrong about this, and maybe some reading of the SVN Red Book might reveal something.

    I only other thing that I can think would be to always commit to one repo, then do a backup from there, and restore to your other repo.

    This doesn't really get you what you are after though.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width