summaryrefslogtreecommitdiff
path: root/t/t9119-git-svn-info.sh
Commit message (Collapse)AuthorAgeFilesLines
* git svn: info: correctly handle absolute path argsEric Wong2014-09-141-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Calling "git svn info $(pwd)" would hit: "Reading from filehandle failed at ..." errors due to improper prefixing and canonicalization. Strip the toplevel path from absolute filesystem paths to ensure downstream canonicalization routines are only exposed to paths tracked in git (or SVN). v2: Thanks to Andrej Manduch for originally noticing the issue and fixing my original version of this to handle more corner cases such as "/path/to/top/../top" and "/path/to/top/../top/file" as shown in the new test cases. v3: Fix pathname portability problems pointed out by Johannes Sixt with a hint from brian m. carlson. Cc: Johannes Sixt <j6t@kdbg.org> Cc: "brian m. carlson" <sandals@crustytoothpaste.net> Signed-off-by: Andrej Manduch <amanduch@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
* t9119: do not compare "Text Last Updated" line from "svn info"Junio C Hamano2010-12-061-72/+34
| | | | | | | | | | | | | | On the "Text Last Updated" line, "git svn info <file>" does not give the timestamp of the commit that touched the path most recently, unlike "svn info <file>". Do not expect the output from two commands to match on these lines. There was a "ptouch" attempt to transplant the timestamp from svn working tree files to corresponding git working tree files, which mostly hid this difference, but is made pointless now with this change. Remove the helper function and calls to it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: subshell indentation stylefixJonathan Nieder2010-09-091-24/+45
| | | | | | | | | | | | | | | | | | | Format the subshells introduced by the previous patch (Several tests: cd inside subshell instead of around, 2010-09-06) like so: ( cd subdir && ... ) && This is generally easier to read and has the nice side-effect that this patch will show what commands are used in the subshell, making it easier to check for lost environment variables and similar behavior changes. Cc: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Several tests: cd inside subshell instead of aroundJens Lehmann2010-09-061-63/+63
| | | | | | | | | | Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: Skip tests in a way that makes sense under TAPÆvar Arnfjörð Bjarmason2010-06-251-1/+1
| | | | | | | | | | SKIP messages are now part of the TAP plan. A TAP harness now knows why a particular test was skipped and can report that information. The non-TAP harness built into Git's test-lib did nothing special with these messages, and is unaffected by these changes. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9119-git-svn-info.sh: test with svn 1.6.* as wellMichael J Gruber2010-03-041-1/+2
| | | | | | | | All tests in t9119 were disabled for subversion versions other than 1.[45].*. Make the test script run with subversion 1.[456].*. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Acked-by: Eric Wong <normalperson@yhbt.net>
* git-svn testsuite: use standard configuration for Subversion toolsEygene Ryabinkin2009-05-211-15/+15
| | | | | | | | | | | | | | | | | | | | I have tweaked configuration in my ~/.subversion directory, namely I am running auto-properties and automatically adding '$Id$' expansion to every file. This choke the last test named 'proplist' from t9101-git-svn-props.sh, because one more property, svn:keywords is automatically added. I had just wrapped svn invocation with the svn_cmd that specifies empty directory via --config-dir argument. Since the latter is the global option, it should be recognized by all svn subcommands, so no regressions will be introduced. Now svn_cmd is used everywhere, not just in the failed test module: this should guard us from the future clashes with user-defined configuration tweaks. Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
* t/t91XX git-svn tests: run "git svn" not "git-svn"Nanako Shiraishi2008-09-081-40/+40
| | | | | | | This replaces 'git-svn' with 'git svn' in the tests. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-svn: fix 'info' tests for unknown itemsThomas Rast2008-09-051-48/+25
| | | | | | | | | | | | | | The previous tests all expected the results from SVN and Git to be identical, and expected both to return success. This cannot be guaranteed: SVN changed the message style between 1.4 and 1.5, and in 1.5, sets a failure exit code. Change the tests to verify that 'git svn info <item>' sets a failure exit code, and that its output contains the file name. This should hopefully catch all other errors. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* git svn info: always quote URLs in 'info' outputThomas Rast2008-09-051-14/+16
| | | | | | | | | | | | | Changes 'git svn info' to always URL-escape the 'URL' and 'Repository' fields and --url output, like SVN (at least 1.5) does. Note that reusing the escape_url() further down in Git::SVN::Ra is not possible because it only triggers for http(s) URLs. I did not know whether extending it to all schemes would break SVN access anywhere, so I made a new one that quotes in all schemes. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* git svn info: make info relative to the current directoryThomas Rast2008-09-051-1/+13
| | | | | | | | | | | Previously 'git svn info <path>' would always treat the <path> as relative to the working directory root, with a default of ".". This does not match the behaviour of 'svn info'. Prepend $(git rev-parse --show-prefix) to the path used inside cmd_info to make it relative to the current working directory. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* git svn info: tests: fix ptouch argument order in setupThomas Rast2008-09-051-4/+4
| | | | | | | | | The arguments must be <gitwc-path> <svnwc-path>, otherwise it fails to update the timestamps (without setting a failure exit code) and results in bad test output later on. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* git svn info: tests: use test_cmp instead of git-diffThomas Rast2008-09-051-22/+22
| | | | | | | | | git-diff does not appear to return the correct exit values, and gives a false success for more than half (!) of the tests due to the space in "trash directory" which git-svn fails to encode. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* git svn info: tests: do not use set -eThomas Rast2008-09-051-2/+0
| | | | | | | | | | Exiting in the middle of a test confuses the test suite, which will just say "FATAL: Unexpected exit with code 1" in response to a failed test, instead of actually diagnosing failure and continuing with the next test. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* git svn info: tests: let 'init' test run with SVN 1.5Thomas Rast2008-09-051-2/+2
| | | | | Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* t9119: conditionally re-enable test depending on svn(1) versionEric Wong2008-08-051-29/+40
| | | | | | | | | | I've tested this with svn 1.4.4 This also adds quoting to make it work odd characters in the trash path. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix race condition in t9119-git-svn-info.shDavid D. Kilzer2008-08-051-4/+11
| | | | | | | | | | | | | | | | Changed the ptouch bash function to use the "Text Last Updated" date reported by 'svn info' when changing the modified time (mtime) of the file/symlink/directory in the git working directory. Previously it used the mtime of the item in the svn working directory, which caused the race condition. [ew: swapped argument order of ptouch() to minimize diff] From: David D. Kilzer <ddkilzer@kilzer.net> Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* disable t9119 for now.Junio C Hamano2007-12-121-0/+2
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make test scripts executable.Junio C Hamano2007-11-221-0/+0
|
* git-svn: info --url [path]David D. Kilzer2007-11-211-0/+93
| | | | | | | | | | Return the svn URL for the given path, or return the svn repository URL if no path is given. Added 18 tests to t/t9119-git-svn-info.sh. Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Acked-by: Eric Wong <normalperson@yhbt.net>
* git-svn info: implement info commandDavid D. Kilzer2007-11-211-0/+275
Implement "git-svn info" for files and directories based on the "svn info" command. Note that the -r/--revision argument is not supported yet. Added 18 tests in t/t9119-git-svn-info.sh. [ew: small fix to work without arguments on all working directories] Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Acked-by: Eric Wong <normalperson@yhbt.net>