aboutsummaryrefslogtreecommitdiff
path: root/t/t9200-git-cvsexportcommit.sh
Commit message (Collapse)AuthorAge
* tests: skip perl tests if NO_PERL is definedJeff King2009-04-08
| | | | | | | | | | These scripts all test git programs that are written in perl, and thus obviously won't work if NO_PERL is defined. We pass NO_PERL to the scripts from the building Makefile via the GIT-BUILD-OPTIONS file. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: remove exit after test_done callJeff King2009-04-05
| | | | | | | test_done always exits, so this line is never executed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Skip tests that fail if the executable bit is not handled by the filesystemJohannes Sixt2009-03-22
| | | | Signed-off-by: Johannes Sixt <j6t@kdbg.org>
* test suite: Use 'say' to say something instead of 'test_expect_success'Johannes Sixt2009-03-19
| | | | | | | | | | | Some tests report that some tests will be skipped. They used 'test_expect_success' with a trivially successful test. Nowadays we have the helper function 'say' for this purpose. In on case, 'say_color skip' is replaced by 'say' because the former is not intended as a public API. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
* t9200: use "git cvsexportcommit" without dashNanako Shiraishi2008-09-09
| | | | | Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: use $TEST_DIRECTORY to refer to the t/ directoryJunio C Hamano2008-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many test scripts assumed that they will start in a 'trash' subdirectory that is a single level down from the t/ directory, and referred to their test vector files by asking for files like "../t9999/expect". This will break if we move the 'trash' subdirectory elsewhere. To solve this, we earlier introduced "$TEST_DIRECTORY" so that they can refer to t/ directory reliably. This finally makes all the tests use it to refer to the outside environment. With this patch, and a one-liner not included here (because it would contradict with what Dscho really wants to do): | diff --git a/t/test-lib.sh b/t/test-lib.sh | index 70ea7e0..60e69e4 100644 | --- a/t/test-lib.sh | +++ b/t/test-lib.sh | @@ -485,7 +485,7 @@ fi | . ../GIT-BUILD-OPTIONS | | # Test repository | -test="trash directory" | +test="trash directory/another level/yet another" | rm -fr "$test" || { | trap - exit | echo >&5 "FATAL: Cannot prepare test area" all the tests still pass, but we would want extra sets of eyeballs on this type of change to really make sure. [jc: with help from Stephan Beyer on http-push tests I do not run myself; credits for locating silly quoting errors go to Olivier Marin.] Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/: Use "test_must_fail git" instead of "! git"Stephan Beyer2008-07-13
| | | | | | | | | | | | | | | This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* cvsexportcommit: introduce -W for shared working trees (between Git and CVS)Johannes Schindelin2008-05-15
| | | | | | | | | | | | | | | | | | | | | | | If you have a CVS checkout, it is easy to import the CVS history by calling "git cvsimport". However, interacting with the CVS repository using "git cvsexportcommit" was cumbersome, since that script assumes separate working directories for Git and CVS. Now, you can call cvsexportcommit with the -W option. This will automatically discover the GIT_DIR, and it will check out the parent commit before exporting the commit. The intended workflow is this: $ CVSROOT=$URL cvs co module $ cd module $ git cvsimport hack, hack, hack, making two commits, cleaning them up using rebase -i. $ git cvsexportcommit -W -c -p -u HEAD^ $ git cvsexportcommit -W -c -p -u HEAD Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* add test_cmp function for test scriptsJeff King2008-03-13
| | | | | | | | | | | | | | | | | | | Many scripts compare actual and expected output using "diff -u". This is nicer than "cmp" because the output shows how the two differ. However, not all versions of diff understand -u, leading to unnecessary test failure. This adds a test_cmp function to the test scripts and switches all "diff -u" invocations to use it. The function uses the contents of "$GIT_TEST_CMP" to compare its arguments; the default is "diff -u". On systems with a less-capable diff, you can do: GIT_TEST_CMP=cmp make test Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/maint-cvsexport'Junio C Hamano2008-02-20
|\ | | | | | | | | | | | | | | | | * js/maint-cvsexport: cvsexportcommit: be graceful when "cvs status" reorders the arguments Conflicts: t/t9200-git-cvsexportcommit.sh
| * cvsexportcommit: be graceful when "cvs status" reorders the argumentsJohannes Schindelin2008-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my use cases, "cvs status" sometimes reordered the passed filenames, which often led to a misdetection of a dirty state (when it was in reality a clean state). I finally tracked it down to two filenames having the same basename. So no longer trust the order of the results blindly, but actually check the file name. Since "cvs status" only returns the basename (and the complete path on the server which is useless for our purposes), run "cvs status" several times with lists consisting of files with unique (chomped) basenames. Be a bit clever about new files: these are reported as "no file <blabla>", so in order to discern it from existing files, prepend "no file " to the basename. In other words, one call to "cvs status" will not ask for two files "blabla" (which does not yet exist) and "no file blabla" (which exists). This patch makes cvsexportcommit slightly slower, when the list of changed files has non-unique basenames, but at least it is accurate now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIRJohan Herland2008-02-12
| | | | | | | | | | | | | | | | | | | | | | | | When using the '-w $cvsdir' option to cvsexportcommit, it will chdir into $cvsdir before executing several other git commands. If $GIT_DIR is set to a relative path (e.g. '.'), the git commands executed by cvsexportcommit will naturally fail. Therefore, ensure that $GIT_DIR is absolute before the chdir to $cvsdir. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIRJohan Herland2008-02-12
|/ | | | | | | | The testcase verifies that 'git cvsexportcommit' functions correctly when the '-w' option is used, and GIT_DIR is set to a relative path (e.g. '.'). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Officially deprecate repo-config.Junio C Hamano2008-01-17
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9200: Be careful when checking CVS/EntriesJunio C Hamano2007-07-25
| | | | | | | | CVS/Entries file can contain a line with single D to say "this directory does not have any subdirectories". Do not get confused with such an entry. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9200: Work around HFS+ issues.Junio C Hamano2007-02-05
| | | | | | | | | | | | We at least know that the test as written has a problem in an environment where "touch '$p'; ls | fgrep '$p'" fails, and have a clear understand why it fails. This tests if the filesystem has that particular issue we know "git add" has a problem with, and skips the test in such an environment. This way, we might catch issues "git add" might have in other environments. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t9200: do not test -x bit if the filesystem does not support it.Junio C Hamano2007-01-31
| | | | | | | | The last test in t9200 wants to see if executable bit is retained, which has no chance of succeeding on a filesystem that does not handle executable bit correctly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t9200: Re-code non-ascii path test in UTF-8Junio C Hamano2007-01-31
| | | | | | | | | | | | For the purpose of this test we do not really care if the paths are in latin-1, but people on Cygwin seem to be having problem on foreign-looking pathnames that do not play well with their locale. Let's try to re-code them in UTF-8 and see who screams, thanks, or reports no-improvements. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Start all test scripts with /bin/sh.Jason Riedy2007-01-15
| | | | | | | | My bash refused to run the two scripts missing a #!, and it's better to use the same line for all the scripts. Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* t9200-git-cvsexportcommit.sh: quiet down commitEric Wong2006-12-28
| | | | | | | Also, fixed an unportable use of 'export'. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make cvsexportcommit work with filenames with spaces and non-ascii characters.Robin Rosenberg2006-12-11
| | | | | | | | | | | | | | | This patch uses git-apply to do the patching which simplifies the code a lot and also uses one pass to git-diff. git-apply gives information on added, removed files as well as which files are binary. Removed the test for checking for matching binary files when deleting them since git-apply happily deletes the file. This is matter of taste since we allow some fuzz for text patches also. Error handling was cleaned up, but not much tested. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Set permissions of each new file before "cvs add"ing it.Jim Meyering2006-12-04
| | | | | | | | | | Otherwise, an executable script in git would end up being checked into the CVS repository without the execute bit. [jc: with an additional test script from Robin Rosenberg.] Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rework cvsexportcommit to handle binary files for all cases.Robin Rosenberg2006-11-13
Also adds test cases for adding removing and deleting binary and text files plus two tests for the checks on binary files. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>