monotone

monotone Mtn Source Tree

Root/tests/t_renamed.at

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

Archive Download this file

Branches

Tags

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