Use README.md in setup.py long_description
[stgit.git] / t / t1203-push-conflict.sh
blobcf8adb4b3a0d72e5b985b1f52b1d35c33eeb7754
1 #!/bin/sh
3 # Copyright (c) 2006 David Kågedal
6 test_description='Exercise push conflicts.
8 Test that the index has no modifications after a push with conflicts.
11 . ./test-lib.sh
13 test_expect_success \
14 'Initialize the StGit repository' \
15 'stg init
18 test_expect_success \
19 'Create the first patch' \
21 stg new foo -m foo &&
22 echo foo > test &&
23 echo fie > test2 &&
24 stg add test test2 &&
25 stg refresh &&
26 stg pop
29 test_expect_success \
30 'Create the second patch' \
32 stg new bar -m bar &&
33 echo bar > test &&
34 stg add test &&
35 stg refresh
38 test_expect_success \
39 'Push the first patch with conflict' \
41 conflict stg push foo
44 test_expect_success \
45 'Show the, now empty, first patch' \
47 ! stg show foo | grep -q -e "^diff "
50 test_expect_success \
51 'Check that the index has the non-conflict updates' \
53 git diff --cached --stat | grep -q -e "^ test2 | *1 "
56 test_expect_success \
57 'Check that pop will fail while there are unmerged conflicts' \
59 command_error stg pop
62 test_expect_success \
63 'Resolve the conflict' \
65 echo resolved > test &&
66 stg resolved test &&
67 stg refresh
70 test_done