简体   繁体   中英

Syncing remote and local svn repository back and forth

I have the local SVN repository which I synced into empty Unfuddle repo using the instruction from their webpage

  1. Create the repository in your Unfuddle account. This will ensure that you have an empty repository in which to load your dump file. Then make note of the repository's URL as you will need this in the steps below.

  2. Create a Subversion repository locally using "svnadmin create localrepo"

  3. Load your modified dump file into this repository using "svnadmin load /path/to/localrepo < /path/to/dump"

  4. Sync your local repository to your Unfuddle repository. To do this run the following two commands :

    $ svnsync init --username YOURUSERNAME http://SUBDOMAIN.unfuddle.com/svn/SUBDOMAIN_REPOABBREVIATION file:///$PWD/localreponame

    $ svnsync sync --username YOURUSERNAME http://SUBDOMAIN.unfuddle.com/svn/SUBDOMAIN_REPOABBREVIATION

Now, since my colleagues will be making changes to the Unfuddle repo, how can I sync Unfuddle repo back to my local repo ?

Since I don't want to mess my local repo, would these commands suffice:

$ svnsync init file:///$PWD/localreponame --username YOURUSERNAME http://SUBDOMAIN.unfuddle.com/svn/SUBDOMAIN_REPOABBREVIATION 
$ svnsync sync file:///$PWD/localreponame

Did anyone try such back and forth syncing?

PS. I am aware that I may mess revisions if I do not sync local and remote repo before I make changes to the local repo ;)

I think that you are possibly not using Subversion correctly.

Subversion works with a centralised repository model, unlike Git.

Once you have moved your repository to Unfuddle you should recreate your local working copy from the Unfuddle remote repository.

If you keep a local version of the repository this should only be used as a "mirror" for backup purposes and NOT used on a day to day basis.

All of your daily commit and update operations should be between the remote repository at Unfuddle and your working copy. In this way you will receive your colleagues changes in your working copy when you perform an SVN Update.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM