git p4 test: wait longer for p4d to start

Running tests at high parallelism on a slow machine, 5 sec is
not enough to wait for p4d to start.  Change it to 10 sec.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: use real_path to resolve p4 client symlinks

The p4 program is finicky about making sure the recorded client Root
matches the current working directory.  The way it discovers the latter
seems to be to inspect shell variable $PWD.  This could involve symlinks,
that while leading to the same place as the client Root, look different,
and cause p4 to fail.

Resolve all client paths using "test-path-utils real_path $path".  This
removes ".." and resolves all symlinks.

Discovered while running with --root=/dev/shm, which is a link to
/run/shm.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: simplify quoting involving TRASH_DIRECTORY

For temporary files that are created in the top-level TRASH_DIRECTORY,
trust that the tests do not chdir except in subshells, and avoid some
quoting.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: never create default test repo

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: rename some "git-p4 command" strings

Use the actual command name; git-p4 is gone.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: check for error message in failed test

Make sure the test fails for the expected reason.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: copy source indeterminate

Msysgit testing showed that the source file found by copy
detection is indeterminate when there are multiple sources
to choose from.  This appears to be valid.  Adjust the test
so that it passes if it finds any of the potential copy sources.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: cleanup_git should make a new $git

For convenience, leave one in place at the end of each
test so that it is not necessary to build a new one.  This
makes it consistent with $cli.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: split up big t9800 test

The original t9800 test code has a mix of assorted topics, some
of which are big enough to deserve their own homes.
Interdependencies between the topics make it confusing when
trying to study one in isolation.  And it takes so long to run
that debugging an individual test is difficult.

Split out three big chunks of tests into their own files:

    t9812-git-p4-wildcards.sh gets the 8 p4 wildcard tests

    t9813-git-p4-preserve-users.sh gets the 4 --preserve-user tests

    t9814-git-p4-rename.sh gets the 2 copy and rename tests

Test 9800 execution time drops from 29 sec to 9 sec.  The
sequential time to run all tests is a slower due to the three
extra p4d startup/shutdown sequences, but the overall parallel
execution time is about the same, at 52 sec.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-export: quote paths with spaces

A path containing a space must be quoted when used as an argument to
either the copy or rename commands. 6280dfdc3b (fast-export: quote paths
in output, 2011-08-05) previously attempted to fix fast-export's quoting
by passing all paths through quote_c_style(). However, that function does
not consider the space to be a character which requires quoting, so let's
special-case the space inside print_path(). This will cause
space-containing paths to also be quoted in other commands where such
quoting is not strictly necessary, but it does not hurt to do so.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'js/fast-export-paths-with-spaces' into pu

* js/fast-export-paths-with-spaces:
  fast-export: quote paths with spaces
Merge branch 'pw/git-p4-tests' into pu

* pw/git-p4-tests:
  git p4 test: split up big t9800 test
  git p4 test: cleanup_git should make a new $git
  git p4 test: copy source indeterminate
  git p4 test: check for error message in failed test
  git p4 test: rename some "git-p4 command" strings
  git p4 test: never create default test repo
  git p4 test: simplify quoting involving TRASH_DIRECTORY
  git p4 test: use real_path to resolve p4 client symlinks
  git p4 test: wait longer for p4d to start