tags:

views:

271

answers:

3

I have one repository with read-only access on remote server. On my computer I have just working copy of that repository which I'm working on and I need to commit whole working copy to my own Repository with full access. Simply it looks like: Update WC, add/edit some code, commit it on my own repository.

Is it possible because I can't figure out how to do this in Eclipse (with Subclipse plugin) or TortoiseSVN.

A: 

This should work:

  1. Update working copy from their repository
  2. Edit
  3. Use svn Export (tsvn context menu on the root of the working copy) to create a non-SVN copy of the source tree in a new local directory (e.g. "\exported").
  4. If you don't already have one, in your repository create a new directory. This directory is where you will host the source tree.
  5. Create a local working copy of this new svn path by using Checkout into a local directory (e.g. "\myRepo").
  6. Move the exported tree ("\exported") into this new working copy that mirrors your repository ("\myRepo")
  7. Add the files/directories in this tree to your working copy.
  8. Commit to your repository.

Remember, if the original codebase was made available under the GPL or something similar, you must make your modifications available as well if you distribute any compilations of the code.

gWiz
Repository UUID '4f3c91ae-2176-0410-8ca8-aded742c5bc1' doesn't match expectedUUID '080cfd25-d5d9-4c59-82ea-70d02a200d8b'I've got this after Switch attempt
RiZe
Sorry, I should have tested that first.
gWiz
OK, I have edited my answer with a new approach that I have tested.
gWiz
You think I have to export whole project for each commit to my own repository, am I right? It would be funny with thousands and thousands small files. Is there any way how to synchronize two working copies easily, something like patches, but more automatically
RiZe
My understanding of your original question was that you wanted to have your own branch of their code in your own repository, that you could make changes to separate of their repository. But now I see you want to synchronize two working copies, one mirroring their repository and one mirroring your own. Aside from using svn patches, you can try svk, which allows one svn repository to mirror/branch another repository. Tutorials: http://www.bieberlabs.com/svk-tutorials/ Book: http://www.elixus.org/nightly/en/svk-book.html
gWiz
+1  A: 

Since you only have read-only access to the remote server you might export rather than creating a working copy, and treat that as you might any third-party code. The SVN book contains advice on managing vendor branches, making changes in your repository and merging in changes from the remote repository.

stevemegson
This is definitely the way to go. Briefly: manage the remote repo's data as a branch in your own repository, use svn_load_dirs.pl to keep it in sync, and then merge those changes to your own work as desired.
Zac Thompson
A: 

Try this:

  1. Export your existing working copy to some new directory.
  2. Import this new directory to your own repositry.

Tortoise will help you with import and export.

Wolfgang
"The new directory will automatically be your new working copy." - I thought Import didn't make that folder a working copy? I did hear they were thinking of changing it a while back... did they get around to it, hey?
nickf
Hm, yes, now that you say it, I'm not sure about it. ;-)It's not important for this question, so I'll better edit my answer.
Wolfgang