comparison tests/test-children.t @ 11920:d0a7e700b5d1

tests: unify test-children
author Pradeepkumar Gayam <in3xes@gmail.com>
date Tue, 17 Aug 2010 17:56:26 +0530
parents tests/test-children@bb5ea66789e3
children f2719b387380
comparison
equal deleted inserted replaced
11919:67fb33eb3add 11920:d0a7e700b5d1
1 test children command
2
3 $ cat <<EOF >> $HGRCPATH
4 > [extensions]
5 > children =
6 > EOF
7
8 init
9 $ hg init t
10 $ cd t
11
12 no working directory
13 $ hg children
14
15 setup
16 $ echo 0 > file0
17 $ hg ci -qAm 0 -d '0 0'
18
19 $ echo 1 > file1
20 $ hg ci -qAm 1 -d '1 0'
21
22 $ echo 2 >> file0
23 $ hg ci -qAm 2 -d '2 0'
24
25 $ hg co null
26 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
27 $ echo 3 > file3
28 $ hg ci -qAm 3 -d '3 0'
29
30 hg children at revision 3 (tip)
31 $ hg children
32
33 $ hg co null
34 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35
36 hg children at nullrev (should be 0 and 3)
37 $ hg children
38 changeset: 0:4df8521a7374
39 user: test
40 date: Thu Jan 01 00:00:00 1970 +0000
41 summary: 0
42
43 changeset: 3:e2962852269d
44 tag: tip
45 parent: -1:000000000000
46 user: test
47 date: Thu Jan 01 00:00:03 1970 +0000
48 summary: 3
49
50 $ hg co 1
51 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
52
53 hg children at revision 1 (should be 2)
54 $ hg children
55 changeset: 2:8f5eea5023c2
56 user: test
57 date: Thu Jan 01 00:00:02 1970 +0000
58 summary: 2
59
60 $ hg co 2
61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
62
63 hg children at revision 2 (other head)
64 $ hg children
65
66 $ for i in null 0 1 2 3; do
67 > echo "hg children -r $i"
68 > hg children -r $i
69 > done
70 hg children -r null
71 changeset: 0:4df8521a7374
72 user: test
73 date: Thu Jan 01 00:00:00 1970 +0000
74 summary: 0
75
76 changeset: 3:e2962852269d
77 tag: tip
78 parent: -1:000000000000
79 user: test
80 date: Thu Jan 01 00:00:03 1970 +0000
81 summary: 3
82
83 hg children -r 0
84 changeset: 1:708c093edef0
85 user: test
86 date: Thu Jan 01 00:00:01 1970 +0000
87 summary: 1
88
89 hg children -r 1
90 changeset: 2:8f5eea5023c2
91 user: test
92 date: Thu Jan 01 00:00:02 1970 +0000
93 summary: 2
94
95 hg children -r 2
96 hg children -r 3
97
98 hg children -r 0 file0 (should be 2)
99 $ hg children -r 0 file0
100 changeset: 2:8f5eea5023c2
101 user: test
102 date: Thu Jan 01 00:00:02 1970 +0000
103 summary: 2
104
105
106 hg children -r 1 file0 (should be 2)
107 $ hg children -r 1 file0
108 changeset: 2:8f5eea5023c2
109 user: test
110 date: Thu Jan 01 00:00:02 1970 +0000
111 summary: 2
112
113
114 $ hg co 0
115 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
116
117 hg children file0 at revision 0 (should be 2)
118 $ hg children file0
119 changeset: 2:8f5eea5023c2
120 user: test
121 date: Thu Jan 01 00:00:02 1970 +0000
122 summary: 2
123