Mercurial > hg
annotate tests/test-pull-branch.t @ 12830:d8205dacf9a3 stable
wix: add subrepos help text
author | Steve Borho <steve@borho.org> |
---|---|
date | Mon, 25 Oct 2010 10:07:54 -0500 |
parents | 28e2e3804f2e |
children | e380964d53f8 |
rev | line source |
---|---|
12279 | 1 $ hg init t |
2 $ cd t | |
3 $ echo 1 > foo | |
4 $ hg ci -Am1 # 0 | |
5 adding foo | |
6 $ hg branch branchA | |
7 marked working directory as branch branchA | |
8 $ echo a1 > foo | |
9 $ hg ci -ma1 # 1 | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
10 |
12279 | 11 $ cd .. |
12 $ hg init tt | |
13 $ cd tt | |
14 $ hg pull ../t | |
15 pulling from ../t | |
16 requesting all changes | |
17 adding changesets | |
18 adding manifests | |
19 adding file changes | |
20 added 2 changesets with 2 changes to 1 files | |
21 (run 'hg update' to get a working copy) | |
22 $ hg up branchA | |
23 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
24 |
12279 | 25 $ cd ../t |
26 $ echo a2 > foo | |
27 $ hg ci -ma2 # 2 | |
28 | |
29 Create branch B: | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
30 |
12279 | 31 $ hg up 0 |
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
33 $ hg branch branchB | |
34 marked working directory as branch branchB | |
35 $ echo b1 > foo | |
36 $ hg ci -mb1 # 3 | |
37 | |
38 $ cd ../tt | |
39 | |
40 A new branch is there | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
41 |
12279 | 42 $ hg pull -u ../t |
43 pulling from ../t | |
44 searching for changes | |
45 adding changesets | |
46 adding manifests | |
47 adding file changes | |
48 added 2 changesets with 2 changes to 1 files (+1 heads) | |
49 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
50 | |
51 Develop both branches: | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
52 |
12279 | 53 $ cd ../t |
54 $ hg up branchA | |
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
56 $ echo a3 > foo | |
57 $ hg ci -ma3 # 4 | |
58 $ hg up branchB | |
59 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
60 $ echo b2 > foo | |
61 $ hg ci -mb2 # 5 | |
62 | |
63 $ cd ../tt | |
64 | |
65 Should succeed, no new heads: | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
66 |
12279 | 67 $ hg pull -u ../t |
68 pulling from ../t | |
69 searching for changes | |
70 adding changesets | |
71 adding manifests | |
72 adding file changes | |
73 added 2 changesets with 2 changes to 1 files | |
74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 | |
76 Add a head on other branch: | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
77 |
12279 | 78 $ cd ../t |
79 $ hg up branchA | |
80 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
81 $ echo a4 > foo | |
82 $ hg ci -ma4 # 6 | |
83 $ hg up branchB | |
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 $ echo b3.1 > foo | |
86 $ hg ci -m b3.1 # 7 | |
87 $ hg up 5 | |
88 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 $ echo b3.2 > foo | |
90 $ hg ci -m b3.2 # 8 | |
91 created new head | |
92 | |
93 $ cd ../tt | |
94 | |
95 Should succeed because there is only one head on our branch: | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
96 |
12279 | 97 $ hg pull -u ../t |
98 pulling from ../t | |
99 searching for changes | |
100 adding changesets | |
101 adding manifests | |
102 adding file changes | |
103 added 3 changesets with 3 changes to 1 files (+1 heads) | |
104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
105 |
12279 | 106 $ cd ../t |
107 $ hg up -C branchA | |
108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 $ echo a5.1 > foo | |
110 $ hg ci -ma5.1 # 9 | |
111 $ hg up 6 | |
112 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
113 $ echo a5.2 > foo | |
114 $ hg ci -ma5.2 # 10 | |
115 created new head | |
116 $ hg up 7 | |
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
118 $ echo b4.1 > foo | |
119 $ hg ci -m b4.1 # 11 | |
120 $ hg up -C 8 | |
121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
122 $ echo b4.2 > foo | |
123 $ hg ci -m b4.2 # 12 | |
7372
e17dbf140035
pull: update to branch tip if there is only one head on the current branch
Benoit Allard <benoit@aeteurope.nl>
parents:
diff
changeset
|
124 |
12279 | 125 $ cd ../tt |
126 | |
127 $ hg pull -u ../t | |
128 pulling from ../t | |
129 searching for changes | |
130 adding changesets | |
131 adding manifests | |
132 adding file changes | |
133 added 4 changesets with 4 changes to 1 files (+1 heads) | |
134 not updating, since new heads added | |
135 (run 'hg heads' to see heads, 'hg merge' to merge) | |
136 |