3 # Copyright (c) 2007 Karl Hasselström
6 test_description
='Make sure that we can use old StGit repositories'
10 for ver
in 1.1 1.0 0.19 0.12 0.8; do
12 tar zxf
"$TEST_DIRECTORY"/t4000
/$ver.
tar.gz
16 "v$ver: Check the list of applied and unapplied patches" '
17 [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2" ] &&
18 [ "$(echo $(stg series --unapplied --noprefix))" = "p3 p4" ]
22 "v$ver: Make sure the .git/patches directory is no longer there" '
23 test_path_is_missing .git/patches
27 "v$ver: Make sure the 'description' is migrated to the config" '
28 [ "$(echo $(git config branch.master.description))" = "cool branch" ]
32 "v$ver: Make sure the base ref is no longer there" '
33 test_must_fail git show-ref --verify --quiet refs/bases/master
37 "v$ver: Make sure old format version config keys are gone" '
38 test_must_fail git config branch.master.stgit.stackformatversion &&
39 test_must_fail git config branch.master.stgitformatversion
43 "v$ver: Make sure patch refs are present" '
44 [ $(git show-ref | grep -c "refs\/patches\/master\/p0$") -eq 1 ] &&
45 [ $(git show-ref | grep -c "refs\/patches\/master\/p1$") -eq 1 ] &&
46 [ $(git show-ref | grep -c "refs\/patches\/master\/p2$") -eq 1 ] &&
47 [ $(git show-ref | grep -c "refs\/patches\/master\/p3$") -eq 1 ] &&
48 [ $(git show-ref | grep -c "refs\/patches\/master\/p4$") -eq 1 ]
52 "v$ver: Make sure patch log refs are gone" '
53 [ $(git show-ref | grep -c "refs\/patches\/master\/p0\.log") -eq 0 ] &&
54 [ $(git show-ref | grep -c "refs\/patches\/master\/p1\.log") -eq 0 ] &&
55 [ $(git show-ref | grep -c "refs\/patches\/master\/p2\.log") -eq 0 ] &&
56 [ $(git show-ref | grep -c "refs\/patches\/master\/p3\.log") -eq 0 ] &&
57 [ $(git show-ref | grep -c "refs\/patches\/master\/p4\.log") -eq 0 ]
61 "v$ver: Make sure basic push/pop work as expected" '
63 [ "$(echo $(stg series --applied --noprefix))" = "p0 p1" ] &&
64 [ "$(echo $(stg series --unapplied --noprefix))" = "p2 p3 p4" ] &&
66 [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2 p3 p4" ]