You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ray Johnson <Ra...@ingenio.com> on 2004/04/16 02:36:44 UTC

Importing multiple revisions

 
I'm currently working on how we can import our large VSS repository into
Subversion.  We do not want to do a full migration as we really do not
need all the old history added (and it has proven to be extremely
difficult to do).  So instead we would like to import the last few
"releases" of our code into Subversion.
 
Importing the oldest release is very easy.  It will simply become my
"trunk" and I'll also make a copy that will basically be the tag for
that release.
 
I now want to "import" the next release.  When finished the second
release should be what is in my "trunk".  I realize this doesn't provide
a "true" history.  In in VSS we renamed a file it would show up in SVN
as a completely new file and the old file being deleted.  That is fine
with us as people can always go back to VSS to find out what really
happened (which will only happen rarely and only for a few months).
 
So in the end we would have history through the past couple of release -
but only the final files in each release.  But moving forward we would
have a normal SVN repository.
 
However, I'm not sure of the best way to do second (and subsequent)
"imports".  Does anyone have any ideas how this can be done?
 
The obvious solution is to get a working directory of my trunk, make the
working copy look like the second release and do a commit.
Unfortunately, this is a bit more complicated then I first envisioned.
I can't just do a file sync - because for added/deleted files I actually
need to do svn commands.  We are talking thousands of files here.  (Over
1700 directories.)  So I'm really hoping I can find a better solution.
 
Maybe I can import the second release into a separate space and merge it
into the trunk?  This sounds like the right way to go but I haven't
thought it through...  Any way, has anyone else done this?  Any
recommendations?
 
Ray
 
 

Re: Importing multiple revisions

Posted by M <ma...@gmx.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Why not just create an empty wc folder, copy all files & folders from
the first revision to import there, svn add all them, commit, svn rm
all, commit again and start over with the second revision?

It's brute force, but keeps the history, right?

I'd do this in a separate svn repository, just to have the "ancient"
history available with svn and not to clutter up the "new" svn
repository with old, undiffed versions.
The new svn repo I'd start with the most current VSS files & folders only.

Grettings,
	M

Martin Tomes schrieb:

| Ray Johnson wrote:
|
|> I'm currently working on how we can import our large VSS repository into
|> Subversion.
|>
|> I now want to "import" the next release.  When finished the second
|> release should be what is in my "trunk".  I realize this doesn't provide
|> a "true" history.  In in VSS we renamed a file it would show up in SVN
|> as a completely new file and the old file being deleted.  That is fine
|> with us as people can always go back to VSS to find out what really
|> happened (which will only happen rarely and only for a few months).
|
|
| I have just done exactly what you wish to do only starting from CVS.  I
| did a cvs export of the first version and imported that.  I then did a
| cvs export of the next version I wanted and overlaid those files onto
| the subversion working copy.  I was doing this on Windows and I actually
| did a cvs export into a new directory and then used two piped Cygwin tar
| commands to copy those files over the svn working copy.  You can then to
| an svn status to find new files and add them.  Working out deleted files
| is a little harder but you need to do that and remove those and then to
| another commit.  Repeat until done.
|

- --
/**********************************************************

~ Thanx, the "GR_FRameRAM8" is much more elegant than a
~ mere "19", naturally.

~ mailto:marcus.rohrmoser@gmx.de
~ http://marcusr.gmxhome.de/

Infos über email Verschlüsselung mit GnuPG/PGP bei
http://www.gnupp.de
**********************************************************/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAf8453wDNYFytWz8RAoI/AJ9Zz7AO12HNEkpiOoQ9bmrX9yW64wCfW8Vb
j6LFuQNWR1gVysVd8l+yyPc=
=7qRu
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Importing multiple revisions

Posted by Martin Tomes <li...@tomes.org>.
Ray Johnson wrote:
> I'm currently working on how we can import our large VSS repository into
> Subversion.
>  
> I now want to "import" the next release.  When finished the second
> release should be what is in my "trunk".  I realize this doesn't provide
> a "true" history.  In in VSS we renamed a file it would show up in SVN
> as a completely new file and the old file being deleted.  That is fine
> with us as people can always go back to VSS to find out what really
> happened (which will only happen rarely and only for a few months).

I have just done exactly what you wish to do only starting from CVS.  I did a cvs export of the 
first version and imported that.  I then did a cvs export of the next version I wanted and overlaid 
those files onto the subversion working copy.  I was doing this on Windows and I actually did a cvs 
export into a new directory and then used two piped Cygwin tar commands to copy those files over the 
svn working copy.  You can then to an svn status to find new files and add them.  Working out 
deleted files is a little harder but you need to do that and remove those and then to another 
commit.  Repeat until done.

-- 
Martin Tomes
echo 'Martin x Tomes at controls x eurotherm x co x uk'\
  | sed -e 's/ x /\./g' -e 's/ at /@/'

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Importing multiple revisions

Posted by Ben Collins-Sussman <su...@collab.net>.
Ray Johnson wrote:

> The obvious solution is to get a working directory of my trunk, make the 
> working copy look like the second release and do a commit.  

Yes, this is the way to do it.

> Maybe I can import the second release into a separate space and merge it 
> into the trunk? 

Merging happens in your working copy, not in the server.  So this isn't 
going to make life any easier.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Importing multiple revisions

Posted by John Peacock <jp...@rowman.com>.
Ray Johnson wrote:
> However, I'm not sure of the best way to do second (and subsequent) 
> "imports".  Does anyone have any ideas how this can be done?
>  
> The obvious solution is to get a working directory of my trunk, make the 
> working copy look like the second release and do a commit.  
> Unfortunately, this is a bit more complicated then I first envisioned.  
> I can't just do a file sync - because for added/deleted files I actually 
> need to do svn commands.  We are talking thousands of files here.  (Over 
> 1700 directories.)  So I'm really hoping I can find a better solution.

You could try this svn_load_dirs.pl:

	http://svnbook.red-bean.com/svnbook/ch07s04.html#svn-ch-7-sect-4.2

which will make it much easier to do the second and subsequent imports.  This 
script will present a list of files that have been added and deleted and allow 
you to connect the dots (manage the renames).

Even if you have thousands of files, it's something you only have to do once, 
and then you'll have your history.

HTH

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org