##// END OF EJS Templates
tests: clarify some missing output in test-merge-subrepos...
marmoute -
r47472:b4ad45f2 default
parent child Browse files
Show More
@@ -1,141 +1,148 b''
1 $ hg init
1 $ hg init
2
2
3 $ echo a > a
3 $ echo a > a
4 $ hg ci -qAm 'add a'
4 $ hg ci -qAm 'add a'
5
5
6 $ hg init subrepo
6 $ hg init subrepo
7 $ echo 'subrepo = http://example.net/libfoo' > .hgsub
7 $ echo 'subrepo = http://example.net/libfoo' > .hgsub
8 $ hg ci -qAm 'added subrepo'
8 $ hg ci -qAm 'added subrepo'
9
9
10 $ hg up -qC 0
10 $ hg up -qC 0
11 $ echo ax > a
11 $ echo ax > a
12 $ hg ci -m 'changed a'
12 $ hg ci -m 'changed a'
13 created new head
13 created new head
14
14
15 $ hg up -qC 1
15 $ hg up -qC 1
16 $ cd subrepo
16 $ cd subrepo
17 $ echo b > b
17 $ echo b > b
18 $ hg add b
18 $ hg add b
19 $ cd ..
19 $ cd ..
20
20
21 Should fail, since there are added files to subrepo:
21 Should fail, since there are added files to subrepo:
22
22
23 $ hg merge
23 $ hg merge
24 abort: uncommitted changes in subrepository "subrepo"
24 abort: uncommitted changes in subrepository "subrepo"
25 [255]
25 [255]
26
26
27 Deleted files trigger a '+' marker in top level repos. Deleted files are also
27 Deleted files trigger a '+' marker in top level repos. Deleted files are also
28 noticed by `update --check` in the top level repo.
28 noticed by `update --check` in the top level repo.
29
29
30 $ hg ci -Sqm 'add b'
30 $ hg ci -Sqm 'add b'
31 $ echo change > subrepo/b
31 $ echo change > subrepo/b
32
32
33 $ hg ci -Sm 'change b'
33 $ hg ci -Sm 'change b'
34 committing subrepository subrepo
34 committing subrepository subrepo
35
35
36 $ rm a
36 $ rm a
37 $ hg id
37 $ hg id
38 9bfe45a197d7+ tip
38 9bfe45a197d7+ tip
39 $ hg sum
39 $ hg sum
40 parent: 4:9bfe45a197d7 tip
40 parent: 4:9bfe45a197d7 tip
41 change b
41 change b
42 branch: default
42 branch: default
43 commit: 1 deleted (clean)
43 commit: 1 deleted (clean)
44 update: 1 new changesets, 2 branch heads (merge)
44 update: 1 new changesets, 2 branch heads (merge)
45 phases: 5 draft
45 phases: 5 draft
46
46
47 $ hg up --check -r '.^'
47 $ hg up --check -r '.^'
48 abort: uncommitted changes
48 abort: uncommitted changes
49 [20]
49 [20]
50 $ hg st -S
50 $ hg st -S
51 ! a
51 ! a
52 $ hg up -Cq .
52 $ hg up -Cq .
53
53
54 Test that dirty is consistent through subrepos
54 Test that dirty is consistent through subrepos
55
55
56 $ rm subrepo/b
56 $ rm subrepo/b
57
57
58 A deleted subrepo file is flagged as dirty, like the top level repo
58 A deleted subrepo file is flagged as dirty, like the top level repo
59
59
60 $ hg id --config extensions.blackbox= --config blackbox.dirty=True \
60 $ hg id --config extensions.blackbox= --config blackbox.dirty=True \
61 > --config blackbox.track='command commandfinish'
61 > --config blackbox.track='command commandfinish'
62 9bfe45a197d7+ tip
62 9bfe45a197d7+ tip
63 $ cat .hg/blackbox.log
63 $ cat .hg/blackbox.log
64 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !)
64 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !)
65 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob)
65 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob)
66 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob)
66 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob)
67
67
68 TODO: a deleted file should be listed as such, like the top level repo
68 TODO: a deleted file should be listed as such, like the top level repo
69
69
70 $ hg sum
70 $ hg sum
71 parent: 4:9bfe45a197d7 tip
71 parent: 4:9bfe45a197d7 tip
72 change b
72 change b
73 branch: default
73 branch: default
74 commit: (clean)
74 commit: (clean)
75 update: 1 new changesets, 2 branch heads (merge)
75 update: 1 new changesets, 2 branch heads (merge)
76 phases: 5 draft
76 phases: 5 draft
77
77
78 Modified subrepo files are noticed by `update --check` and `summary`
78 Modified subrepo files are noticed by `update --check` and `summary`
79
79
80 $ echo mod > subrepo/b
80 $ echo mod > subrepo/b
81 $ hg st -S
81 $ hg st -S
82 M subrepo/b
82 M subrepo/b
83
83
84 $ hg up -r '.^' --check
84 $ hg up -r '.^' --check
85 abort: uncommitted changes in subrepository "subrepo"
85 abort: uncommitted changes in subrepository "subrepo"
86 [255]
86 [255]
87
87
88 $ hg sum
88 $ hg sum
89 parent: 4:9bfe45a197d7 tip
89 parent: 4:9bfe45a197d7 tip
90 change b
90 change b
91 branch: default
91 branch: default
92 commit: 1 subrepos
92 commit: 1 subrepos
93 update: 1 new changesets, 2 branch heads (merge)
93 update: 1 new changesets, 2 branch heads (merge)
94 phases: 5 draft
94 phases: 5 draft
95
95
96 TODO: why is -R needed here? If it's because the subrepo is treated as a
96 TODO: why is -R needed here? If it's because the subrepo is treated as a
97 discrete unit, then this should probably warn or something.
97 discrete unit, then this should probably warn or something.
98 $ hg revert -R subrepo --no-backup subrepo/b -r .
98 $ hg revert -R subrepo --no-backup subrepo/b -r .
99
99
100 $ rm subrepo/b
100 $ rm subrepo/b
101 $ hg st -S
101 $ hg st -S
102 ! subrepo/b
102 ! subrepo/b
103
103
104 `hg update --check` notices a subrepo with a missing file, like it notices a
104 `hg update --check` notices a subrepo with a missing file, like it notices a
105 missing file in the top level repo.
105 missing file in the top level repo.
106
106
107 $ hg up -r '.^' --check
107 $ hg up -r '.^' --check
108 abort: uncommitted changes in subrepository "subrepo"
108 abort: uncommitted changes in subrepository "subrepo"
109 [255]
109 [255]
110
110
111 $ hg up -r '.^' --config ui.interactive=True << EOF
111 $ hg up -r '.^' --config ui.interactive=True << EOF
112 > d
112 > d
113 > EOF
113 > EOF
114 file 'b' was deleted in local [working copy] but was modified in other [destination].
114 file 'b' was deleted in local [working copy] but was modified in other [destination].
115 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
115 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
116 What do you want to do? d
116 What do you want to do? d
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
118
118
119 XXX: There's a difference between wdir() and '.', so there should be a status.
119 XXX: There's a difference between wdir() and '.', so there should be a status.
120 `hg files -S` from the top is also missing 'subrepo/b'.
120 `hg files -S` from the top is also missing 'subrepo/b'. The files should be
121 seen as deleted (and, maybe even missing? in which case `hg files` should list
122 it)
121
123
122 $ hg st -S
124 $ hg st -S
125 R subrepo/b (missing-correct-output !)
123 $ hg st -R subrepo
126 $ hg st -R subrepo
127 R subrepo/b (missing-correct-output !)
128
129 (note: return [1] because no files "match" since the list is empty)
130
124 $ hg files -R subrepo
131 $ hg files -R subrepo
125 [1]
132 [1]
126 $ hg files -R subrepo -r '.'
133 $ hg files -R subrepo -r '.'
127 subrepo/b
134 subrepo/b
128
135
129 $ hg bookmark -r tip @other
136 $ hg bookmark -r tip @other
130 $ echo xyz > subrepo/c
137 $ echo xyz > subrepo/c
131 $ hg ci -SAm 'add c'
138 $ hg ci -SAm 'add c'
132 adding subrepo/c
139 adding subrepo/c
133 committing subrepository subrepo
140 committing subrepository subrepo
134 created new head
141 created new head
135 $ rm subrepo/c
142 $ rm subrepo/c
136
143
137 Merge sees deleted subrepo files as an uncommitted change
144 Merge sees deleted subrepo files as an uncommitted change
138
145
139 $ hg merge @other
146 $ hg merge @other
140 abort: uncommitted changes in subrepository "subrepo"
147 abort: uncommitted changes in subrepository "subrepo"
141 [255]
148 [255]
General Comments 0
You need to be logged in to leave comments. Login now