monotone

monotone Mtn Source Tree

Root/tests/t_rename.at

1# -*- Autoconf -*-
2
3AT_SETUP([renaming a file])
4
5MONOTONE_SETUP
6
7AT_DATA(foo, [foo file
8])
9AT_DATA(bleh, [bleh file
10])
11
12# produce root
13AT_CHECK(MONOTONE add foo, [], [ignore], [ignore])
14AT_CHECK(MONOTONE --branch=testbranch commit blah-blah, [], [ignore], [ignore])
15ROOT_M_SHA=`SHA1(MT/manifest)`
16ROOT_F_SHA=`SHA1(foo)`
17
18# produce move edge
19AT_CHECK(MONOTONE rename foo bar, [], [ignore], [ignore])
20AT_CHECK(cp foo bar)
21AT_CHECK(MONOTONE commit blah-blah, [], [ignore], [ignore])
22
23# revert to root
24PROBE_NODE(foo, $ROOT_M_SHA, $ROOT_F_SHA)
25AT_CHECK(rm bar)
26
27# make a simple add edge
28AT_CHECK(MONOTONE add bleh, [], [ignore], [ignore])
29AT_CHECK(MONOTONE commit blah-blah, [], [ignore], [ignore])
30
31# merge the add and the rename
32AT_CHECK(MONOTONE merge, [], [ignore], [ignore])
33AT_CHECK(MONOTONE update, [], [ignore], [ignore])
34AT_CHECK(grep bar MT/manifest, [0], [ignore], [ignore])
35AT_CHECK(grep bleh MT/manifest, [0], [ignore], [ignore])
36AT_CHECK(grep foo MT/manifest, [1], [ignore], [ignore])
37AT_CHECK(rm bar)
38
39AT_CLEANUP
40
41

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status