You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Josh Blair <jo...@gmail.com> on 2007/06/21 21:33:10 UTC

User Error: Imported into the wrong repository

Hello,

I screwed up by importing a project structure into the wrong repository.
This happened because (I'm a newbie) and I configured svnserve to run as a
service and pointed the --root argument to the wrong folder.

My repositories are located in a folder named c:\svn
I have 2 repositories: repos and repos-josh in the following paths
(respectively):

c:\svn\repos
c:\svn\repos-josh

System Specs:
===========
Windows XP SP2

C:\work\project123>svn --version
svn, version 1.4.4 (r25188)
   compiled Jun  8 2007, 18:49:42

. . .

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

When I configured the svnserve.exe to run as a service, I used the following
command-line syntax:

sc create svn.local binpath= "\"C:\program
files\subversion\bin\svnserve.exe\" --service -r C:\svn"
displayname="Subversion Server" depend= Tcpip start= auto

I didn't realize that I was configuring svnserve to only point to the
c:\svn\repos repository.

I ran the following 'svn import' command and it imported the project
structure into the wrong repository (just like I told it too):

C:\work\project123>svn import svn://svn/repos-josh/project123
Adding         trunk
Adding         trunk\GLOSSARY.txt
Adding         trunk\db
Adding         trunk\doc
Adding         trunk\src
. . .
Adding         trunk\src\Web.Config
Adding         tags

Committed revision 64.

What is the best way to back out this import (rev 64)?  Should I do a
'svnadmin dump' for rev 0 to 63 and then load into a clear repository?

I tried to merge from -r64:63 (backwards one rev) but I kept making it worse
by merging a ton of stuff into the wrong places (I'm a newbie).

So to correct the svnserve configuration, I removed the service definition
and recreated the svnservice definition like this:

net stop svn.local
sc delete svn.local
sc create svn.local binpath= "\"C:\program
files\subversion\bin\svnserve.exe\" --service -r C:\svn" displayname=
"Subversion Server" depend= Tcpip start= auto

Here is some diagnostic info for reference:

Re: User Error: Imported into the wrong repository

Posted by Josh Blair <jo...@gmail.com>.
Nathan,

Thanks for the tip, that all worked.

I have a related question:

What if this happened and others committed after my erroneous import?  Could
you dump -r1:63, load it into a new repos, dump -r70-100, and then load that
into the new repos?  Essentially loading 2 dump files with revision gaps...
This kind of sounds like that svndumpfilter does.

Thanks,

-- 
Josh Blair
Golden, CO


On 6/21/07, Nathan Fiedler <na...@gmail.com> wrote:
>
> I'm no Subversion expert, but one possible solution would be to dump and
> load the repository. At least that's what the FAQ says:
>
> http://subversion.tigris.org/faq.html#removal
>
> 1. Backup everything.
> 2. svnadmin dump path/to/repos -r 1:63 > dump.out
> 3. svnadmin create newrepos
> 4. svnadmin load newrepos < dump.out
>
> That syntax may not be quite right for Windows, but I don't have a Windows
> machine on which to try this. Ultimately, you can rename newrepos to the
> desired name and remove the old one.
>
> Good luck.
>
> n
>
>