[Top][All Lists]

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

Re: creating a branch for only some files of a module

From: Jim Hyslop
Subject: Re: creating a branch for only some files of a module
Date: Mon, 10 Apr 2006 08:12:44 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Hash: SHA1

Urs Thuermann wrote:
> Is it possible to create a branch for only some files of a module (all
> in one subdirectory) and still have the rest of the files in both
> branches?
> Say, I have two subdirectories of a module, kernel and user-space,
> where kernel contains linux kernel modules and user-space contains
> user-space tools using these modules.
> Now I need a branch in the kernel subdirectory for porting from
> linux-2.4 to linux-2.6, where we will have lots of changes but the API
> to user space doesn't change.  When I checkout the whole module I want
> the user space tools included in both branches (i.e. the trunk and the
> newly created branch) and I don't want to have to checkin all changes
> to user space into both branches.  The same revisions of all files in
> user-space should be on both branches.
> When I create the new branch only for the files in the kernel
> subdirectory, the user space tools will be missing in the new branch.
> If I create the new branch also on all files in the user-space
> subdirectory I will have to checkin all changes to these files
> identically to both, the trunk and the new branch.  Is there a way to
> avoid this?

The easiest way I can see to do this is to effectively treat the user
space code as third-party code. Set up your repository structure such
that the kernel source and the user space source are physically
separated, then create a makefile or shell script that will check out
the user space source independently. It makes initial checkout a
two-step operation:

cvs co your-module
cd your-module

Directory structure would be something like:

  +--- kernel
  +--- user_space
  +--- your-module

your-module/checkout_code would look something like this:
# TODO: put in command-line arg processing to pass on '-r' options
cvs co kernel
cvs co user_space

I know I haven't provided a lot of details, it's intended as a brief
sketch to give you the basic idea.

- --
Jim Hyslop
Dreampossible: Better software. Simply.
                 Consulting * Mentoring * Training in
    C/C++ * OOD * SW Development & Practices * Version Management
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird -


reply via email to

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