Branching off past date (was: Lfs-dev Digest, Vol 180, Issue 1)

Richard Rogers rprogers at
Wed Jan 28 14:31:11 PST 2004

Gerard wrote:

> Are you following lfs-book? 

I just subscribed...

> Some changes were made that should not be part of the LFS-5.x cycle
> so I think we may have to create a branch based on work done before 
> last night so these last changes aren't part of LFS-5.1. LFS-5.1 is 
> pretty near ready for release anyways, so branching now will work. 
> Somebody please explain how to branch based on a past date.

Create a new working directory and checkout the sources for the 
desired date:

% cd work
% mkdir foo
% cd foo
% cvs checkout -D 2003-12-31 lfs  # lfs as of New Year's Eve

Tag the checked out revisions with the -b option to create the

% cd lfs
% cvs tag -b happy_new_year       # create happy_new_year_branch

Note that your working directory is NOT switched over to the
branch. If you edit the files now and check them in, the changes
will go on the trunk. To switch the directory to the branch, 
update with the -r option:

% cvs update -r happy_new_year

If you do a status command, you should see that the files
are now switched to the branch:

% cvs status

Now if you check in changes, they will go on the branch
indicated by the "sticky tag."

If the branch already exists, you can check it out directly
with the -r option:

% cd work
% mkdir bar
% cd bar
% cvs checkout -r happy_new_year lfs
% cd lfs
% cvs status

Once the branch has been created, be sure you're working in
the correct place (trunk vs. branch) to avoid fouling things
up :)

I'll cover merging later.

 - Richard

More information about the lfs-dev mailing list