From: Catalin Marinas Date: Fri, 19 Sep 2008 21:52:26 +0000 (+0100) Subject: Merge branch 'stable' X-Git-Tag: v0.15-rc1~154 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/3ce5fec2ef4154369653a41eb7692aca25878298 Merge branch 'stable' Conflicts: t/t1501-sink.sh --- 3ce5fec2ef4154369653a41eb7692aca25878298 diff --cc t/t1501-sink.sh index 32931cd,2767c4c..516aa44 --- a/t/t1501-sink.sh +++ b/t/t1501-sink.sh @@@ -5,24 -5,62 +5,62 @@@ test_description='Test "stg sink" . ./test-lib.sh test_expect_success 'Initialize StGit stack' ' - echo 000 >> x && - git add x && + echo 0 >> f0 && + git add f0 && git commit -m initial && - echo 000 >> y && - git add y && - git commit -m y && + echo 1 >> f1 && + git add f1 && + git commit -m p1 && + echo 2 >> f2 && + git add f2 && + git commit -m p2 && + echo 3 >> f3 && + git add f3 && + git commit -m p3 && + echo 4 >> f4 && + git add f4 && + git commit -m p4 && + echo 22 >> f2 && + git add f2 && + git commit -m p22 && stg init && - stg uncommit && - stg pop + stg uncommit p22 p4 p3 p2 p1 && + stg pop -a ' - test_expect_success 'sink without applied patches' ' + test_expect_success 'sink default without applied patches' ' - ! stg sink + command_error stg sink ' - test_expect_success 'sink a specific patch without applied patches' ' - stg sink y && - test $(echo $(stg series --applied --noprefix)) = "y" + test_expect_success 'sink and reorder specified without applied patches' ' + stg sink p2 p1 && - test "$(echo $(stg applied))" = "p2 p1" ++ test "$(echo $(stg series --applied --noprefix))" = "p2 p1" + ' + + test_expect_success 'sink patches to the bottom of the stack' ' + stg sink p4 p3 p2 && - test "$(echo $(stg applied))" = "p4 p3 p2 p1" ++ test "$(echo $(stg series --applied --noprefix))" = "p4 p3 p2 p1" + ' + + test_expect_success 'sink current below a target' ' + stg sink --to=p2 && - test "$(echo $(stg applied))" = "p4 p3 p1 p2" ++ test "$(echo $(stg series --applied --noprefix))" = "p4 p3 p1 p2" + ' + + test_expect_success 'bring patches forward' ' + stg sink --to=p2 p3 p4 && - test "$(echo $(stg applied))" = "p1 p3 p4 p2" ++ test "$(echo $(stg series --applied --noprefix))" = "p1 p3 p4 p2" + ' + + test_expect_success 'sink specified patch below a target' ' + stg sink --to=p3 p2 && - test "$(echo $(stg applied))" = "p1 p2 p3 p4" ++ test "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3 p4" + ' + + test_expect_success 'sink with conflict' ' - ! stg sink --to=p2 p22 && - test "$(echo $(stg applied))" = "p1 p22" && ++ conflict_old stg sink --to=p2 p22 && ++ test "$(echo $(stg series --applied --noprefix))" = "p1 p22" && + test "$(echo $(stg status -c))" = "f2" ' test_done