##// END OF EJS Templates
Test parents behaviour with files.
Patrick Mezard -
r5299:5a4824f6 default
parent child Browse files
Show More
@@ -13,6 +13,12 b' echo a >> a'
13 hg ci -Ama -d '1 0'
13 hg ci -Ama -d '1 0'
14 echo b >> b
14 echo b >> b
15 hg ci -Amb -d '2 0'
15 hg ci -Amb -d '2 0'
16 echo c > c
17 hg ci -Amc -d '3 0'
18 hg up -C 1
19 echo d > c
20 hg ci -Amc2 -d '4 0'
21 hg up -C 3
16
22
17 echo % hg parents
23 echo % hg parents
18 hg parents
24 hg parents
@@ -20,6 +26,12 b' hg parents'
20 echo % hg parents a
26 echo % hg parents a
21 hg parents a
27 hg parents a
22
28
29 echo % hg parents c, single revision
30 hg parents c
31
32 echo % hg parents -r 3 c
33 hg parents -r 3 c
34
23 echo % hg parents -r 2
35 echo % hg parents -r 2
24 hg parents -r 2
36 hg parents -r 2
25
37
@@ -41,4 +53,15 b" echo '% hg parents -r 2 glob:a'"
41 cd ..
53 cd ..
42 hg parents -r 2 glob:a
54 hg parents -r 2 glob:a
43
55
56 echo % merge working dir with 2 parents, hg parents c
57 HGMERGE=true hg merge
58 hg parents c
59
60 echo % merge working dir with 1 parent, hg parents
61 hg up -C 2
62 HGMERGE=true hg merge -r 4
63 hg parents
64 echo % merge working dir with 1 parent, hg parents c
65 hg parents c
66
44 true
67 true
@@ -1,19 +1,30 b''
1 % no working directory
1 % no working directory
2 adding a
2 adding a
3 adding b
3 adding b
4 adding c
5 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
6 adding c
7 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 % hg parents
8 % hg parents
5 changeset: 2:6cfac479f009
9 changeset: 3:02d851b7e549
6 tag: tip
7 user: test
10 user: test
8 date: Thu Jan 01 00:00:02 1970 +0000
11 date: Thu Jan 01 00:00:03 1970 +0000
9 summary: b
12 summary: c
10
13
11 % hg parents a
14 % hg parents a
12 changeset: 0:b6a1406d8886
15 changeset: 1:d786049f033a
13 user: test
16 user: test
14 date: Thu Jan 01 00:00:00 1970 +0000
17 date: Thu Jan 01 00:00:01 1970 +0000
15 summary: ab
18 summary: a
16
19
20 % hg parents c, single revision
21 changeset: 3:02d851b7e549
22 user: test
23 date: Thu Jan 01 00:00:03 1970 +0000
24 summary: c
25
26 % hg parents -r 3 c
27 abort: 'c' not found in manifest!
17 % hg parents -r 2
28 % hg parents -r 2
18 changeset: 1:d786049f033a
29 changeset: 1:d786049f033a
19 user: test
30 user: test
@@ -21,24 +32,64 b' date: Thu Jan 01 00:00:01 1970 +0'
21 summary: a
32 summary: a
22
33
23 % hg parents -r 2 a
34 % hg parents -r 2 a
24 changeset: 0:b6a1406d8886
35 changeset: 1:d786049f033a
25 user: test
36 user: test
26 date: Thu Jan 01 00:00:00 1970 +0000
37 date: Thu Jan 01 00:00:01 1970 +0000
27 summary: ab
38 summary: a
28
39
29 % hg parents -r 2 ../a
40 % hg parents -r 2 ../a
30 abort: ../a not under root
41 abort: ../a not under root
31 % cd dir; hg parents -r 2 ../a
42 % cd dir; hg parents -r 2 ../a
32 changeset: 0:b6a1406d8886
43 changeset: 1:d786049f033a
33 user: test
44 user: test
34 date: Thu Jan 01 00:00:00 1970 +0000
45 date: Thu Jan 01 00:00:01 1970 +0000
35 summary: ab
46 summary: a
36
47
37 % hg parents -r 2 path:a
48 % hg parents -r 2 path:a
38 changeset: 0:b6a1406d8886
49 changeset: 1:d786049f033a
39 user: test
50 user: test
40 date: Thu Jan 01 00:00:00 1970 +0000
51 date: Thu Jan 01 00:00:01 1970 +0000
41 summary: ab
52 summary: a
42
53
43 % hg parents -r 2 glob:a
54 % hg parents -r 2 glob:a
44 abort: can only specify an explicit file name
55 abort: can only specify an explicit file name
56 % merge working dir with 2 parents, hg parents c
57 merging c
58 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
59 (branch merge, don't forget to commit)
60 changeset: 3:02d851b7e549
61 user: test
62 date: Thu Jan 01 00:00:03 1970 +0000
63 summary: c
64
65 changeset: 4:48cee28d4b4e
66 tag: tip
67 parent: 1:d786049f033a
68 user: test
69 date: Thu Jan 01 00:00:04 1970 +0000
70 summary: c2
71
72 % merge working dir with 1 parent, hg parents
73 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
75 (branch merge, don't forget to commit)
76 changeset: 2:6cfac479f009
77 user: test
78 date: Thu Jan 01 00:00:02 1970 +0000
79 summary: b
80
81 changeset: 4:48cee28d4b4e
82 tag: tip
83 parent: 1:d786049f033a
84 user: test
85 date: Thu Jan 01 00:00:04 1970 +0000
86 summary: c2
87
88 % merge working dir with 1 parent, hg parents c
89 changeset: 4:48cee28d4b4e
90 tag: tip
91 parent: 1:d786049f033a
92 user: test
93 date: Thu Jan 01 00:00:04 1970 +0000
94 summary: c2
95
General Comments 0
You need to be logged in to leave comments. Login now