2007-02-17 10:53:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2007 Eric Wong
|
|
|
|
#
|
|
|
|
|
2008-09-08 10:02:08 +00:00
|
|
|
test_description='git svn useSvmProps test'
|
2007-02-17 10:53:07 +00:00
|
|
|
|
|
|
|
. ./lib-git-svn.sh
|
|
|
|
|
2008-05-04 05:37:59 +00:00
|
|
|
test_expect_success 'load svm repo' '
|
2008-08-08 09:26:28 +00:00
|
|
|
svnadmin load -q "$rawsvnrepo" < "$TEST_DIRECTORY"/t9110/svm.dump &&
|
2008-09-08 10:02:08 +00:00
|
|
|
git svn init --minimize-url -R arr -i bar "$svnrepo"/mirror/arr &&
|
|
|
|
git svn init --minimize-url -R argh -i dir "$svnrepo"/mirror/argh &&
|
|
|
|
git svn init --minimize-url -R argh -i e \
|
2008-05-04 05:37:59 +00:00
|
|
|
"$svnrepo"/mirror/argh/a/b/c/d/e &&
|
2007-07-03 05:52:14 +00:00
|
|
|
git config svn.useSvmProps true &&
|
2008-09-08 10:02:08 +00:00
|
|
|
git svn fetch --all
|
2008-05-04 05:37:59 +00:00
|
|
|
'
|
2007-02-17 10:53:07 +00:00
|
|
|
|
|
|
|
uuid=161ce429-a9dd-4828-af4a-52023f968c89
|
|
|
|
|
|
|
|
bar_url=http://mayonaise/svnrepo/bar
|
|
|
|
test_expect_success 'verify metadata for /bar' "
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/bar | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $bar_url@12 $uuid$' &&
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/bar~1 | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $bar_url@11 $uuid$' &&
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/bar~2 | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $bar_url@10 $uuid$' &&
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/bar~3 | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $bar_url@9 $uuid$' &&
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/bar~4 | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $bar_url@6 $uuid$' &&
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/bar~5 | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $bar_url@1 $uuid$'
|
2007-02-17 10:53:07 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
e_url=http://mayonaise/svnrepo/dir/a/b/c/d/e
|
|
|
|
test_expect_success 'verify metadata for /dir/a/b/c/d/e' "
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/e | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $e_url@1 $uuid$'
|
2007-02-17 10:53:07 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
dir_url=http://mayonaise/svnrepo/dir
|
|
|
|
test_expect_success 'verify metadata for /dir' "
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/dir | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $dir_url@2 $uuid$' &&
|
2007-07-03 05:52:14 +00:00
|
|
|
git cat-file commit refs/remotes/dir~1 | \
|
2008-09-08 10:02:05 +00:00
|
|
|
grep '^${git_svn_id}: $dir_url@1 $uuid$'
|
2007-02-17 10:53:07 +00:00
|
|
|
"
|
|
|
|
|
2008-07-14 15:28:04 +00:00
|
|
|
test_expect_success 'find commit based on SVN revision number' "
|
2008-09-08 10:02:08 +00:00
|
|
|
git svn find-rev r12 |
|
2008-07-14 15:28:04 +00:00
|
|
|
grep `git rev-parse HEAD`
|
|
|
|
"
|
|
|
|
|
|
|
|
test_expect_success 'empty rebase' "
|
2008-09-08 10:02:08 +00:00
|
|
|
git svn rebase
|
2008-07-14 15:28:04 +00:00
|
|
|
"
|
|
|
|
|
2007-02-17 10:53:07 +00:00
|
|
|
test_done
|