Re: Migrating cvs repositories from Linux to FreeBSD

From: Giorgos Keramidas (keramida_at_ceid.upatras.gr)
Date: 06/23/04

  • Next message: Skylar Thompson: "Re: Audio?"
    Date: Wed, 23 Jun 2004 19:44:55 +0300
    To: Dan Nelson <dnelson@allantgroup.com>
    
    

    On 2004-06-23 10:03, Dan Nelson <dnelson@allantgroup.com> wrote:
    > In the last episode (Jun 22), login@istop.com said:
    > > I got two hosts with the following specs:
    > >
    > > The oldhost is running Mandrake Linux 8.2 version 2.4.18-6mdk
    > > and newhost is running FreeBSD 5.2.1-RELEASE.
    > > [...]
    > > Now only concern is how to migrate or move the cvs repositories from
    > > the oldhost [Linux] to newhost [FreeBSD].
    > >
    > > Is this a valid sequence? Am I missing any point? Would there be
    > > inconsitency as the cvs version are not same on these hosts?
    >
    > That should work fine. CVS has always used the same repository format
    > so version differences shouldn't matter.

    As a real world example of what can be done with CVS repository files,
    here's a story of mine from a few days ago.

    While at work, I started working on a local version of a program, say
    `foobar', whose version control files were stored in `$CVSROOT/foobar'.

    Locally, at the machine where the CVSROOT lived, I made a lot of changes
    to the files. The workstation I used runs Fedora Core/2. I saved a
    tarball of all the files in `$CVSROOT/foobar' and copied it to a remote
    machine that runs FreeBSD. Untarred the `foobar.tgz' tarball straight
    into my new CVSROOT and checked it out like a charm :)

    I know that this is not the right method of mirroring CVS repositories.
    I'm the only person working on those files though and I only make
    changes in one of the two CVS trees. The other one is used as an
    anoncvs access server.

    So, what you're describing *does* work.

    > > The steps, I think, may be involve to accomplish this task are:
    > >
    > > 1. make identical user accounts on newhost as oldhost ones
    > > 2. announce to users and stop the cvs server on oldhost
    > > 3. on oldhost, backup the CVSROOT
    > > 4. on newhost, restore the CVSROOT
    > > 5. start the cvs server on newhost
    > > 6. point the users to start using newhost for checkin/checkout stuff

    That seems fine. You can even insert a couple of rsync's among the
    steps and let your users work uninterrupted while you're copying the
    CVS tree. Then announce that they have to switch their CVSROOT.

    If anyone has checked out files that he hasn't committed, they can use
    this small script on any checked out tree to change it's CVS/Root files
    to point to the new CVSROOT:

        #!/bin/sh

        newroot="$1"
        if [ X"${newroot}" = X"" ]; then
            echo "usage: cvsroot <newroot>" 1>&2
            exit 1
        fi

        find . -type d -name CVS -print0 | \
        xargs -0 -n 1 -I % echo '"%"' | \
        sed -e 's:"$:/Root":' |\
        xargs sed -i '' -e 's!^.*$!'"${newroot}"'!'

    The last command, which uses the -i option of sed(1) works on FreeBSD
    but needs a bit of tinkering if you plan to use it with GNU sed(1) on
    Linux.

    HTH,

    - Giorgos

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Skylar Thompson: "Re: Audio?"

    Relevant Pages

    • Re: Python bindings for RCS apps
      ... systems have some good python bindings/apis? ... Writing plugins: ... The ViewVC project deals with CVS repositories and RCS files: ...
      (comp.lang.python)
    • Re: FileSystem Question
      ... I don't know nothing about CVS repositories. ... See the apt descriptions for subversion and cvs. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • Re: sbliveos2 & > 2gb RAM?
      ... hold any CVS repositories as far as I know, and the DNS just points to ... the Mensys CVS server. ...
      (comp.os.os2.multimedia)
    • Re: Pyserial access probs
      ... examples ('cos I'm not very good) ... I keep getting timeouts at this link ... I think SF rearranged their CVS stuff a while back. ... noticed there area lot of broken links to SF cvs repositories ...
      (comp.arch.embedded)
    • CVS on fedora core 2: permission denied on cvs import
      ... I am trying to use cvs and encountered the following ... I have added the following file under CVSROOT: ... user ht has the following entry in .bashrc ... user cvsowner has the following entry in .bashrc ...
      (Fedora)