info-cvs
[Top][All Lists]
Advanced

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

Aliasing the trunk with a branch tag


From: Keith Refson
Subject: Aliasing the trunk with a branch tag
Date: Thu, 26 Aug 2004 16:36:34 +0100
User-agent: Mozilla Thunderbird 0.7.3 (X11/20040806)

One problem I regularly face is: how to build two different versions of
a project which differ in only a very small subset of files.  One of
these versions is obviously the trunk version.  It would be extremely
convenient if this could be achieved by simply

  cvs co (or update) -A myproject
  cvs co (or update) -r Version_B myproject

to switch between them.  The main (trunk) version is under continual
development and "Version_B" should mean "the head of the branch Version_B
for the few files which differ and the head of the trunk otherwise".

Obviously only branch tags will do.  But attaching a branch tag to the
files which differ will fix the version beloning to "Version_B" for all
time (or until I move the unused branch tag by hand).

I recenty came across a suggestion of how to do this, and it does work
when I tried it out.  The idea is simple - just add the branch  at the
numeric version "1":

   cvs admin -nVersion_B:1

for the files common to both versions of the project.  This makes
branch Version_B an alias for the trunk.  Then make a regular
branch for the files which differ. (This assumes the RCS revisions on the
trunk are all 1.nnn ..., but the extension to other cases is obvious).

   Now cvs co -r Version_B myproject does indeed fetch all of the files

needed to build or develop Version_B of the project, which benefits from
any changes to the trunk version.

I'm asking for any opinions on whether this is a safe thing to do, and any
potential difficulties, mild or severe, which might arise.

Keith Refson




reply via email to

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