[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Migration to SVN

From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: 2007-10-08 11:03:36 CEST

>
 
 
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
 
-----Original Message-----
 

> From: Ryan Schmidt [mailto:subversion-2007b@ryandesign.com]
> Sent: 06 October 2007 11:08
> To: Giulio Troccoli
> Cc: users@subversion.tigris.org
> Subject: Re: Migration to SVN
>
> On Oct 5, 2007, at 06:25, Giulio Troccoli wrote:
>
> > I am working on a big project to migrate our source code from an old
> > system (CMS running on VMS OS) to Subversion. As far as I know
> > there are
> > no tools on the like of cvs2svn that I can use (but if I'm wrong
> > let me
> > know please). So the migration has to be done manually.
> >
> > For legal reasons we support not only the latest version of our
> > product
> > but some older ones too, i.e. if a bug if found in, let's say,
> > version 2
> > then it will be fixed in version 2, 3 and 4 (given 4 is the latest).
> > Therefore we need to keep a source tree for each supported version.
> > What
> > did, in CMS, and will, in SVN, happen is that a change in a file in
> > version 2 is automatically merged into version 3 and 4. When version
5
> > is released, the source for version 4 is copied to version 5. I
don't
> > know whether it's a cheap copy or not in CMS but I don't care. All
> > this
> > to say that there is a link between each version as one is,
> > originally,
> > a copy of the previous.
> >
> > What I am planning to do is the following (supposing we support
> > version
> > 1, 2, 3 and 4):
> > - version 1 will be imported exactly as extracted from CMS
> > - version 2 will be committed as if it was a massive change fix. To
do
> > this I plan to make a cheap copy of version 2 and then replace
> > everything with what extracted from CMS. But, in version 2 I might
> > have
> > new files/directories been added as well as old files/directories
been
> > deleted. I'm planning to use svn add and svn delete to fix this
> > situation and then commit the changes.
> > - repeat the same steps for version 3 and 4
> >
> > Doing the migration this way I will save a lot of disk space and
will
> > retain the logical link between versions.
> >
> > Does anybody see any potential danger in this procedure? Has
> > anybody any
> > suggestions on how to improve the migration?
>
> Sounds like a good plan. You can use the svn_load_dirs.pl script to
> automate the process of importing versions 2, 3, and 4 while handling
> the adds and deletes. See the book for more information.
>
> http://svnbook.red-bean.com/en/1.4/
> svn.advanced.vendorbr.html#svn.advanced.vendorbr.svn_load_dirs
>
>
Ryan,

Thanks for the tip. I thought about using svn_load_dirs.pl but I wasn't
sure it was the right tool. I will do some testing though. Hopefully
everything will be fine and I will have a much better life :-)

However, I noticed that the parameters to be passed to the Perl script
cannot be a relative path, i.e. cannot contain the '..'.

Keeping the example of my original email, the structure of the
repository will be something like

repo
  |_1
  | |_test
  | |_src
  |_2
  | |_test
  | |_src
  |_3
  | |_test
  | |_src
  |_4
    |_test
      |_src

I don't know how to use the svn_load_dirs.pl then because I would do
something like

svn_load_dirs.pl \
http://localhost/repo/1/test/src \
../../2/test/src \
<local dir with version 2>

but I can't. Any suggestions on how I could use the script anyway?

Otherwise I will use svn add and svn delete manually. I know that there
are no modifications, so I don't have to worry about files be moved
around. The following should work

svn st | grep '^?' | xargs svn add
svn st | grep '^!' | awk 'BEGIN{FS=" "} {print $2}'| xargs svn delete

It's interesting I have to use awk to filter out the ! or svn delete
will fail and stop (svn add fails too with ? but keeps going).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Oct 8 11:04:07 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.