info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to control the current version of CVSROOT/modules ?


From: Pierre Asselin
Subject: Re: How to control the current version of CVSROOT/modules ?
Date: Thu, 23 Jun 2005 00:31:08 +0000 (UTC)
User-agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (NetBSD/2.0 (i386))

address@hidden wrote:

> Is it possible to roll back the version of the currently used
> CVSROOT/modules file?
> [ correct description of amperstand modules conundrom ]

As Jim said, you're stuck.  You can always do this,

    cvs checkout CVSROOT && cd CVSROOT
    cvs update -j HEAD -j oldrev modules
    cvs commit modules

followed by a repair as soon as you have your old project checked
out, but it has bad drawbacks.  I wonder if there are hacks...

The Linux man page for mount(8) says:
       Since Linux 2.4.0 it is possible to remount part of the
       file  hierarchy somewhere else. The call is
              mount --bind olddir newdir
       After this call the same contents is accessible in two
       places.

So if you're on Linux, here's a hack:
    * cvs init a brand new directory, say ~/cvsrepair.
    * Bind-mount the real cvsroot under ~/cvsrepair.
      So your directory structure is

    ~/cvsrepair/
        CVSROOT/
            modules
            ...
        real_cvsroot_bound/
            CVSROOT/
                modules
                ...
            project_1/
                ...

Now check out CVSROOT from cvsrepair, copy the CVSROOT/modules from
the real cvsroot and change all the paths to prepend a
"real_cvsroot_bound/".  Commit that.  It seems to me you can now
check out projects from either cvsroot.  Even locking ought to
work, since the locks are going to be visible from both cvsroots !

To get the back-revision of your project, just put the *old* revision
of the real CVSROOT/modules in cvsrepair/CVSROOT/modules and edit
the paths in the same way.  If you check out from cvsrepair, you'll
get the old set of amperstand modules.  Meanwhile, your production
cvsroot is never defaced.

Devious enough ?  (Hem, I'd back up the repository before trying
that stunt.)

-- 
pa at panix dot com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]