Here's a sequence of commands that should do what you want. They are written
for Unix but should be easily adapted to the command-line in Windows for
example.
As Ryan points out, you'll have to svnsync from projectA to a local repo
that you have access to. Then do svndumpfilter to extract the parts you want
to a new repo and then do another svnsync to sync your local repo with
projectB.

Full details:

   1. Change to where you want to create your local repositories. I've
   called this /path/to/local in the commands below:

   cd /path/to/local

   2. Create a local repo for projectA

   svnadmin create projectA

   3. Initialise local repo ready for svnsync'ing with projectA.

   svnsync init file:///path/to/local/projectA
   http://projectA.googlecode.com/svn

   ('http' should work here since the svnsync command only needs read access
   to the source repo)

   4. Do the sync (this will take some time depending on how many revisions
   you have in your repo and your network speed, etc)

   svnsync sync file:///path/to/local/projectA

   5. Create a dump of your local repo. (Make sure you're in directory
   /path/to/local/ for this).

   svnadmin dump projectA > projectA.dump

   6. Use svndumpfilter to filter out the path you want.

   cat projectA.dump | svndumpfilter --drop-empty-revs include
   /trunk/my/subdir_for/projectB > projectA-filtered.dump

   The 'drop-empty-revs' flags means that where a commit didn't affect your
   selected path, the revision will be ignored. If you want to keep all
   revisions in tact (they'll be empty after filtering), omit this flag.

   7. You now have a dumpfile that only contains the changes for
   /trunk/my/subdir_for/projectB. You may get errors if you have copied files
   to this directory from other parts of your projectA repository since by
   filtering out those parts of the repository, the history of your files
   cannot be maintained in full. Assuming you don't have a problem with this,
   create the projectB repo:

   svnadmin create projectB

   8. Create top-level 'tags' and 'branches' dirs:

   svn mkdir file:///path/to/local/projectB/{tags,branches}

   We won't create the 'trunk' dir at the point since this will be created
   by the 'load' command in the next step.

   9. Now load the filtered dump file into this new local repository:

   cat projectA-filtered.dump | svnadmin load projectB

   10. Now svnsync this local projectB repo with your Google Code projectB
   repository. Assuming projectB's repo is at r0, do the following:

   svnsync init --username your.username
https://projectB.googlecode.comfile:///path/to/local/projectB

   You'll need to enter your Google Code password. Note that you must use
   the 'https' URL here since svnsync needs write access to Google Code's
   projectB repo.

   11. Do the sync.

   svnsync sync --username your.username https://projectB.googlecode.com

   Password shouldn't be necessary again since it should've been remembered
   from the first time.

   12. Once the sync is done, you now have projectB at Google with
   /trunk/my/subdir_for/projectB. If you want all the contents of projectB to
   be under /trunk then I advise you move them there with Eclipse or some other
   IDE so that code is refactored (if necessary). Alternatively, you can do
   this on the command-line if you really want once you have checked out your
   Google Code projectB.

This should get you pretty much all of the way there. Let me know how you go
(if you want). :-)

:Darren.

-- 
----------------------------------------------------------------------
 :Darren :Pearce
----------------------------------------------------------------------
 *** Shop & Donate: http://buy.at/campuskids ***
----------------------------------------------------------------------
 [EMAIL PROTECTED]
 Postdoctoral Researcher
 London Knowledge Lab, University of London
----------------------------------------------------------------------
 [EMAIL PROTECTED]
 Visiting Research Fellow
 Informatics, University of Sussex
 http://www.informatics.sussex.ac.uk/users/darrenp/
----------------------------------------------------------------------
 [EMAIL PROTECTED]
 http://www.linkedin.com/in/darrenpearce
----------------------------------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Hosting at Google Code" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-code-hosting?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to