rcs, check in new version as a branch 

Newsgroups: comp.os.linux.misc
Date: 6 Dec 2002 20:54:32 GMT
>When using rcs to do the version control, sometimes I know the new
>changes would not work, but I still like to keep it as a historical
>reference. So I'd like to make it a branch version of the previous
>one instead of a new version, so that I don't need to check in this
>bad one and revoke the last good one as the newiest version.

If the current version is, say, 2.25, then use

ci -r2.25.1 filename

Neil W Rickert @niu.edu

:rcs changes the latest wrong-do version as a previous branch 

Summary 

First of all, ask yourself "is the version really necessary to keep?" If not, take a note of the wrong changes or keep a record of wrong-doing somewhere else and delete the version.

No magic here — we have to check out and back up the latest wrong-do version, remove this version from rcs and check in the back up as a branch.

:rcs branching 

Check out & lock 
$ co -r1.2 -l Makefile
RCS/Makefile,v  -->  Makefile
revision 1.2 (locked)
done
Tip !!
$ rlog Makefile
====
RCS file: RCS/Makefile,v
Working file: Makefile
head: 1.4
branch:
locks: strict
        tong: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;     selected revisions: 4
description:
Makefile for latex
----------------------------
revision 1.4
date: 2001/03/15 03:18:34;  author: tong;  state: Exp;  lines: +20 -4
slightly enhancement
Check in 
$ rlog Makefile
====
RCS file: RCS/Makefile,v
Working file: Makefile
head: 1.4
branch: 1.2.1
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;     selected revisions: 5
description:
Makefile for latex
----------------------------
revision 1.4
date: 2001/03/15 03:18:34;  author: tong;  state: Exp;  lines: +20 -4
slightly enhancement
----------------------------
revision 1.3
[...]
----------------------------
revision 1.1
date: 2001/02/24 03:41:47;  author: tong;  state: Exp;
Initial revision
----------------------------
revision 1.2.1.1
date: 2001/03/20 17:47:36;  author: tong;  state: Exp;  lines: +183 -41
1st public release.

Trying History 

Check out but not lock 
$ co -r1.2 Makefile
RCS/Makefile,v  -->  Makefile
revision 1.2
done
$ rcsdiff -r1.2 Makefile
===================================================================
RCS file: RCS/Makefile,v
retrieving revision 1.2
diff -r1.2 Makefile
  -- same as the version checked out
rlog Makefile
====
RCS file: RCS/Makefile,v
Working file: Makefile
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;     selected revisions: 4
description:
Makefile for latex

documented on: 2001.03.14