[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) |
-----BEGIN PGP SIGNED MESSAGE-----
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
./checkout_code
Directory structure would be something like:
$CVSROOT
|
+--- kernel
|
+--- user_space
|
+--- your-module
your-module/checkout_code would look something like this:
#!/usr/bin/sh
# 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. http://www.dreampossible.ca
Consulting * Mentoring * Training in
C/C++ * OOD * SW Development & Practices * Version Management
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEOku8LdDyDwyJw+MRAo+HAJwJS47JRWb/JHIASqylCVuwsladrQCg3nAX
HH8vVSqo+JKo383+kHTPXtQ=
=Xzfr
-----END PGP SIGNATURE-----