monotone

monotone Mtn Source Tree

Root/tests/t_versions.at

1# -*- Autoconf -*-
2
3AT_SETUP([multiple version committing])
4
5MONOTONE_SETUP
6
7AT_DATA(testfile, [version 0 of the file
8])
9AT_CHECK(MONOTONE add testfile, [], [ignore], [ignore])
10AT_CHECK(MONOTONE --branch=testbranch commit blah-blah, [], [ignore], [ignore])
11
12for i in 1 2 3 4 5 6
13do
14 AT_CHECK(echo "version $i of the file", [], [stdout])
15 AT_CHECK(mv stdout testfile)
16 AT_CHECK(MONOTONE --branch=testbranch commit blah-blah, [], [ignore], [ignore])
17 AT_CHECK(SHA1(testfile), [], [stdout])
18 AT_CHECK(mv stdout fsha-$i, [], [ignore])
19 AT_CHECK(SHA1(MT/manifest), [], [stdout])
20 AT_CHECK(mv stdout msha-$i, [], [ignore])
21done
22
23for i in 1 2 3 4 5 6
24do
25 AT_CHECK(echo "version $i of the file", [], [stdout])
26 AT_CHECK(mv stdout testfile)
27
28 MSHA=`cat msha-$i`
29 FSHA=`cat fsha-$i`
30
31 AT_CHECK(MONOTONE cat file $FSHA, [], [stdout])
32 AT_CHECK(cmp stdout testfile, [], [ignore])
33
34 AT_CHECK(MONOTONE checkout $MSHA ., [], [stdout])
35 AT_CHECK(SHA1(testfile), [], [stdout])
36 AT_CHECK(cmp stdout fsha-$i, [], [ignore])
37
38done
39
40AT_CLEANUP

Archive Download this file

Branches

Tags

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