1#!/bin/sh
2#
3# Copyright (c) 2007 Eric Wong
4#
5
6test_description='git-svn useSvmProps test'
7
8. ./lib-git-svn.sh
9
10test_expect_success 'load svm repo' '
11 svnadmin load -q "$rawsvnrepo" < ../t9110/svm.dump &&
12 git-svn init --minimize-url -R arr -i bar "$svnrepo"/mirror/arr &&
13 git-svn init --minimize-url -R argh -i dir "$svnrepo"/mirror/argh &&
14 git-svn init --minimize-url -R argh -i e \
15 "$svnrepo"/mirror/argh/a/b/c/d/e &&
16 git config svn.useSvmProps true &&
17 git-svn fetch --all
18 '
19
20uuid=161ce429-a9dd-4828-af4a-52023f968c89
21
22bar_url=http://mayonaise/svnrepo/bar
23test_expect_success 'verify metadata for /bar' "
24 git cat-file commit refs/remotes/bar | \
25 grep '^git-svn-id: $bar_url@12 $uuid$' &&
26 git cat-file commit refs/remotes/bar~1 | \
27 grep '^git-svn-id: $bar_url@11 $uuid$' &&
28 git cat-file commit refs/remotes/bar~2 | \
29 grep '^git-svn-id: $bar_url@10 $uuid$' &&
30 git cat-file commit refs/remotes/bar~3 | \
31 grep '^git-svn-id: $bar_url@9 $uuid$' &&
32 git cat-file commit refs/remotes/bar~4 | \
33 grep '^git-svn-id: $bar_url@6 $uuid$' &&
34 git cat-file commit refs/remotes/bar~5 | \
35 grep '^git-svn-id: $bar_url@1 $uuid$'
36 "
37
38e_url=http://mayonaise/svnrepo/dir/a/b/c/d/e
39test_expect_success 'verify metadata for /dir/a/b/c/d/e' "
40 git cat-file commit refs/remotes/e | \
41 grep '^git-svn-id: $e_url@1 $uuid$'
42 "
43
44dir_url=http://mayonaise/svnrepo/dir
45test_expect_success 'verify metadata for /dir' "
46 git cat-file commit refs/remotes/dir | \
47 grep '^git-svn-id: $dir_url@2 $uuid$' &&
48 git cat-file commit refs/remotes/dir~1 | \
49 grep '^git-svn-id: $dir_url@1 $uuid$'
50 "
51
52test_expect_success 'find commit based on SVN revision number' "
53 git-svn find-rev r12 |
54 grep `git rev-parse HEAD`
55 "
56
57test_expect_success 'empty rebase' "
58 git-svn rebase
59 "
60
61test_done