[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem importing files using '-I !'
From: |
Eric Siegerman |
Subject: |
Re: Problem importing files using '-I !' |
Date: |
Tue, 6 Aug 2002 15:46:52 -0400 |
User-agent: |
Mutt/1.2.5i |
On Tue, Aug 06, 2002 at 03:19:15PM -0400, Harig, Mark A. wrote:
> The distribution contains some '.cvsignore' files
> in the directory tree.
> [...]
> During the 'import', cvs is ignoring these files
> (marked with 'I' in the first column) instead of checking
> them into the CVS repository. I was expecting to be
> able to circumvent these '.cvsignore' files using
> the '-I !' option of the 'cvs import' command:
It's debatable, I suppose, whether this is a bug or a misfeature;
either way, it's annoying.
There's no way that I know of to work around it in a single CVS
command. You have to do some cleanup after the fact. Two
approaches:
1. - Delete the .cvsignore files
- "cvs import"
- import the .cvsignore files manually (or don't bother)
2. - Do the (partial) "cvs import"
- import the omitted sources manually
By "import manually", I mean:
- create a tiny fixup tree with the appropriate directory
structure so that the files will show up in the right place
in the repo
- import that fixup tree with the SAME release tag as you used
for the main import. N.B. Reusing a release tag is ALMOST
NEVER the right thing to do; this is one of the rare
exceptions :-)
Example: suppose that <pkg-root>/src/stuff/generated.c is being
ignored. Option (2) would look something like:
#
# Do the main import
#
$ cd <pkg-root>
$ cvs import module-name vendor rel-1_3
...
N foo
N bar
I src/stuff/generated.c
N src/baz
I other/ignored/file
$
#
# Build the vestigial fixup directory
#
$ mkdir -p /tmp/fix/src/stuff
$ cp -p src/stuff/generated.c /tmp/fix/src/stuff
# Repeat the previous two steps for any other
# files/directories that need it, putting each such file into
# the same relative location within /tmp/fix as it was within
# <pkg-root>
#
# Import the fixup directory
#
$ cd /tmp/fix
$ cvs import module-name vendor rel-1_3
N src/stuff/generated.c
N other/ignored/file
$
#
# Check out a sandbox
#
$ cd $HOME
cvs co module-name
U foo
U bar
U src/stuff/generated.c
U src/baz
U other/ignored/file
#
# Sanity-check that you got everything right
#
$ diff -rq <pkg-root> module-name # Ignore the many complaints about CVS
subdirectories
$
> These '.cvsignore' files
> (strangely, erroneously?) list some of the source files
> (header files and directories) that are in the
> directory tree.
More likely, they're "source" files that are generated by the
build process (Yacc or Lex output or the like). Such files are
neither fish nor fowl; they behave like source files in some
respects (you feed them to a compiler), but like objects in other
respects (they're program-generated, not typed in by a human).
There's been mucho debate over the years as to how they *should*
be handled in an open-source context. There's no totally
satisfactory answer; CVS-tracking them, including them in the
source distribution, but mentioning them in .cvsignore is one of
the only-partially-satisfactory approaches.
--
| | /\
|-_|/ > Eric Siegerman, Toronto, Ont. address@hidden
| | /
Anyone who swims with the current will reach the big music steamship;
whoever swims against the current will perhaps reach the source.
- Paul Schneider-Esleben