2007-11-22 03:57:18 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2007 David D. Kilzer
|
|
|
|
|
2008-09-08 18:02:08 +08:00
|
|
|
test_description='git svn info'
|
2007-11-22 03:57:18 +08:00
|
|
|
|
|
|
|
. ./lib-git-svn.sh
|
2008-08-05 15:35:18 +08:00
|
|
|
|
|
|
|
# Tested with: svn, version 1.4.4 (r25188)
|
2010-03-04 04:34:32 +08:00
|
|
|
# Tested with: svn, version 1.6.[12345689]
|
2009-05-08 16:06:16 +08:00
|
|
|
v=`svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p'`
|
2008-08-05 15:35:18 +08:00
|
|
|
case $v in
|
2010-03-04 04:34:32 +08:00
|
|
|
1.[456].*)
|
2008-08-05 15:35:18 +08:00
|
|
|
;;
|
|
|
|
*)
|
2010-06-25 01:44:48 +08:00
|
|
|
skip_all="skipping svn-info test (SVN version: $v not supported)"
|
2008-08-05 15:35:18 +08:00
|
|
|
test_done
|
|
|
|
;;
|
|
|
|
esac
|
2007-11-22 03:57:18 +08:00
|
|
|
|
|
|
|
ptouch() {
|
|
|
|
perl -w -e '
|
|
|
|
use strict;
|
2008-08-05 15:35:17 +08:00
|
|
|
use POSIX qw(mktime);
|
2007-11-22 03:57:18 +08:00
|
|
|
die "ptouch requires exactly 2 arguments" if @ARGV != 2;
|
2008-08-05 15:35:17 +08:00
|
|
|
my $text_last_updated = shift @ARGV;
|
|
|
|
my $git_file = shift @ARGV;
|
|
|
|
die "\"$git_file\" does not exist" if ! -e $git_file;
|
|
|
|
if ($text_last_updated
|
|
|
|
=~ /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/) {
|
|
|
|
my $mtime = mktime($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
|
|
|
my $atime = $mtime;
|
|
|
|
utime $atime, $mtime, $git_file;
|
|
|
|
}
|
2009-05-08 16:06:16 +08:00
|
|
|
' "`svn_cmd info $2 | grep '^Text Last Updated:'`" "$1"
|
2007-11-22 03:57:18 +08:00
|
|
|
}
|
|
|
|
|
2008-08-27 03:32:37 +08:00
|
|
|
quoted_svnrepo="$(echo $svnrepo | sed 's/ /%20/')"
|
|
|
|
|
2008-08-05 15:35:18 +08:00
|
|
|
test_expect_success 'setup repository and import' '
|
2007-11-22 03:57:18 +08:00
|
|
|
mkdir info &&
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd info &&
|
2007-11-22 03:57:18 +08:00
|
|
|
echo FIRST > A &&
|
|
|
|
echo one > file &&
|
|
|
|
ln -s file symlink-file &&
|
|
|
|
mkdir directory &&
|
|
|
|
touch directory/.placeholder &&
|
|
|
|
ln -s directory symlink-directory &&
|
2010-09-07 02:39:54 +08:00
|
|
|
svn_cmd import -m "initial" . "$svnrepo"
|
|
|
|
) &&
|
2009-05-08 16:06:16 +08:00
|
|
|
svn_cmd co "$svnrepo" svnwc &&
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd svnwc &&
|
2008-08-27 03:32:36 +08:00
|
|
|
echo foo > foo &&
|
2009-05-08 16:06:16 +08:00
|
|
|
svn_cmd add foo &&
|
|
|
|
svn_cmd commit -m "change outside directory" &&
|
2010-09-07 02:39:54 +08:00
|
|
|
svn_cmd update
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
mkdir gitwc &&
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
2008-09-08 18:02:08 +08:00
|
|
|
git svn init "$svnrepo" &&
|
2010-09-07 02:39:54 +08:00
|
|
|
git svn fetch
|
|
|
|
) &&
|
2008-08-27 03:32:35 +08:00
|
|
|
ptouch gitwc/file svnwc/file &&
|
|
|
|
ptouch gitwc/directory svnwc/directory &&
|
|
|
|
ptouch gitwc/symlink-file svnwc/symlink-file &&
|
|
|
|
ptouch gitwc/symlink-directory svnwc/symlink-directory
|
2008-08-05 15:35:18 +08:00
|
|
|
'
|
2007-11-22 03:57:18 +08:00
|
|
|
|
|
|
|
test_expect_success 'info' "
|
|
|
|
(cd svnwc; svn info) > expected.info &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info) > actual.info &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info actual.info
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url)" = "$quoted_svnrepo"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info .' "
|
|
|
|
(cd svnwc; svn info .) > expected.info-dot &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info .) > actual.info-dot &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-dot actual.info-dot
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url .' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url .)" = "$quoted_svnrepo"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info file' "
|
|
|
|
(cd svnwc; svn info file) > expected.info-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info file) > actual.info-file &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-file actual.info-file
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url file' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url file)" = "$quoted_svnrepo/file"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info directory' "
|
|
|
|
(cd svnwc; svn info directory) > expected.info-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info directory) > actual.info-directory &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-directory actual.info-directory
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2008-08-27 03:32:36 +08:00
|
|
|
test_expect_success 'info inside directory' "
|
|
|
|
(cd svnwc/directory; svn info) > expected.info-inside-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc/directory; git svn info) > actual.info-inside-directory &&
|
2008-08-27 03:32:36 +08:00
|
|
|
test_cmp expected.info-inside-directory actual.info-inside-directory
|
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url directory' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url directory)" = "$quoted_svnrepo/directory"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info symlink-file' "
|
|
|
|
(cd svnwc; svn info symlink-file) > expected.info-symlink-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info symlink-file) > actual.info-symlink-file &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-symlink-file actual.info-symlink-file
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url symlink-file' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url symlink-file)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/symlink-file"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info symlink-directory' "
|
|
|
|
(cd svnwc; svn info symlink-directory) \
|
|
|
|
> expected.info-symlink-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info symlink-directory) \
|
2007-11-22 03:57:18 +08:00
|
|
|
> actual.info-symlink-directory &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-symlink-directory actual.info-symlink-directory
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url symlink-directory' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url symlink-directory)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/symlink-directory"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info added-file' "
|
|
|
|
echo two > gitwc/added-file &&
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
|
|
|
git add added-file
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
cp gitwc/added-file svnwc/added-file &&
|
|
|
|
ptouch gitwc/added-file svnwc/added-file &&
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd svnwc &&
|
|
|
|
svn_cmd add added-file > /dev/null
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
(cd svnwc; svn info added-file) > expected.info-added-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info added-file) > actual.info-added-file &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-added-file actual.info-added-file
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url added-file' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url added-file)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/added-file"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info added-directory' "
|
|
|
|
mkdir gitwc/added-directory svnwc/added-directory &&
|
|
|
|
ptouch gitwc/added-directory svnwc/added-directory &&
|
|
|
|
touch gitwc/added-directory/.placeholder &&
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd svnwc &&
|
|
|
|
svn_cmd add added-directory > /dev/null
|
|
|
|
) &&
|
|
|
|
(cd gitwc &&
|
|
|
|
git add added-directory
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
(cd svnwc; svn info added-directory) \
|
|
|
|
> expected.info-added-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info added-directory) \
|
2007-11-22 03:57:18 +08:00
|
|
|
> actual.info-added-directory &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-added-directory actual.info-added-directory
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url added-directory' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url added-directory)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/added-directory"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info added-symlink-file' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
2007-11-22 03:57:18 +08:00
|
|
|
ln -s added-file added-symlink-file &&
|
2010-09-07 02:39:54 +08:00
|
|
|
git add added-symlink-file
|
|
|
|
) &&
|
|
|
|
(cd svnwc &&
|
2007-11-22 03:57:18 +08:00
|
|
|
ln -s added-file added-symlink-file &&
|
2010-09-07 02:39:54 +08:00
|
|
|
svn_cmd add added-symlink-file > /dev/null
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
ptouch gitwc/added-symlink-file svnwc/added-symlink-file &&
|
|
|
|
(cd svnwc; svn info added-symlink-file) \
|
|
|
|
> expected.info-added-symlink-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info added-symlink-file) \
|
2007-11-22 03:57:18 +08:00
|
|
|
> actual.info-added-symlink-file &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-added-symlink-file \
|
2007-11-22 03:57:18 +08:00
|
|
|
actual.info-added-symlink-file
|
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url added-symlink-file' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url added-symlink-file)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/added-symlink-file"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info added-symlink-directory' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
2007-11-22 03:57:18 +08:00
|
|
|
ln -s added-directory added-symlink-directory &&
|
2010-09-07 02:39:54 +08:00
|
|
|
git add added-symlink-directory
|
|
|
|
) &&
|
|
|
|
(cd svnwc &&
|
2007-11-22 03:57:18 +08:00
|
|
|
ln -s added-directory added-symlink-directory &&
|
2010-09-07 02:39:54 +08:00
|
|
|
svn_cmd add added-symlink-directory > /dev/null
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
ptouch gitwc/added-symlink-directory svnwc/added-symlink-directory &&
|
|
|
|
(cd svnwc; svn info added-symlink-directory) \
|
|
|
|
> expected.info-added-symlink-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info added-symlink-directory) \
|
2007-11-22 03:57:18 +08:00
|
|
|
> actual.info-added-symlink-directory &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-added-symlink-directory \
|
2007-11-22 03:57:18 +08:00
|
|
|
actual.info-added-symlink-directory
|
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url added-symlink-directory' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url added-symlink-directory)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/added-symlink-directory"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
# The next few tests replace the "Text Last Updated" value with a
|
|
|
|
# placeholder since git doesn't have a way to know the date that a
|
|
|
|
# now-deleted file was last checked out locally. Internally it
|
|
|
|
# simply reuses the Last Changed Date.
|
|
|
|
|
|
|
|
test_expect_success 'info deleted-file' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
|
|
|
git rm -f file > /dev/null
|
|
|
|
) &&
|
|
|
|
(cd svnwc &&
|
|
|
|
svn_cmd rm --force file > /dev/null
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
(cd svnwc; svn info file) |
|
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> expected.info-deleted-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info file) |
|
2007-11-22 03:57:18 +08:00
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> actual.info-deleted-file &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-deleted-file actual.info-deleted-file
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url file (deleted)' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url file)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/file"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info deleted-directory' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
|
|
|
git rm -r -f directory > /dev/null
|
|
|
|
) &&
|
|
|
|
(cd svnwc &&
|
|
|
|
svn_cmd rm --force directory > /dev/null
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
(cd svnwc; svn info directory) |
|
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> expected.info-deleted-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info directory) |
|
2007-11-22 03:57:18 +08:00
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> actual.info-deleted-directory &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-deleted-directory actual.info-deleted-directory
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url directory (deleted)' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url directory)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/directory"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info deleted-symlink-file' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
|
|
|
git rm -f symlink-file > /dev/null
|
|
|
|
) &&
|
|
|
|
(cd svnwc &&
|
|
|
|
svn_cmd rm --force symlink-file > /dev/null
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
(cd svnwc; svn info symlink-file) |
|
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> expected.info-deleted-symlink-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info symlink-file) |
|
2007-11-22 03:57:18 +08:00
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> actual.info-deleted-symlink-file &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-deleted-symlink-file \
|
2007-11-22 03:57:18 +08:00
|
|
|
actual.info-deleted-symlink-file
|
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url symlink-file (deleted)' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url symlink-file)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/symlink-file"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info deleted-symlink-directory' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
|
|
|
git rm -f symlink-directory > /dev/null
|
|
|
|
) &&
|
|
|
|
(cd svnwc &&
|
|
|
|
svn_cmd rm --force symlink-directory > /dev/null
|
|
|
|
) &&
|
2007-11-22 03:57:18 +08:00
|
|
|
(cd svnwc; svn info symlink-directory) |
|
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> expected.info-deleted-symlink-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; git svn info symlink-directory) |
|
2007-11-22 03:57:18 +08:00
|
|
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
|
|
|
> actual.info-deleted-symlink-directory &&
|
2008-08-27 03:32:34 +08:00
|
|
|
test_cmp expected.info-deleted-symlink-directory \
|
2007-11-22 03:57:18 +08:00
|
|
|
actual.info-deleted-symlink-directory
|
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url symlink-directory (deleted)' '
|
2008-09-08 18:02:08 +08:00
|
|
|
test "$(cd gitwc; git svn info --url symlink-directory)" \
|
2008-08-27 03:32:37 +08:00
|
|
|
= "$quoted_svnrepo/symlink-directory"
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
# NOTE: git does not have the concept of replaced objects,
|
|
|
|
# so we can't test for files in that state.
|
|
|
|
|
|
|
|
test_expect_success 'info unknown-file' "
|
|
|
|
echo two > gitwc/unknown-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info unknown-file) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-unknown-file &&
|
|
|
|
grep unknown-file actual.info-unknown-file
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url unknown-file' '
|
2008-08-29 21:42:49 +08:00
|
|
|
echo two > gitwc/unknown-file &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info --url unknown-file) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-url-unknown-file &&
|
|
|
|
grep unknown-file actual.info-url-unknown-file
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info unknown-directory' "
|
|
|
|
mkdir gitwc/unknown-directory svnwc/unknown-directory &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info unknown-directory) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-unknown-directory &&
|
|
|
|
grep unknown-directory actual.info-unknown-directory
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url unknown-directory' '
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info --url unknown-directory) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-url-unknown-directory &&
|
|
|
|
grep unknown-directory actual.info-url-unknown-directory
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info unknown-symlink-file' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
|
|
|
ln -s unknown-file unknown-symlink-file
|
|
|
|
) &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info unknown-symlink-file) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-unknown-symlink-file &&
|
|
|
|
grep unknown-symlink-file actual.info-unknown-symlink-file
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url unknown-symlink-file' '
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info --url unknown-symlink-file) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-url-unknown-symlink-file &&
|
|
|
|
grep unknown-symlink-file actual.info-url-unknown-symlink-file
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_expect_success 'info unknown-symlink-directory' "
|
2010-09-07 02:39:54 +08:00
|
|
|
(cd gitwc &&
|
|
|
|
ln -s unknown-directory unknown-symlink-directory
|
|
|
|
) &&
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info unknown-symlink-directory) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-unknown-symlink-directory &&
|
|
|
|
grep unknown-symlink-directory actual.info-unknown-symlink-directory
|
2007-11-22 03:57:18 +08:00
|
|
|
"
|
|
|
|
|
2007-11-22 03:57:19 +08:00
|
|
|
test_expect_success 'info --url unknown-symlink-directory' '
|
2008-09-08 18:02:08 +08:00
|
|
|
(cd gitwc; test_must_fail git svn info --url unknown-symlink-directory) \
|
2008-08-29 21:42:49 +08:00
|
|
|
2> actual.info-url-unknown-symlink-directory &&
|
|
|
|
grep unknown-symlink-directory actual.info-url-unknown-symlink-directory
|
2007-11-22 03:57:19 +08:00
|
|
|
'
|
|
|
|
|
2007-11-22 03:57:18 +08:00
|
|
|
test_done
|