##// 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 13 hg ci -Ama -d '1 0'
14 14 echo b >> b
15 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 23 echo % hg parents
18 24 hg parents
@@ -20,6 +26,12 b' hg parents'
20 26 echo % hg parents a
21 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 35 echo % hg parents -r 2
24 36 hg parents -r 2
25 37
@@ -41,4 +53,15 b" echo '% hg parents -r 2 glob:a'"
41 53 cd ..
42 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 67 true
@@ -1,19 +1,30 b''
1 1 % no working directory
2 2 adding a
3 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 8 % hg parents
5 changeset: 2:6cfac479f009
6 tag: tip
9 changeset: 3:02d851b7e549
7 10 user: test
8 date: Thu Jan 01 00:00:02 1970 +0000
9 summary: b
11 date: Thu Jan 01 00:00:03 1970 +0000
12 summary: c
10 13
11 14 % hg parents a
12 changeset: 0:b6a1406d8886
15 changeset: 1:d786049f033a
13 16 user: test
14 date: Thu Jan 01 00:00:00 1970 +0000
15 summary: ab
17 date: Thu Jan 01 00:00:01 1970 +0000
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 28 % hg parents -r 2
18 29 changeset: 1:d786049f033a
19 30 user: test
@@ -21,24 +32,64 b' date: Thu Jan 01 00:00:01 1970 +0'
21 32 summary: a
22 33
23 34 % hg parents -r 2 a
24 changeset: 0:b6a1406d8886
35 changeset: 1:d786049f033a
25 36 user: test
26 date: Thu Jan 01 00:00:00 1970 +0000
27 summary: ab
37 date: Thu Jan 01 00:00:01 1970 +0000
38 summary: a
28 39
29 40 % hg parents -r 2 ../a
30 41 abort: ../a not under root
31 42 % cd dir; hg parents -r 2 ../a
32 changeset: 0:b6a1406d8886
43 changeset: 1:d786049f033a
33 44 user: test
34 date: Thu Jan 01 00:00:00 1970 +0000
35 summary: ab
45 date: Thu Jan 01 00:00:01 1970 +0000
46 summary: a
36 47
37 48 % hg parents -r 2 path:a
38 changeset: 0:b6a1406d8886
49 changeset: 1:d786049f033a
39 50 user: test
40 date: Thu Jan 01 00:00:00 1970 +0000
41 summary: ab
51 date: Thu Jan 01 00:00:01 1970 +0000
52 summary: a
42 53
43 54 % hg parents -r 2 glob:a
44 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