Mercurial > hg
annotate tests/test-filebranch.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 | 4134686b83e1 |
children | d724a69309e0 |
rev | line source |
---|---|
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
1 This test makes sure that we don't mark a file as merged with its ancestor |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
2 when we do a merge. |
990 | 3 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
4 $ cat <<EOF > merge |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
5 > import sys, os |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
6 > print "merging for", os.path.basename(sys.argv[1]) |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
7 > EOF |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
8 $ HGMERGE="python ../merge"; export HGMERGE |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
9 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
10 Creating base: |
990 | 11 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
12 $ hg init a |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
13 $ cd a |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
14 $ echo 1 > foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
15 $ echo 1 > bar |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
16 $ echo 1 > baz |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
17 $ echo 1 > quux |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
18 $ hg add foo bar baz quux |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
19 $ hg commit -m "base" |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
20 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
21 $ cd .. |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
22 $ hg clone a b |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
23 updating to branch default |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
24 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
25 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
26 Creating branch a: |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
27 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
28 $ cd a |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
29 $ echo 2a > foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
30 $ echo 2a > bar |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
31 $ hg commit -m "branch a" |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
32 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
33 Creating branch b: |
990 | 34 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
35 $ cd .. |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
36 $ cd b |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
37 $ echo 2b > foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
38 $ echo 2b > baz |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
39 $ hg commit -m "branch b" |
990 | 40 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
41 We shouldn't have anything but n state here: |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
42 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
43 $ hg debugstate --nodates | grep -v "^n" |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12192
diff
changeset
|
44 [1] |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
45 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
46 Merging: |
990 | 47 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
48 $ hg pull ../a |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
49 pulling from ../a |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
50 searching for changes |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
51 adding changesets |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
52 adding manifests |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
53 adding file changes |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
54 added 1 changesets with 2 changes to 2 files (+1 heads) |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
55 (run 'hg heads' to see heads, 'hg merge' to merge) |
990 | 56 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
57 $ hg merge -v |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
58 merging for foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
59 resolving manifests |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
60 getting bar |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
61 merging foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
62 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
63 (branch merge, don't forget to commit) |
990 | 64 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
65 $ echo 2m > foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
66 $ echo 2b > baz |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
67 $ echo new > quux |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
68 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
69 We shouldn't have anything but foo in merge state here: |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
70 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
71 $ hg debugstate --nodates | grep "^m" |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
72 m 644 3 foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
73 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
74 $ hg ci -m "merge" |
990 | 75 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
76 main: we should have a merge here: |
990 | 77 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
78 $ hg debugindex .hg/store/00changelog.i |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
79 rev offset length base linkrev nodeid p1 p2 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
80 0 0 73 0 0 cdca01651b96 000000000000 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
81 1 73 68 1 1 f6718a9cb7f3 cdca01651b96 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
82 2 141 68 2 2 bdd988058d16 cdca01651b96 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
83 3 209 66 3 3 d8a521142a3c f6718a9cb7f3 bdd988058d16 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
84 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
85 log should show foo and quux changed: |
990 | 86 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
87 $ hg log -v -r tip |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
88 changeset: 3:d8a521142a3c |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
89 tag: tip |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
90 parent: 1:f6718a9cb7f3 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
91 parent: 2:bdd988058d16 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
92 user: test |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
93 date: Thu Jan 01 00:00:00 1970 +0000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
94 files: foo quux |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
95 description: |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
96 merge |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
97 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
98 |
990 | 99 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
100 foo: we should have a merge here: |
990 | 101 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
102 $ hg debugindex .hg/store/data/foo.i |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
103 rev offset length base linkrev nodeid p1 p2 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
104 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
105 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
106 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
107 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a |
990 | 108 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
109 bar: we should not have a merge here: |
990 | 110 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
111 $ hg debugindex .hg/store/data/bar.i |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
112 rev offset length base linkrev nodeid p1 p2 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
113 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
114 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
115 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
116 baz: we should not have a merge here: |
993 | 117 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
118 $ hg debugindex .hg/store/data/baz.i |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
119 rev offset length base linkrev nodeid p1 p2 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
120 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
121 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
990 | 122 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
123 quux: we should not have a merge here: |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
124 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
125 $ hg debugindex .hg/store/data/quux.i |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
126 rev offset length base linkrev nodeid p1 p2 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
127 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
128 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000 |
990 | 129 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
130 Manifest entries should match tips of all files: |
990 | 131 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
132 $ hg manifest --debug |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
133 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
134 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
135 aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
136 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
137 |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
138 Everything should be clean now: |
990 | 139 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
140 $ hg status |
993 | 141 |
12192
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
142 $ hg verify |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
143 checking changesets |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
144 checking manifests |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
145 crosschecking files in changesets and manifests |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
146 checking files |
968e9057ab8a
tests: unify test-filebranch
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
147 4 files, 4 changesets, 10 total revisions |
990 | 148 |