Commit graph

6 commits

Author SHA1 Message Date
Frank Lichtenheld 40ae8872a1 t9600-cvsimport.sh: set HOME before checking for cvsps availability
This actually sounds like a bug in cvsps, which requires an existing
home directory when asked for the usage through -h

 $ HOME=/nonexistent cvsps -h
 Cannot create the cvsps directory '.cvsps': No such file or directory

This made t9600 think that cvsps is not available if HOME did not exist,
causing the tests to be skipped

 $ HOME=/nonexistent sh t9600-cvsimport.sh
 * skipping cvsimport tests, cvsps not found
 * passed all 0 test(s)

Now t9600 sets HOME to the current working directory before checking for
the availability of the cvsps program.

This issue has been discovered by Marco Rodrigues, and fixed by Frank
Lichtenheld through
 http://bugs.debian.org/471969

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-26 16:14:52 -07:00
Jeff King dcbcb707c3 t9600: require cvsps 2.1 to perform tests
git-cvsimport won't run at all with less than cvsps 2.1, because it
lacks the -A flag. But there's no point in preventing people who have an
old cvsps from running the full testsuite.

Tested-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04 14:43:05 -08:00
Jeff King 4e596e988a t9600: test cvsimport from CVS working tree
This test passes with v1.5.3.7, but not with v1.5.3.6.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-02 10:59:59 -08:00
Jeff King 67d232426b cvsimport: fix usage of cvsimport.module
There were two problems:

  1. We only look at the config variable if there is no module
     given on the command line. We checked this by comparing
     @ARGV == 0. However, at the time of the comparison, we
     have not yet parsed the dashed options, meaning that
     "git cvsimport" would read the variable but "git
     cvsimport -a" would not. This is fixed by simply moving
     the check after the call to getopt.

  2. If the config variable did not exist, we were adding an
     empty string to @ARGV. The rest of the script, rather
     than barfing for insufficient input, would then try to
     import the module '', leading to rather confusing error
     messages. Based on patch from Emanuele Giaquinta.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-30 15:00:31 -08:00
Jeff King 9da0dabcd9 cvsimport: use rev-parse to support packed refs
Previously, if refs were packed, git-cvsimport would assume
that particular refs did not exist. This could lead to, for
example, overwriting previous 'origin' commits that were
packed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-28 14:38:06 -08:00
Jeff King 795c7c0b08 Add basic cvsimport tests
We weren't even testing basic things before, so let's at
least try importing and updating a trivial repository, which
will catch total breakage.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-28 14:14:21 -08:00